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]

Why does the Tinker aspect only work on some skills in Dead Cells? Why does the Tinker aspect only work on some skills in Dead Cells?

Posted On: April 12, 2023
The description for the Tinker aspect says "Reduce skill cooldown to 1 sec." In practice the cooldown seems to be unchanged on most abilities I've tried (Infantry Grenade, Pollo Power, Tonic, Face Fla...[More]


How do I make it so that a command only runs when Im at a certain position How do I make it so that a command only runs when Im at a certain position

Posted On: February 14, 2023
I'm trying to make it so that if someone goes to a certain coordinate, it will trigger a boss fight. I have a chain of commands set up to do this, but it can only activate when I pull a lever. ...[More]


What are the tactics associated with stunning weapons in FTL? What are the tactics associated with stunning weapons in FTL?

Posted On: July 8, 2023
In the advanced edition of FTL, a number of "stunning" weapons have been introduced whose primary function seems to be stunning the enemy crew for a certain number of seconds. Additionall...[More]


I deleted the portal to the end city in minecraft I deleted the portal to the end city in minecraft

Posted On: February 3, 2023
I was messing around with my Minecraft world and accidentally deleted the portal on the main end island that leads to the first end city (don't ask me how). Does anyone know how I can put it ba...[More]


Does closing the game reset Blood Moons timer in Breath Of The Wild? Does closing the game reset Blood Moons timer in Breath Of The Wild?

Posted On: July 23, 2023
According to Zelda dungeon, Blood Moon regularly occurs every 2 hours and 48 minutes of gameplay (every unskipped 7 days in-game). Another answer confirms that it's a time-based event. So I&...[More]


Getting Rich and Powerful Off Villager Trades Getting Rich and Powerful Off Villager Trades

Posted On: June 16, 2021
On the surface, villagers really don’t seem like much. They’re helpless, annoying, and not very bright. What they need is a great leader to guide them to a promising future. And by that, I...[More]


in Zelda, Are the names of lightroots the names of shrines spelled backwards? in Zelda, Are the names of lightroots the names of shrines spelled backwards?

Posted On: June 22, 2023
Looking at your map in Tears of the Kingdom, you might notice that each lightroot is directly beneath a shrine. However, something I noticed when watching a video on Youtube is that the Nisoij lightro...[More]


Cant revivify a Panzer Vulpaphyla Cant revivify a Panzer Vulpaphyla

Posted On: January 1, 2024
I'm trying to revivify a Panzer Vulpaphyla in the game Warframe by going to Son, but the game won't let me. I go to Son's menu and click on Panzer Vulpaphyla, then I choose a random mut...[More]


What happens to the Master Builder when using the Battle Machine? What happens to the Master Builder when using the Battle Machine?

Posted On: July 11, 2023
I haven't unlocked/rebuilt the Battle Machine yet in CoC Builder Base. . Since the Master Builder "operates" the Battle Machine during an attack, can you use the Battle Machine for at...[More]


Steam Invalid SSL Certificate Steam Invalid SSL Certificate

Posted On: June 12, 2023
For the past few months I have been having an issue with Steam, and I have finally decided to ask about it. I've looked up solutions but none of them work, and nobody else has seemed to have had t...[More]