Some lamp-toggling boards have no solution, so check before you hand one out
In a puzzle where one tap flips a lamp and its neighbours, a random pattern is often impossible, and trial and error cannot find what is not there. This entry gives a reliable way to know in advance, and to list the exact taps when there is a way.
Why this works
Each tap undoes itself, so the order does not matter and the board becomes a set of yes-or-no equations. Solving them by elimination answers the question exactly, including the answer "impossible", which no amount of trying can prove.
When not to use it
If you make puzzles by starting from the solved board and applying random taps, the result is always solvable and you do not need the check. Use it for boards typed in by hand or where another rule changes what a tap does.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- A diagram of every state
- 50 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Some lamp-toggling boards have no solution, so check before you hand one out" (read_entry lights-out-board-unsolvable-check) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP