Light Switch · Strategy Guide
How to Solve a Lights Out Puzzle
A 5×5 grid, a single algorithm, and you'll never lose again.
What is Lights Out?
Lights Out is a 5×5 grid where each cell is either on or off. Clicking any cell toggles it and its four orthogonal neighbours — up, down, left, and right. The goal is to turn every light off.
The puzzle was originally a 1995 Tiger Electronics handheld and became a staple of programming contests because of the elegant math underneath. Despite the small grid, naive guessing rarely works: every click ripples through the board, so the order matters as much as the choice.
The good news: every solvable puzzle can be cleared by a single, mechanical algorithm called light chasing. Once you internalise it, you can clear most boards in under a minute without thinking.
Why every puzzle here is solvable
Each cell click is essentially a fixed pattern — the cell itself plus its neighbours — added (XOR) to the board. The set of all reachable board configurations forms a 23-dimensional subspace of all possible 25-cell boards. Two specific board patterns can't be solved (they live outside that subspace), so a generator that produces puzzles only by simulating valid clicks is guaranteed to land inside the solvable set.
In Minute Arcade, every Light Switch board is generated by starting from the all-off state and applying random clicks, so the result is always reachable. If you hit a contradiction, you've made a mistake — back up and recompute.
The light chasing algorithm
Light chasing is the technique that lets you solve any Lights Out board in two passes. The idea: forget about the top row. Click cells in the second row to turn off any lights in the first row directly above them. Then use the third row to clear the second, and so on, all the way to the bottom.
- Pass one (rows 2-5): for each cell in row N, click it if the cell directly above it is on. After this pass, rows 1-4 are all off — but the bottom row may have any combination.
- Pass two (the key step): read the bottom row's pattern. There are exactly seven distinct patterns it can produce, and each one has a fixed first-row click sequence that "absorbs" it.
- Restart with the corrective top-row clicks, then run pass one again. The board clears.
In practice, you don't need to memorise the seven correction patterns to play well — you just need to recognise that pass one alone clears the top four rows, and the bottom row is a small enough problem to solve by hand once it's isolated.
A worked example
Suppose the top-left cell is on, and the rest of the board is off. Naive instinct: click the top-left to turn it off. But that toggles four other cells too — bad trade.
Light chasing approach: leave the top-left alone for now. Move to row 2. The cell directly below the lit one is off and the cell above it (the lit one) is on, so click row 2, column 1. That click toggles the original cell off, plus toggles the cell at (2,1), (3,1), (2,2). Now you have three new lit cells in row 2-3.
Continue: in row 3, click any cell whose row-2 neighbour is now lit. The lit cells in row 2 cascade down, and by the time you reach row 5 the top four rows are clean.
Whatever pattern remains in row 5 tells you which top-row corrective clicks you need. For most boards, this two-pass process takes 8-15 clicks total.
Common mistakes
Most players never see the algorithm and instead try to brute-force, which leaves them chasing their tail.
- Clicking the lit cell to "turn it off." It does, but it also lights up four neighbours. Almost every puzzle gets worse from this move.
- Clicking the same cell twice. Two clicks on the same cell cancel out — pure wasted moves. Track which cells you've clicked.
- Solving the top row first. Tempting, but the row below it will inevitably ruin your work. Always clear top-down.
Practice in your browser
Light chasing only feels natural after you've done it a few times. Play a handful of Light Switch puzzles in a row, deliberately using the row-by-row approach instead of guessing, and you'll notice the click count drop fast.