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]

What does the moon icon on a challenge mean? What does the moon icon on a challenge mean?

Posted On: January 26, 2023
Challenge M-015 has a yellow moon icon with a star on it. What does the moon icon mean?Question from user Stevoisiak at gaming.stackexchange.com.Answer:According to IGN, challenges with a crescent moo...[More]


Can you drop bottlecaps in Fallout 4? Can you drop bottlecaps in Fallout 4?

Posted On: July 15, 2023
I've found a few lonely bottlecaps out on the wastelands, but I was wondering if you can get them out of your inventory onto a table to make, say, a bottlecap pyramid. As a bonus question I was al...[More]


What weapon talent tree combination provides the highest dps with the flail and shield? What weapon talent tree combination provides the highest dps with the flail and shield?

Posted On: October 14, 2023
New World has a new expansion, and with it, a new weapon. I've been having a lot of fun with it and am still playing around with combinations. With most of the other weapons in the game, I'...[More]


Who killed the party people on the yacht in Max Payne 3? Who killed the party people on the yacht in Max Payne 3?

Posted On: April 11, 2023
I want to understand some details of the Panama mission; was the mission even part of the main story, contribute to it? Or is it shown as a side story, one episode from Max's past missions as the ...[More]


How do I give players already enchanted Tools - Armour - Weapons How do I give players already enchanted Tools - Armour - Weapons

Posted On: April 26, 2024
I'm making a map where I want players to be able to choose there kits/classes. The problem I'm having with it though is giving players already enchanted Tools/Armour/Weapons.I'm not sure if you can us...[More]


Can a cart system between 2 spawners work? Can a cart system between 2 spawners work?

Posted On: January 27, 2023
I have 2 spawners 63 blocks apart. I want to create a cart network so that I can.go front and back from a spawner to another for them to work in my xp farm since the spawning radius for a spawner is o...[More]


Is it possible to run RollerCoaster Tycoon 2 in windowed mode? Is it possible to run RollerCoaster Tycoon 2 in windowed mode?

Posted On: April 9, 2024
Is it possible to run RollerCoaster Tycoon 2 in windowed mode?I have Windows 7 and the game works, but since my resolution is bigger than the game can handle, I would prefer to play in windowed mode i...[More]


How to enable the lift to Engineering in Executive in System Shock? How to enable the lift to Engineering in Executive in System Shock?

Posted On: June 3, 2023
I'm in Executive trying to take the lift to Engineering but it is disabled and the PA says: "Elevator disabled. Biohazard emergency." I already went to the three groves and disabled t...[More]


Dungeons and Dragons Online, Good for Groups? Dungeons and Dragons Online, Good for Groups?

Posted On: June 11, 2023
I see that Dungeons and Dragons Online is now free to play. How is that game structured?. Do you create parties and travel?. Or is it more free world-ish?. I ask because I am looking for g...[More]


Who do you think your character would be after graduating Hogwarts? Who do you think your character would be after graduating Hogwarts?

Posted On: August 4, 2023
Mine would be either DADA teacher or an Auror. I know that there are limited options and probably your answers will be similar, but I'm curious what future would you see for your MC. Question f...[More]