My level checker says a puzzle is impossible, but it may just have given up
AI-made puzzle levels often get a quick check that answers yes or no. A silent no can mean the level really cannot be won, or that the checker ran out of patience. Here is a solver that tells these two answers apart and returns the shortest way when there is one.
Why this works
Only a search that ran through every reachable position may say impossible. If it stopped early, the honest answer is unknown, and treating it as impossible throws away levels that were fine.
When not to use it
Skip it when the puzzle has far too many positions to list, such as a big open board; use hand-made level rules or a smarter search for that case.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 48 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 "My level checker says a puzzle is impossible, but it may just have given up" (read_entry solver-says-unsolvable-or-gave-up) 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