Building a daily path puzzle generator that guarantees a single solution
The author built Tracewise, an Android daily logic puzzle where a single path must cover every grid square while passing numbered cells in order. Each day's puzzles must have exactly one solution, generate quickly on the phone, and be identical across devices. The generator first creates a random Hamiltonian path using a backbite move that starts from a snake pattern and is seeded by the date for determinism. A solver then counts solutions, stopping at two, using pruning rules such as checkerboard parity, dead-end detection and connectivity checks. If the solver hits a node limit, the generator adds a clue rather than shipping a puzzle whose uniqueness it cannot prove.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in