Every room is searched: what a program found in our rooms
A puzzle room can be wrong in two ways. It can have no way out at all, or it can have a way out that skips the thing the room was built to teach. The person who made the room sees neither, because they only ever walk the way they meant. So a program walks all the others.
A search over every position
A position is everything that can still change: where you stand, where the lantern is and whether it is open, where each swarm and each beetle is, how long each cap still glows, how awake each nest is. The search starts where a room begins and tries each of the six things you can do, then each of them from every position it reached, and so on. The first time every swarm is home, it has found a shortest way.
For the 11 rooms together it walked 15,574,148 positions. The shortest ways add up to 224 beats.
Does the room need what it says?
Each room says what it needs: the shutter, setting the lantern down, both or neither. The search holds it to that by taking the button away and looking again. The last room of the cave says it needs both. Without the shutter the search walked every position it could reach and found no way home, and the same without setting the lantern down. A room that claims a need it does not have would be caught. We planted one, and it was.
Positions with no way home
The search also counts the positions from which nothing leads home any more. In most rooms there are none. In the cave room where a beetle has to stay on its slab there are 627,431 of 846,923: let the light fall on the beetle at the wrong moment and the gate is shut for good. In the last room of the cave it is 211,977 of 274,762. Those two rooms are why the game has a button to begin a room again, and why that costs nothing.
What the search cannot say
It says that a room can be solved. It does not say that a room is fun, or fair to read, or the right length. For that somebody has to play it, and the search is no substitute.
For your own game
If your game moves in steps, ask your AI for a search like this before you build the tenth level. Ask for three answers for each level: is there a way, how short is it, and is there one without the thing the level is about.
Read up
The pages of ours this note builds on, and what others have written about its point.
The same breadth-first walk, over the cells of a map instead of the positions of a game.
The question "can this still be finished?" asked of a quest instead of a room.
The Bugs Our Proofs Found in Our Own Code
What such checks have found in code we had already called finished.
Next note A twist that holds on all six nights: checking a story for holes