Light toggle puzzle online

In this light toggle puzzle you switch off all the lamps on a grid. Every click flips the chosen square and its neighbours above, below, left and right. Pick a grid from 3 × 3 to 7 × 7; every puzzle can be solved and the game tells you the minimum number of moves. No sign-up, works on phones.

Source: Wikipedia: Gaussian elimination over GF(2) (Loesbarkeit, Mindestzuege). Updated: .

Switch off all the lamps. One click flips the square and its four neighbours.

Moves: 0 Minimum: 0 Lamps on: 0

Rules: a click on a square flips it and its neighbours above, below, left and right (on becomes off, off becomes on). The goal is a grid with no lamp lit. Lamps are shown as ● (on) and ○ (off).

Controls: tap a square, or move with the arrow keys and press Enter or Space. “Undo move” takes back the last click, “Start over” resets the puzzle to its beginning.

My Toolbox

Result

How it is calculated

In short: in the light toggle puzzle some lamps on a square grid are lit. Every click flips one lamp and its direct neighbours. Your goal: all lamps off, with as few clicks as possible.

How a move works

Solving strategy: chasing the lights

Work row by row: in each row press the squares under the lit lamps of the row above, until only the bottom row has lamps left. Then only a few patterns are possible; they tell you which squares of the top row you still have to press, and the chase starts again.

Why is every puzzle solvable?

Every puzzle here is made from a switched-off grid by random clicks, so it can always be undone. Not every distribution of lamps is solvable, for example a single lit corner on a 5 × 5 grid is not. The game works out the minimum with Gaussian elimination over the field with two elements; on 5 × 5 each puzzle has exactly four solution patterns and the shortest counts.

Grid sizes

GridFeel
3 × 3Entry level, few possibilities
4 × 4Many equally good solution paths
5 × 5The classic size
6 × 6 and 7 × 7Bigger, the solution is unique

Puzzle series

“Next puzzle” takes you through a numbered series. Grid and number define the puzzle exactly. Your progress stays on your device only; puzzles where you used the hint do not count.

Frequently asked questions

How does the light toggle puzzle work?

A grid holds lamps that are on or off. A click flips the chosen square and its neighbours above, below, left and right. You win when all lamps are off.

Is every light toggle puzzle solvable?

Here, yes, because the puzzles are made from a switched-off grid by random clicks. In arbitrary lamp patterns some positions on 4 × 4 and 5 × 5 are unsolvable.

How many moves are needed at minimum?

The game works it out for every puzzle with linear algebra and shows it as “Minimum”. It counts your own moves next to it.

How do I get started?

Chase the lights down row by row: press the square under each lit lamp. What is left in the last row tells you how to correct the top.

Is anything saved?

Only which puzzle numbers you solved, and only in your browser (localStorage). Nothing is sent anywhere.

Sources and legal basis

As of: · Editorial policy

Related tools