shadify icon indicating copy to clipboard operation
shadify copied to clipboard

Invalid Takuzu Puzzles

Open foopod opened this issue 8 months ago • 2 comments

Puzzles generated are not guaranteed to have unique solutions.

foopod avatar May 12 '25 23:05 foopod

Puzzles generated are not guaranteed to have unique solutions.

As I recall, it's pure random, with no guarantee of a single solution.

cheatsnake avatar May 13 '25 14:05 cheatsnake

Unfortunately with multiple solutions, most of the generated puzzles are unsolvable. Here is an example (literally just the first call I made on the API).

["x","x","x","x","1","x","0","x"],["x","x","x","x","0","x","1","x"],["x","x","1","x","x","0","x","0"],["0","x","x","x","1","x","x","x"],["1","1","x","0","x","1","x","x"],["x","x","x","1","0","x","1","x"],["0","x","x","x","0","1","0","x"],["x","x","x","x","1","x","x","x"]

You can get part way through, uncover a couple of rows and columns before getting stuck where solvers can't work it out either.

From https://binarypuzzle.nl/

Screenshot_2025-05-14-06-42-03-177_org.mozilla.firefox-edit.jpg

I think the generator should be doing some checks while it removes pieces to ensure the puzzle remains solvable.

foopod avatar May 13 '25 18:05 foopod