Skip to content
Puzzles

Light Switches

Each press toggles a lamp and its neighbours: switch everything off.

The famous light puzzle, from 5 × 5 to 9 × 9. Grids are always solvable, the shortest solution is computed with binary algebra, and an AI switches the board off before your eyes.

Players
1 player
Length
2 to 15 min
  • Solo
Play Light Switches

15 days of full access, no account · No download

Light Switches preview

How to play

Goal

Switch off every lamp on the board.

How it works

  • Pressing a lamp toggles it (on or off), along with its four direct neighbours: above, below, left and right.
  • Each press counts as one move; the timer starts on the first press.
  • The order of the presses does not matter, and pressing the same lamp twice cancels the effect: a shortest solution therefore never uses the same lamp twice.
  • Every grid is solvable: they are built from hidden presses.

Levels

  • Easy: 5 × 5, 5 to 8 presses.
  • Medium: 6 × 6, 9 to 13 presses.
  • Hard: 7 × 7, 14 to 20 presses.
  • Expert: 8 × 8, 20 to 28 presses.
  • Devilish: 9 × 9, about thirty presses (at least 28).

The “Symmetric” option produces regular patterns (mirror, rotation); “Random” scatters the hidden presses.

The chase method: row by row, press under every lit lamp; all the lamps go out except those in the last row. Their pattern then tells you which lamps of the first row to press before starting the chase again.

About the AI

The board translates into a system of linear equations over GF(2), the field with two elements: one unknown per lamp (press or not), one equation per lamp (it must change state an odd number of times if it is lit). The AI solves it by Gauss-Jordan elimination, then goes through all the equivalent solutions (the 5 × 5 has 4, the 9 × 9 has 256) to keep the shortest. The hint points to a lamp in this optimal solution; the “AI solves” button applies all of it.

Records are only registered without hints or AI help.

Difficulty levels

  1. Easy5 × 5: 5 to 8 presses are enough.
  2. Medium6 × 6: 9 to 13 presses.
  3. Hard7 × 7: 14 to 20 presses.
  4. Expert8 × 8: 20 to 28 presses.
  5. Diabolical9 × 9: about thirty presses, and 256 equivalent solutions to choose between.

More puzzles games

Lire cette page en français