Spielerando

Check puzzle level files for a missing start, a blocked goal or ragged rows

A level written by an AI, or by you in a hurry, can have two starting points, a goal behind a wall, or a row that is one tile short, and the game then crashes or cannot be won. This entry shows how to make the AI check every level before it ships.

Why this works

A level is a promise that someone can finish it. A person cannot see that from the text, but a machine can check it in the same order a player would meet the problems: first the shape of the grid, and only then whether the goal can be reached.

When not to use it

It is the wrong test once levels contain keys, doors, pushable blocks or enemies. An open path then does not show that the level can be won, so you need a check that plays the level through, with every item and move.

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
  • 44 lines of example code with 5 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Check puzzle level files for a missing start, a blocked goal or ragged rows" (read_entry validate-maze-level-files) 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