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]

Too easy on normal in Hogwarts Legacy? Too easy on normal in Hogwarts Legacy?

Posted On: April 25, 2023
Hey all just wondering if there any others here who find this game really easy on normal mode? Also be curious to know if the same folks who find this quite easy play games like Dark Souls etc. I v...[More]


Why do I receive this birds paw buff sometimes in Elden Ring? Why do I receive this birds paw buff sometimes in Elden Ring?

Posted On: May 17, 2023
Sometimes I just randomly receive this buff with a bird’s paw icon for a short time. I assume it’s a discovery buff, just like from one of the consumables. Why do I get this buff? I notice...[More]


YO-KAI WATCH 2: Fleshy Souls - What donuts should I pick? YO-KAI WATCH 2: Fleshy Souls - What donuts should I pick?

Posted On: March 19, 2023
Right at the beginning of the game you are asked to choose between Soul Donuts and Spirit Donuts. Does this have any actual affect on the game? Does it matter what you pick? Question from user user...[More]


How can I throw more accurately? How can I throw more accurately?

Posted On: April 4, 2024
Between Grenades and Strategems I really need to up my throwing game. Are there any tips for being more accurate with throwing?I have seen an armour, I am yet to unlock (I am lv17) , which adds 30% to...[More]


Using bikes over karts in time trials in Mario Kart 8 Deluxe Using bikes over karts in time trials in Mario Kart 8 Deluxe

Posted On: April 27, 2023
I realized I never beaten staff times on MK8 and I'd like to give them a try. So, I watched several MK8 time trials on Youtube, and I noticed that bikes are often used. Is there a real advantag...[More]


Is there anything I can do about thieves in A Dark Room? Is there anything I can do about thieves in A Dark Room?

Posted On: May 12, 2023
Some thieves seem to have moved into my village, and are stealing much of what I can gather each turn. I'm currently assuming that eventually I'll encounter an event that will allow me to d...[More]


How can you resist him? How can you resist him?

Posted On: October 23, 2025
Question from user Fun-Explanation7233 at BaldursGate3 at reddit.com.Answer:I havent done much with him, but when he drinks your blood I couldnt get him to stop so I died.But I loveed his reaction whe...[More]


Do you guys use potions? Do you guys use potions?

Posted On: August 10, 2023
Dear Witches and wizards. Do you guys use potions, and if you do. Which ones do you use the most? Question from user ItsSolomon at HogwartsLegacyGaming at reddit. Answer: Yeah, I use them in ...[More]


How to unlock the Bandolier via ammo caches? How to unlock the Bandolier via ammo caches?

Posted On: March 17, 2024
Aside from buying the Bandolier as a tier3 item at the shop, I've read you can unlock it by other means, after accessing some secret exits in Chaos Generator and Marksman and hitting some switches. H...[More]


I’m completely stuck I’m completely stuck

Posted On: November 4, 2023
I think I’m on act 2, but sorry if I’m not for the tags, but anyway, I’ve been trying all day to complete this bit where you have to kill the Inquisitor person, I went into the porta...[More]