In 1995, Tiger Electronics put out the handheld game, Lights Out.
The premise of the game was simple. Sporting a 5x5 grid of lights, the object of the game was to turn out all of the lights. By pressing a button, the light underneath and on all 4 sides of that button were toggled, either on or off.
Using this method, the player had to think strategically about where to press to get them closer to having all of the lights out.
This application is designed to generate all the solvable states of the game, and using a breadth first search from the solved state, get the shortest path to solution for every state. Using the created solutions data set, the player can easily generate the fastest solution to solving any solvable board.
On starting the application, the user has to load the game solutions. If the user has never generated solutions before, the dataset will be generated and stored in a ./data folder.
Once generated they can be loaded. The generation process will only happen once, unless the user deletes ore moves the ./data folder.
With everything loaded, the Load button is swapped out with a New and Solve button.
The user can now enter their Lights Out board using the checkboxes.
Then the user can press Solve, and get their answer on how to beat the current Lights Out board.
There are boards that cannot be solved in Lights Out. If the player happens to enter one in a custom board, the application will let them know that the board is unsolvable.