Check that the player cannot lock themselves out by using up the only key
If one key opens two doors but vanishes in the first, a player who picks the wrong door is stuck without ever being told. This entry looks ahead through the remaining steps of your game and says whether the ending can still be reached from what the player holds now.
Why this works
A dead end cannot be seen by looking at the screen, only by trying every order of moves. If no order of using the remaining things reaches the goal, the position is stuck. Letting each action be used once and stopping at a limit keeps the search finite and honest.
When not to use it
The search grows too large for open worlds with hundreds of items and rules. There, test the story's critical path and add a rescue, such as a spare key sold nearby or a way to remake what is lost, instead of proving the whole game.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 35 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 "Check that the player cannot lock themselves out by using up the only key" (read_entry detect-lost-key-items-before-the-player-does) 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