Lights Out

A logic puzzle on a 5×5 board: each tap turns a light on or off along with the four next to it, and the goal is to leave them all off. Pick the level, ask for a hint if you get stuck and see the minimum number of taps. Free, no sign-up.

Taps0
Minimum–
Best–

Tap a cell to flip its light and those above, below, left and right of it. Leave everything off. With the keyboard: the arrow keys move around the board and Enter or the space bar tap.

How to play Lights Out

  1. Choose the level. The harder it is, the more lights are on at the start. The board has 5×5 cells and is always built to be solvable.
  2. Tap a cell: it flips (if it was on it goes off and vice versa) and so do the cells above, below, left and right of it. At the edges and corners there are fewer neighbors.
  3. Keep tapping until all the lights are off. The number of taps and the minimum possible are shown above the board.
  4. If you get stuck, use Hint: it marks a cell that is part of the shortest solution from the current position. With Restart you go back to the starting board without changing games.

The logic of the lights

This puzzle has two properties that help you think. First, the order of the taps does not matter: the result depends only on which cells you tapped and how many times. Second, tapping the same cell twice changes nothing, so in a solution each cell is tapped at most once. That is why the minimum number of taps is almost always lower than the number of taps used to build the board.

A widely used technique is chasing the lights: go through the rows from top to bottom and, for each light that is on in a row, tap the cell right below it; this pushes the lights towards the last row. When you reach the bottom, one of a few possible patterns is left, and each tells you which cells of the first row you should have tapped before starting.

The hint uses algebra: the problem is a system of equations with values 0 and 1, solved by Gaussian elimination. On a 5×5 board there are more than 33 million configurations, and only one in four can be turned off; the games here are built by tapping cells from the all-off board, so you never end up with an impossible one. Everything runs in your browser and only your best result for each level is saved on your device.

Things to keep in mind

Frequently asked questions

What is the goal of the game?

To leave all 25 lights off. Each tap flips the tapped cell and its neighbors above, below, left and right.

Does it always have a solution?

Yes. Each game is built by applying taps from the all-off board, so undoing those taps gets you back to the start.

What does the Hint button do?

It calculates the solution with the fewest taps from the current position and marks one of its cells. You can ask for it as many times as you like.

Does the order in which I tap the cells matter?

No. What counts is which cells you tapped and whether it was an even or odd number of times. Tapping the same cell twice is the same as not tapping it.

Is there a strategy to solve it by hand?

Yes: go through the rows from top to bottom and tap the cell below each light that is on, until the lights are all in the last row. The pattern left there tells you what to tap in the first row.

Is it free? Do I need to install anything?

It is free, needs no sign-up or installation and works on phones and computers.