Spielerando

Fix a match-three board that miscounts runs of five and L-shaped matches

Lines of five clear only three tiles, an L-shape clears one arm, or a tile counted twice pays double points. Nearly always the cause is checking too early or clearing while still looking. This entry shows how to make the AI find every matched tile exactly once.

Why this works

Looking and changing must not happen at the same time. If you clear tiles while you are still searching, you destroy what the next search needs to see. Find everything first, keep each tile once in a single collection, and only then change the board.

When not to use it

Finding everything first is not enough where the rules want a prize for the shape itself, such as a special piece for a line of four or a bomb for a T. Then you also need to know which run formed which shape, not only the set of tiles.

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
  • 29 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 "Fix a match-three board that miscounts runs of five and L-shaped matches" (read_entry match-three-miscounts-l-and-t-shapes) 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