Light Flip is a switching puzzle: a grid of lights, some on and some off, where every press flips a light and its neighbors. Switch the whole grid off, ideally in as few presses as possible. It plays by the same rules as the classic Lights Out handheld, on five grid sizes from a 9-light warm-up to 49 lights.
Light Flip rules
Pressing a square flips it and the squares directly beside, above, and below it. Lit squares go dark and dark squares light up. A square in the middle of the grid flips five lights, a square on an edge flips four, and a corner flips three. Diagonal neighbors are never touched.
The puzzle is solved when every light is off. There's no limit on time or presses, but Moves shows how many you've used, and Par shows the fewest that can do it. Undo works because pressing the same square again flips the same lights back.
Five sizes, from 3×3 to 7×7
Under New puzzle, choose 3×3, 4×4, 5×5, 6×6, or 7×7. 5×5 is the default and the size of the original handheld game. Each pattern is made by pressing random squares on a dark grid, and the game looks for one where par is at least about a third of the squares: 3 presses on 3×3, 5 on 4×4, 8 on 5×5, 12 on 6×6, and 16 on 7×7. That keeps puzzles from falling to one or two lucky taps.
If you change the size halfway through a puzzle, your lights stay put until you press Start a new puzzle.
Par, stars, and records
Par is worked out for every puzzle by checking every possible solution and counting its presses. When the last light goes out, you get stars:
- Three stars for matching par.
- Two stars for staying within a third of the board's squares above par: up to 3 extra presses on 3×3, 6 on 4×4, 9 on 5×5, 12 on 6×6, and 17 on 7×7.
- One star for any other solve.
Hints don't cost stars, and presses you undo don't count. Try again replays the same pattern with a fresh clock so you can go for par. Your records keeps puzzles solved, solves at par, and your best time for each size, and Reset records clears them.
Hints, undo, and restart
Hint rings one square to press. It comes from the shortest way to finish from the lights you have now, not from the start, so it still helps after a few wrong turns. It picks the square nearest the last one you touched, and the status line says how many presses are left.
Undo takes back one press at a time, all the way to the start. Restart puts the starting pattern back in one go, though the clock keeps running.
How to solve Light Flip: light chasing
You can solve any Light Flip puzzle by hand with a method called light chasing:
- Look at the top row. For every light that's on, press the square directly below it. The top row is now dark.
- Do the same for the second row, pressing squares in the third row, and so on down the board.
- When you reach the bottom, every light that's left is in the last row.
- That row tells you which top-row squares to press. Press them, chase the lights down again, and the board goes dark.
The table for the last step depends on the board size, and you can work one out with pencil and paper. Light chasing is easy to remember but often takes extra presses, because some squares get pressed in both passes, so it may not match par.
The math behind Light Flip: arithmetic mod 2
Light Flip is linear algebra in disguise. Write each light as 1 for on and 0 for off, and do arithmetic mod 2, where 1 + 1 = 0. A press adds 1 to five squares, or fewer at an edge. Two facts follow. The order of presses doesn't matter, because addition doesn't care about order. And pressing a square twice adds 2, which is 0, so it does nothing.
That makes a solution a simple choice of which squares to press, one yes-or-no unknown per square. Each light gives one equation: the presses that touch it must add up to 1 if it's on, or 0 if it's off. The game solves those 25 equations on a 5×5 board, or 49 on 7×7, with Gaussian elimination, the same method used for ordinary simultaneous equations, then compares every solution to find par.
Which patterns can be switched off?
It depends on the size. Checked with the game's own solver:
- 3×3, 6×6, and 7×7: every pattern can be switched off, and exactly one set of squares does it.
- 5×5: only one random pattern in four can be solved, and each solvable one has exactly four solutions. A single lit corner can never be cleared, and a fully lit board takes 15 presses at best.
- 4×4: only one random pattern in 16 can be solved, and each solvable one has 16 solutions.
The extra solutions come from quiet patterns: sets of presses that flip every light an even number of times, so they change nothing. Add one to a solution and you get another. Because every puzzle here is made by pressing squares on a dark grid, pressing the same squares again always switches it off, on every size. For another game with a neat bit of binary math behind it, try Nim.
Tap, arrow keys, and spoken lights
Every light on the grid is a real button, so one board works by touch, mouse, or keyboard, with Undo, Restart, and Hint just below it:
- Touch or mouse: tap or click a light to press it. Once the last light goes out, the grid stops responding until you pick Try again or New puzzle.
- Keyboard: Tab to the grid, move with the arrow keys, and press Enter or Space. Z or U undoes, R restarts, and H gives a hint.
- Screen readers: each light is labeled with its row, column, and whether it's on or off, a hinted light adds "suggested", and the status line says how many are still on after each press.
From Merlin and XL-25 to the 1995 Lights Out handheld
Lights Out was an electronic handheld game released by Tiger Electronics in 1995, with a 5×5 grid of light-up buttons. Similar games came before it, such as Merlin from Parker Brothers in the 1970s, which had a version on a 3×3 grid, and XL-25 from Vulcan Electronics in 1983. Its creators included Gyora Benedek, who also invented Hidato, a number-chain puzzle like our Number Path.
In 1998, Marlow Anderson and Todd Feil used linear algebra in Mathematics Magazine to prove that not every 5×5 pattern can be solved, and that every solvable one has exactly four solutions. Lights Out and Hidato are trademarks. Light Flip was written from scratch for this site and isn't affiliated with their owners.
Progress kept between visits
Your grid size, your records for each size, and the puzzle in progress, down to the squares you've pressed, the hints you've used, and the clock, sit in one local storage entry in this browser, so you can close the tab halfway through a chase and pick it up later. A solved puzzle isn't kept, so reloading after the last light goes out deals a fresh pattern.
You need a connection to load the page. After that, patterns and par are worked out in your browser, and your presses and times aren't sent to a server. The privacy policy names the stored entry.