Solving Lights Out

There are several ways you can solve Lights Out puzzles. You can go straight in with the maths (like my Javascript programs), you could use brute force (checking every possible solution - there is a PASCAL program that does this available at the Lights Out Fan Club site), or you can use a method which I call Light Chasing. It is this method that is described below. If you want to know why this method works, click here.

Light Chasing

We start by describing the algorithm for the standard 5x5 Lights Out. To begin, you turn out all the lights on the top row, by pressing the buttons on the second row that are directly underneath any lit buttons on the top row. The top row will then have all it's lights off.

Repeat this step for the second, third and fourth row. (i.e. chase the lights all the way down to the bottom row). This may have solved the puzzle already ( click here for an example of this ), but is more likely that there will now be some lights left on in the bottom row. If so, there are only 7 posible configurations. Depending on which configuration you are left with, you need to press some buttons in the top row. You can determine which buttons you need to press from the following table.

Lights on bottom row Press these on top row

After you have pressed the buttons in the top row, you now apply the Light Chasing algorithm again (i.e. turn the lights out row by row). This time the puzzle will definitely be solved when you reach the bottom row! Click here for another example.

Reducing the number of turns

The above algorithm will ensure that you always solve any puzzle on your first attempt! However, you will not usually have done so in the least number of moves. Indeed, sometimes it can take more than 10 moves over the minimum (so that the actual Lights Out game will not count the puzzle as solved). However, you can do much better if you are prepared to play the puzzle over again. To do this, use the algorithm as before, but take note of which buttons on the first row you had to press. When you replay the puzzle, push these buttons first! Then apply the algorithm as before. Now you will always solve the puzzle on the first run through.

Note that this still does not guarantee you the shortest possible solution! If you would like to know why this method works, and maybe get a clue as to how to always find the minimal solution click here.

Links to other Solution pages

If my description of the solution doesn't work for you, then first off let me know why! Once you've done that, you could try reading some other peoples descriptions

How to Solve Lights Out puzzles
Lights Out Solution
Lights Out at Jaap's Puzzle Page

All of the above pages describe essentially the same algorithm as the one presented above.