Spielerando

My AI-made number-grid puzzles have two correct answers or none

A good number-grid puzzle has exactly one answer, but a generator that removes cells at random cannot promise it. Players then find a different valid answer and think the game is wrong. This entry counts answers cleverly and stops as soon as it knows enough.

Why this works

You never need the exact number of answers, only whether it is zero, one or more than one. Stopping at two keeps the search fast, and choosing the most constrained cell first keeps it small.

When not to use it

Skip it for puzzles that are meant to be open-ended, or where a hint system will guide the player to the stored answer anyway.

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
  • 54 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 AI-made number-grid puzzles have two correct answers or none" (read_entry number-grid-generator-makes-two-answers) 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