How does Lights Out work?
Lights Out is a grid of lights, some on and some off. Pressing a light flips it, and also flips the lights directly above, below, left and right of it: on becomes off and off becomes on. The goal is to turn every light off. Because each press changes up to five lights at once, fixing one part of the board tends to disturb another.
How to play it here
Choose a 3×3, 4×4, 5×5 or 6×6 grid (5×5 is the classic) and press Start. Click or tap a light to press it. On a keyboard, the arrow keys move between lights and Enter or Space presses one. Start over puts the same board back; New board deals a different one; Change size goes back to the grid choice. A light in a corner flips three lights, one on an edge flips four, and one in the middle flips five.
How is your result calculated?
The clock starts on your first press and stops on the press that turns the last light off. Every press counts, including ones that turn out to be wasted. Next to your presses you see the fewest presses that solve that particular board, worked out exactly when the board is dealt, so you can tell a perfect solution from a merely successful one.
Every board is dealt by starting with all lights off and pressing a few random lights. Pressing the same lights again would undo it, so every board here can be solved.
What does my rating mean?
The rating compares your presses with the fewest that solve your board, so it needs no averages: exactly the fewest is Perfect, up to 15% more is Excellent, up to 35% more is Good, and up to 80% more is Fair. Each board has its own fewest; for example:
| Rating (presses) | Fewest 4 | Fewest 7 | Fewest 10 |
|---|---|---|---|
| Perfect | 4 | 7 | 10 |
| Excellent | – | 8 | 11 |
| Good | 5 | 9 | 12–13 |
| Fair | 6–7 | 10–12 | 14–18 |
| Keep trying | 8+ | 13+ | 19+ |
Two facts that make it solvable
- Pressing a light twice does nothing. The second press flips the same lights back.
- The order of presses doesn't matter. Each light ends up flipped once for every press that touches it, whatever order those presses came in.
Together they mean a solution is just a set of lights, each pressed once. That turns the puzzle into a system of equations where 1 + 1 = 0, which a computer solves with the same elimination method taught for ordinary equations. It is how the fewest presses is found for your board: solve the equations, then compare every equivalent answer and keep the shortest.
How to solve Lights Out: chase the lights
There is a method that works on any solvable board without any calculating. It won't use the fewest presses, but it always finishes:
- For every light that is on in the top row, press the light directly below it. The top row is now dark.
- Do the same for the second row, then the third, and so on. Each row goes dark, and all the remaining lights end up in the bottom row.
- Look up the bottom row's pattern in the table below and press those lights in the top row.
- Chase the lights down again, row by row. This time the bottom row goes dark too.
For the 5×5 grid, these are the only bottom rows the chase can leave on a solvable board. Columns count from the left. The table was worked out by the same solver that scores your board.
| Lit in the bottom row | Press in the top row |
|---|---|
| Columns 1, 2 and 3 | Columns 2 |
| Columns 2 and 4 | Columns 3, 4 and 5 |
| Columns 1, 3 and 4 | Columns 5 |
| Columns 1 and 5 | Columns 4 and 5 |
| Columns 2, 3 and 5 | Columns 1 |
| Columns 1, 2, 4 and 5 | Columns 3 |
| Columns 3, 4 and 5 | Columns 4 |
On the other grids
On the 3×3 grid the same chase works, with this table for the last step:
| Lit in the bottom row | Press in the top row |
|---|---|
| Columns 1 | Columns 1 and 2 |
| Columns 2 | Columns 1, 2 and 3 |
| Columns 1 and 2 | Columns 3 |
| Columns 3 | Columns 2 and 3 |
| Columns 1 and 3 | Columns 1 and 3 |
| Columns 2 and 3 | Columns 1 |
| Columns 1, 2 and 3 | Columns 2 |
On the 4×4 grid there is no last step: chasing the lights down turns every solvable board fully off on its own. If lights are still on in the bottom row when you finish, that board can't be solved.
On the 6×6 grid the chase works too, and since every 6×6 board has exactly one solution, it always finishes. The catch is the last step: any of the 63 possible bottom rows can be left over, each with its own top-row fix, which is too many to learn. Instead, after chasing down, try top-row presses and chase down again after each try until the bottom row clears; one combination always works.
Can every Lights Out board be solved?
Only on some grid sizes. On the 3×3 grid every pattern of lights can be turned off, and in exactly one way. On the classic 5×5 grid, only 1 pattern in 4 can be solved, and each one that can has 4 different solutions. On the 4×4 grid, only 1 pattern in 16 can be solved, with 16 solutions each. The 6×6 grid is like the 3×3: every pattern can be solved, in exactly one way. That is why a randomly scrambled board might be impossible, and why every board here is made by pressing lights rather than by switching random lights on.
The hardest-looking start, every light on, can be solved on the 5×5 grid. It takes 15 presses at best.
Where Lights Out comes from
Lights Out was released as a handheld electronic game by Tiger Electronics in 1995, with a 5×5 grid of lit buttons. The puzzle has since become a favorite example in introductions to linear algebra, because the press-twice-does-nothing rule is exactly arithmetic modulo 2.
For another puzzle with a provably shortest answer, try the Tower of Hanoi or the Water Jug Puzzle.