Lights Out Puzzle
Press a cell to toggle it and its neighbours — switch every light off
Loading the tool…
Lights Out is a puzzle in which pressing a cell switches it and its neighbours. Switch every light off; the page also shows the fewest presses that can clear each board.
How to use
- Under "Mode", choose "Free play" or "Stages".
- In free play, choose the "Board size" (3×3 to 7×7) and "What a press toggles", and turn on wrap-around if you like.
- Press cells to switch the lights off. "Moves", "Fewest possible" and "Lights on" are shown as you play.
- If you are stuck, press "Hint" to see one cell to press, or "Show solution". "Undo" and "New board" are also available.
How it works
- Pressing the same cell twice cancels out, and the order of presses does not matter. So a solution is a set of cells, each pressed once.
- Every board is made by pressing random cells on a dark board, so it can always be cleared. The fewest moves come from solving equations in which 1 + 1 = 0 (Gaussian elimination over GF(2)).
- There are 30 stages from 3×3 to 7×7, all with the standard rule (the cell and its 4 neighbours). The board in progress and your cleared stages are saved in this browser.
Questions and answers
- How do you solve Lights Out?
- Work down from the top row: for each light that is on, press the cell directly below it. When only the bottom row has lights left, its pattern tells you which cells to press in the top row; then work down again.
- Can every Lights Out board be solved?
- Not every random pattern can be solved; on a 5×5 board, for example, only some patterns are solvable. The boards on this page are made backwards from a dark board, so all of them can be solved.
- What happens if I press the same cell twice?
- The second press undoes the first, so every changed light returns to how it was. That is why a shortest solution never presses a cell twice.
- What do the diagonal pattern and wrap-around do?
- With the diagonal pattern, a press switches the cell and its 4 diagonal neighbours. With wrap-around, a press at an edge also switches the cell on the opposite edge.