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]

In Beat Saber how do I disable TinyTAN avatars on BTS songs? In Beat Saber how do I disable TinyTAN avatars on BTS songs?

Posted On: March 3, 2023
Sometimes while playing Beat Saber's BTS Music Pack, TinyTAN avatars will appear mid-song and start flying around. The extra distraction makes it difficult to play Expert or Expert+ tracks. Is ...[More]


Why dont I have permission to use WorldEdit? Why dont I have permission to use WorldEdit?

Posted On: February 13, 2023
I'm trying to install WorldEdit, and I've done the following:. Gotten the craftbukkit JAR, run it, stopped it, replaced world with my save from single, run again, stopped again, ...[More]


What does it mean when Im cowering in fear? What does it mean when Im cowering in fear?

Posted On: November 27, 2023
In the Kero Sewers, enemy Boos sometimes use a Scream attack that makes one of my party members cower in fear with a purple aura around them. The scared party member can seemingly still fight like nor...[More]


How do I prioritize local hydrogen over remote hydrogen from a gas giant? How do I prioritize local hydrogen over remote hydrogen from a gas giant?

Posted On: January 13, 2023
I recently exploited my local gas giant for hydrogen and fire ice, which is quite useful. The main reason was to get started on deuterium production for various advanced items. But I just noticed that...[More]


What is the console command to undo expulsion from House Hlaalu? What is the console command to undo expulsion from House Hlaalu?

Posted On: March 17, 2024
I accidentally got expelled from House Hlaalu in The Elder Scrolls III: Morrowind, and I'm not in a situation where I can easily make amends, so I would like to use the console to easily get out of th...[More]


What does disliking a player do in DOTA 2? What does disliking a player do in DOTA 2?

Posted On: October 18, 2023
If I click "dislike player" after a match, what does that do? Question from user nightblade9 at stackexchange. Answer: Dota 2 Summer 2023 Patch notes state:. Additionally, we&rsq...[More]


What is the difference between Minecraft java edition and bedrock edition? What is the difference between Minecraft java edition and bedrock edition?

Posted On: March 14, 2024
I have just recently started playing Minecraft again after a 4 or 5 year hiatus (java edition ~v1.8 apparently), so I have a couple questions:.What's the difference between Minecraft Java Edition and ...[More]


How do I get the space shuttle launch in Gameboy Tetris? How do I get the space shuttle launch in Gameboy Tetris?

Posted On: February 12, 2023
I've been playing Tetris on the virtual Gameboy console on my Nintendo Switch. As a kid, with an actual Gameboy, I remember getting to see a space shuttle launch after doing well enough on an A-Ty...[More]


What Pokemon characteristics are immutable as of gen 9 games? What Pokemon characteristics are immutable as of gen 9 games?

Posted On: February 6, 2023
I'm picking up Pokemon games with Violet and learning about every additions made to the game since gen 2, I'm having a hard time figuring out what are the Pokemon characteristics you can't change thro...[More]


What is the name of this shader pack? What is the name of this shader pack?

Posted On: March 22, 2024
I have always seen this shader pack throughout the internet, but I could never find any info about what it was called. (The main differences are the clouds and the water reflections.).Screenshot.Quest...[More]