Skip to the game
Tic Tac Toe

Light Flip

Press a square to flip it and its side neighbors, then switch every light off in as few presses as you can. Light Flip has five sizes, from 3×3 to 7×7.

Play Light Flip

5×5

Moves
0
Par
–
Time
0:00

Making a puzzle…

Pressing a square flips it and the squares beside, above, and below it: lit ones go dark and dark ones light up. Switch every light off. Par is the fewest presses it can be done in. With a keyboard, move with the arrow keys and press Enter or Space; Z undoes, R restarts, and H gives a hint.

New puzzle
Size
Your records
SizeSolvedAt parBest time
3×300–
4×400–
5×500–
6×600–
7×700–

How it works

How to play Light Flip

Each press toggles a plus-shaped group of lights, so plan which squares to press rather than the order, and try to finish in par.

  1. Step 01

    Press a light

    Tap or click any square. It flips along with the squares beside, above, and below it: lit ones go dark and dark ones light up.
  2. Step 02

    Switch them all off

    Keep pressing until every light in the grid is dark. Undo takes back a press, and Restart puts the pattern back the way it began.
  3. Step 03

    Match par

    Par is the fewest presses that can do it. Match it for three stars, or stay close to it for two.

Features

Light Flip with five sizes and a par to beat

  • Five sizes

    From a 3×3 warm-up to a 7×7 board with 49 lights. 5×5 is the classic size.

  • Always solvable

    Every pattern is made by pressing squares on a dark grid, so there's always a way back to dark.

  • Par and stars

    The game works out the fewest presses for every puzzle. Match par for three stars.

  • Undo and restart

    Take back a press, or put the starting pattern back, as often as you like.

  • Hints from the shortest solution

    A hint rings one square to press and says how many presses are left from where you are.

  • Every light is a button

    Move with the arrow keys, press with Enter or Space. Every light says whether it's on or off.

Strategy

Light Flip strategy: how to solve Lights Out puzzles

A little math makes this puzzle much easier. These ideas work on every board size.

  • Order doesn't matter

    Pressing A then B gives the same lights as B then A. Plan a solution as a set of squares, not a sequence.

  • Never press a square twice

    A second press undoes the first. A shortest solution presses each square once at most.

  • Chase the lights down

    Press the square below every lit light in the top row, and the top row goes dark. Repeat row by row, and whatever is left ends up in the bottom row.

  • Fix the bottom from the top

    The pattern left in the bottom row tells you which top-row squares to press. Press them, chase down again, and the board clears.

  • Use hints to learn

    A hint rings one square from the shortest way to finish and says how many presses are left. Hints don't cost stars, so use them to spot patterns.

About the game

Light Flip: the Lights Out switching puzzle

The rules, the five sizes, par and stars, controls, light chasing, the mod 2 math, and the handheld game this puzzle comes from.

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.

FAQ

Light Flip questions

Quick answers about Light Flip: the rules, par and stars, solvable patterns, light chasing, and saving.

How do you play Light Flip?

Press a square to flip it and the squares beside, above, and below it. Lit squares go dark and dark ones light up. Switch every light off to win, ideally in par.

Is Light Flip the same as Lights Out?

It uses the same rules as the Lights Out handheld from 1995: a press flips a light and its side neighbors. This version was written for this site and isn't affiliated with Lights Out or its makers.

Can every puzzle be solved?

Yes. Each pattern is made by pressing squares on a dark grid, so pressing the same squares again switches it off. Random patterns on 4×4 and 5×5 often can't be solved, but you'll never get one of those here.

What is par?

Par is the fewest presses that switch off all the lights, worked out for every puzzle. Match it for three stars. Two stars allow up to about a third of the board's squares over par.

Does the order of presses matter?

No. Only which squares you press counts, and pressing a square twice is the same as not pressing it at all. A shortest solution never presses a square twice.

How do you solve a Lights Out puzzle?

Light chasing works on any size: clear each row by pressing the squares below its lit lights, then use the pattern left in the bottom row to pick top-row presses and chase again. See the Light Flip strategy.

Why can't some patterns be solved?

On 4×4 and 5×5, the presses can't make every pattern. On 5×5 only one random pattern in four can be switched off, and a single lit corner never can. On 3×3, 6×6, and 7×7 every pattern can.

Do hints affect my stars?

No. Stars depend only on how many presses you use. A hint rings one square from the shortest way to finish from where you are, and says how many presses are left.

Does Light Flip remember the squares I've pressed?

Yes. Your size, records, and the puzzle in progress with every press are stored in this browser's local storage. Reset records wipes the records for every size but leaves the lights you're working on.