Invalid Takuzu Puzzles
Puzzles generated are not guaranteed to have unique solutions.
Puzzles generated are not guaranteed to have unique solutions.
As I recall, it's pure random, with no guarantee of a single solution.
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/
I think the generator should be doing some checks while it removes pieces to ensure the puzzle remains solvable.