Lights Out – Turn Off Every Light in This Puzzle
Press a cell and it flips itself and its four neighbors. Turn all the lights off to win. Choose 3×3 to 7×7; boards are built by working backwards from a solution, so each one is solvable. If you get stuck, press "Hint" to see the next move of a shortest solution. Also try Sliding Puzzle or Minesweeper.
🔒 Runs in your browser · Your data is never sent to a server
- Moves
- 0
- Lights on
- 0
- Hints used
- 0
How to use
- Choose a board size. A new game starts as soon as you pick one.
- Click or tap a cell to flip its light and the lights above, below, left and right of it.
- Turn every light off to win. If you are stuck, press "Hint" and the cell to press is highlighted.
- Press "Restart" to replay the same board, or "New game" for a different one.
Notes
- Each board is made by pressing random cells on an all-off board, so it is always solvable and never starts already solved.
- "Hint" shows one move of a shortest solution for the current board. If you press a different cell, the shortest solution is recalculated for the new board.
- Moves count your presses. "Restart" resets both moves and hints used to 0.
- Progress is not saved. Reloading the page starts a new game.
Glossary
Lights Out
A puzzle on a grid of lights where pressing a cell flips that light and its four neighbors. The goal is to turn every light off.
GF(2)
The number system with only 0 and 1, where addition is XOR (same gives 0, different gives 1). Lights Out becomes a system of equations over GF(2), with each cell either pressed (1) or not (0).
FAQ
Is every Lights Out board solvable?
Yes. Boards are made by pressing random cells on an all-off board, so pressing the same cells again always turns every light off. A board that is already solved is never dealt.
How does the hint find a shortest solution?
It writes "press or not" for each cell as 0 or 1 and solves the resulting equations over GF(2) (XOR arithmetic) with Gaussian elimination. When a board has several solutions, as 4×4 and 5×5 can, it picks the one with the fewest presses.
What happens if I press the same cell twice?
The board returns to how it was, because each press flips the same lights again. A shortest solution never presses a cell twice, and the order of presses does not change the result.
Does the board size change the difficulty?
Yes. 3×3 is quick, while 5×5 and larger have many more combinations of cells to press. 4×4 and 5×5 can have more than one solution, so some shortest solutions leave certain cells unpressed.
Share this page
