📖 Backtracking

Akari Puzzle Glossary — All Terms

Backtracking — Backtracking is an advanced solving technique — and the method computer solvers use when simple deduction is not enough. You pick an undecided cell, assume it holds a bulb, and propagate all consequences.

⚙️ How It Works

Choose an undecided cell and mentally assume "a bulb goes here." Propagate all consequences — illumination, neighbor counts, conflict zones. If you reach a contradiction (a numbered cell gets too many bulbs, or a white cell becomes impossible to illuminate), your assumption was wrong and that cell cannot hold a bulb. If no contradiction appears, continue until the puzzle is solved.

⚖️ Pros & Cons

✅ Advantages

  • Can solve any logically solvable puzzle, including the hardest ones
  • Systematic approach that guarantees a solution
  • Essential for computer solvers like GridPaw's built-in solver

⚠️ Trade-offs

  • Mentally taxing for human solvers — requires tracking hypothetical state
  • Slower than pure deduction — should be a last resort, not first approach
  • Can feel like "guessing" even though it is logically sound

🎯 Who Should Use It?

Experienced solvers tackling Hard puzzles on 12×12+ grids. Beginners should master constraint propagation and elimination first.

🚀 Step-by-Step Guide

1

Pick a strategic cell

Choose an undecided cell near a cluster of numbered walls. This gives the most information per assumption.

2

Assume "bulb here"

Mentally place a bulb and propagate all consequences: illumination, neighbor counts, conflicts.

3

Check for contradictions

If any constraint is violated, your assumption was wrong — mark the cell with X. If no contradiction, the assumption may be correct.

4

Try the opposite

If "bulb here" leads to no contradiction, try "no bulb here" and propagate. If that also leads to no contradiction, you need more information — pick a different cell.

❓ FAQ

Is backtracking the same as guessing?

No. Guessing means placing a bulb without logical justification. Backtracking is a systematic proof technique: you assume a position, derive all consequences, and check for contradictions. It is logically rigorous.

When should I use backtracking?

Only when constraint propagation and elimination are exhausted. On Easy and Medium puzzles, you should never need backtracking. On Hard 12×12+ grids, it may be necessary.

Does GridPaw's solver use backtracking?

Yes. GridPaw's built-in solver uses constraint propagation as its first pass, then falls back to backtracking when simple deduction is insufficient.

Ready to put this knowledge to use?

🐱 Play GridPaw Free