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]

Avoiding detection while hacking the computer in one step ahead Avoiding detection while hacking the computer in one step ahead

Posted On: October 22, 2023
I'm on New Game Plus x2 (NG+2) in Starfield (PC). On my first run, I completed the "One Step Ahead" Ryujin quest by going to CeltCorp, waiting until the security officer left the office ...[More]


How do supercharged slots work? How do supercharged slots work?

Posted On: April 19, 2024
I came back to No Man's Sky and a few things regarding the inventory have changed in the last months. Now I have some violet slots that are marked as supercharged.As I understood, the tech installed i...[More]


In Dead Cells Does hitting bells in the Clock Tower do anything? In Dead Cells Does hitting bells in the Clock Tower do anything?

Posted On: April 8, 2023
In the Clock Tower there are bells I can hit to make a ringing noise and a a visible wave. It doesn't seem to have any effect on enemies. Is there any purpose to hitting these bells? Question f...[More]


In the Witcher 3, what quests become unavailable after Capture the Castle? In the Witcher 3, what quests become unavailable after Capture the Castle?

Posted On: February 20, 2023
I am up to the main quest "Capture the Castle" in the Blood & Wine DLC. While going to the mission, I got a warning telling me that doing this quest may result in some side quests becomi...[More]


Why isnt Diep.io loading? Why isnt Diep.io loading?

Posted On: February 2, 2023
I have just got on to diep.io, and it is stuck on the "Connecting" screen. The tab also keeps refreshing. I see many errors on my developer tools when I press the F12 key.I am using a Windows 10 Surfa...[More]


Can I repair my crew during battle? Can I repair my crew during battle?

Posted On: May 20, 2023
I can rearm at the checkpoint, but can I repair my crew? I heard rumors that I can do it, but I haven't found confirmation of this. Any information is welcome. Question from user dos4dev ...[More]


Is there a minimum amount of Zen that I should offer to buy on the dilithium exchange? Is there a minimum amount of Zen that I should offer to buy on the dilithium exchange?

Posted On: January 20, 2023
I offered to buy ~20 Zen for 500 dilithium per zen on the exchange, but it hasn't been picked up yet. Is that because the exchange is now "broken" and exchanges take forever, or is it be...[More]


Why is Hogwarts legacy such a crap game? Why is Hogwarts legacy such a crap game?

Posted On: July 4, 2023
Literally the shadow troll boss is the most bullshit thing gaming has ever endured. Loading screens are everywhere the characters movement is diabolical and the mix of unblockable attacks with norm...[More]


Dwarf Fortress Tree-cutting quota: where to check? Dwarf Fortress Tree-cutting quota: where to check?

Posted On: April 27, 2023
My barony has been scolded by a Elf Diplomat:. You have disrespected the trees in this area, but this is what we have come to expect from your stunted kind. Further abuse cannot be tolerated. Let t...[More]


Can I give the naked stalking courier his clothes back? Can I give the naked stalking courier his clothes back?

Posted On: April 8, 2013
The courier who frequently delivers you letters to start quest chains got killed outside of Riften by the guards. Not wanting to let a perfectly good dead body go to waste I decided to loot it, includ...[More]