Strategy for solving Lights Out puzzle

[BACK]
Strategy for solving Lights Out puzzle
Posted On: August 26, 2023

Lights Out is a grid-based puzzle where each cell has two states: on/off. You can swap the state of any cell, but when you do so, the adjacent cells (horizontally or vertically) are swapped as well. Given initial the grid with random states, the objective is to set all cells to off state.


However, I've never been able to develop a strategy of how to solve (by hand) this type of puzzle. Usually I end up switching cells at random. What kinds of strategy are available for solving this game?


There are many variations of this puzzle, but I'm only interested in the classic one.


This puzzle is available in many grid sizes. It's desirable, but not required, that the proposed strategies work on all grid sizes.


My usual (and flawed) strategy is trying to clear row after row, from the top to the bottom. Unfortunately, I end up unable to clear the last row, and then I just start swapping cells at random, or just ragequit altogether.


There is an open-source and multi-platform implementation called flip as part of Simon Tatham's Portable Puzzle Collection.


Question from user Denilson Sá Maia at stackexchange.


Answer:

The method I'm about to explain technically works for any size grid, but it requires some knowledge that I don't know how to determine from scratch. If you want to do some searching online related to it, the method is generally referred to as "chasing lights" or "chasing the lights".


Start by pushing the buttons on the second row corresponding to the lit cells on the top row, then the buttons on the third row corresponding to the lit cells in the second row, etc. This is exactly what you were already doing, chasing the lights down to the bottom row, which is where the name comes from. .


Now, as you know, the tricky part comes when you've got a grid that's blank except for the bottom row. At this point, the way to finalize it is to push some specific buttons on the first row corresponding to the lit cells on the bottom row, and then chase the lights down from the top again. If you pushed the right first-row buttons, when you complete the second chase, the puzzle will be solved.


As far as I know, you have to just know which buttons to push on the top row to correspond to a specific pattern that was left on the bottom row after the initial chase. If you can figure out a method of determining the right ones to push on the top, you can probably use a very similar method to generalize this to any size grid. I don't know a method for this though, so I'll, uh, leave that as an exercise to the reader.


For the classic 5x5 version of the puzzle, it turns out that there are only 7 possible patterns on the bottom row after the initial chase down, so I'm just going to list the 7 possible patterns and the corresponding first-row buttons to press for each. Buttons are numbered from left to right.


Answer from user Chad Birch at stackexchange.



[BACK]
Strategy for solving Lights Out puzzle
Posted On: August 26, 2023

Lights Out is a grid-based puzzle where each cell has two states: on/off. You can swap the state of any cell, but when you do so, the adjacent cells (horizontally or vertically) are swapped as well. Given initial the grid with random states, the objective is to set all cells to off state.


However, I've never been able to develop a strategy of how to solve (by hand) this type of puzzle. Usually I end up switching cells at random. What kinds of strategy are available for solving this game?


There are many variations of this puzzle, but I'm only interested in the classic one.


This puzzle is available in many grid sizes. It's desirable, but not required, that the proposed strategies work on all grid sizes.


My usual (and flawed) strategy is trying to clear row after row, from the top to the bottom. Unfortunately, I end up unable to clear the last row, and then I just start swapping cells at random, or just ragequit altogether.


There is an open-source and multi-platform implementation called flip as part of Simon Tatham's Portable Puzzle Collection.


Question from user Denilson Sá Maia at stackexchange.


Answer:

The method I'm about to explain technically works for any size grid, but it requires some knowledge that I don't know how to determine from scratch. If you want to do some searching online related to it, the method is generally referred to as "chasing lights" or "chasing the lights".


Start by pushing the buttons on the second row corresponding to the lit cells on the top row, then the buttons on the third row corresponding to the lit cells in the second row, etc. This is exactly what you were already doing, chasing the lights down to the bottom row, which is where the name comes from. .


Now, as you know, the tricky part comes when you've got a grid that's blank except for the bottom row. At this point, the way to finalize it is to push some specific buttons on the first row corresponding to the lit cells on the bottom row, and then chase the lights down from the top again. If you pushed the right first-row buttons, when you complete the second chase, the puzzle will be solved.


As far as I know, you have to just know which buttons to push on the top row to correspond to a specific pattern that was left on the bottom row after the initial chase. If you can figure out a method of determining the right ones to push on the top, you can probably use a very similar method to generalize this to any size grid. I don't know a method for this though, so I'll, uh, leave that as an exercise to the reader.


For the classic 5x5 version of the puzzle, it turns out that there are only 7 possible patterns on the bottom row after the initial chase down, so I'm just going to list the 7 possible patterns and the corresponding first-row buttons to press for each. Buttons are numbered from left to right.


Answer from user Chad Birch at stackexchange.



[BACK]

How do I fight ??? in Korone Box? How do I fight ??? in Korone Box?

Posted On: April 18, 2024
One of the achievements for WOWOWOW KORONE BOX says to "Defeat ??? on Hard Mode". Who is ??? and how do I fight them?Question from user Stevoisiak at gaming.stackexchange.com.Answer:??? is Dark Korone...[More]


In Hollow Knight, What is the creature that appears after beating False Knight? In Hollow Knight, What is the creature that appears after beating False Knight?

Posted On: February 16, 2023
Immediately after beating False Knight in Steel Soul mode this thing popped up and started scurrying away slowly: .What is it? I seem to be able to knock it around, but once I stop it quickly gets up ...[More]


Counterfeit NES - SNES Games-how to know if its fake? Counterfeit NES - SNES Games-how to know if its fake?

Posted On: February 2, 2023
The other day, i plugged in a copy of Mortal Kombat 3, and the console I was using was one of the new dual consoles(nes+snes games). I got a message at the start that said something about pirated game...[More]


What weapons do you associate with certain companions? What weapons do you associate with certain companions?

Posted On: March 17, 2026
So recently I googled "Lae'zel sword" and found two specific greatswords pop up, the soulbreaker sword and the silver sword of the astral plane. Personally, I associate Lae'zel with soulbreaker more, ...[More]


Tactical stance in COD MW3 - is there RL equivalent? Tactical stance in COD MW3 - is there RL equivalent?

Posted On: January 19, 2024
The new tactical stance in COD MW3 - is it based on reality? I can't imagine why holding a weapon tilted would give you an advantage in combat. Any insight? Question from user Boppity Bop at st...[More]


First time playing Hogwarts Legacy First time playing Hogwarts Legacy

Posted On: July 28, 2023
I haven't played this game yet and I've done a fantastic job at staying away from getting pretty much anything spoiled for me. That being said, what are some things (spoiler free please) that ...[More]


What Is the Best Y Level to Find Ancient Debris? What Is the Best Y Level to Find Ancient Debris?

Posted On: July 18, 2023
I was playing the new 1.16 snapshot and was wondering where the best place to look for ancient debris would be. Question from user PuppyLover101 at stackexchange. Answer: The best Y-coordinat...[More]


Does an achievement system exist on Nintendo Switch? Does an achievement system exist on Nintendo Switch?

Posted On: April 12, 2023
Does the Nintendo Switch have an achievement system like trophies on PlayStation or achievements on Xbox? Has Nintendo Switch any board with progress in games? Question from user TravelerVihaan ...[More]


How exactly does Dammon fix Karlach's engine? How exactly does Dammon fix Karlach's engine?

Posted On: September 24, 2025
I'm sure it's one of those things that are simply left up to the imagination, but still. How exactly does Dammon just fix Karlach's engine? Which is, presumably, in her chest?? Like, does he take it ...[More]


Is it possible to change powers without pausing in MegaMan Legacy? Is it possible to change powers without pausing in MegaMan Legacy?

Posted On: February 26, 2023
Is it possible to cycle through Megaman's powers without pausing the game in MegaMan Legacy Collection? Question from user Ryre at gaming.stackexchange.com. Answer: Unfortunately this is ...[More]