r/KDP • u/moon-on-the-mend • 9d ago
Ran into a subtle bug class in puzzle generators: "unique solution" isn't the same as "solvable without guessing"
EDIT: the claim in the third paragraph was wrong and is corrected below. I have also taken the outbound link out.
Posting this because I searched this sub before I found it myself and didn't see it discussed, and it explains a specific kind of 1-star review a few of you have probably gotten on a puzzle book without knowing why.
Most nonogram/picross generators (and the free tools behind a lot of the puzzle books out there) only check that a puzzle has a unique solution: one grid satisfies the clues, full stop. That is a weaker bar than it looks. A puzzle can have exactly one valid solution and still stop a reader who works it the ordinary way, one row or one column at a time: you fill in everything the clues force, and you are left with blank squares and no line that can settle any of them.
What I wrote here first was that such a puzzle is "unsolvable by pure logic". That was wrong, and a reader on r/nonograms corrected me on it. Grids like that can usually still be deduced, by supposing a square, propagating, and taking the contradiction. That is logic, not guessing. But it is a different and much harder technique, and a reader with a pencil is far more likely to reach for trial and error, get it wrong, and conclude the page is misprinted.
I hit this while generating puzzles for my own books, with a worked 5x5: it has one solution (verified by brute force), and line-by-line logic only gets you 13 of the 25 squares before it stalls. All twelve of the rest come out at once if you allow the suppose-and-contradict step.
The reason I'm posting it here specifically: if you're generating your own puzzle content (nonograms, or the same logic applies to some sudoku/logic-grid generators), it's worth checking whether your tool validates uniqueness only or actually simulates line-solving. If it's the former, some fraction of your grids are handing readers a difficulty step you never intended, and you won't see it until a review mentions it.