An algorithm for automatically solving Wayout and Wayout 2 puzzles (games based on the Lights Out mechanic). I did not aim to implement a user-friendly interface, the only goal was the algorithm.
- C++17
- Boost Test Library
> cmake CMakeLists.txt
> make
> ctest # testing
> ./bin/WayOut1Solver FILE # solve a WayOut level from FILE
> ./bin/WayOut2Solver FILE # solve a WayOut2 level from FILE
> ./bin/WayOut1Solver # enter the level you want to solve
Also, you can make the special version of the program, which log algorithm decisions in the console output:
> make WayOut1Logging
> make WayOut2Logging
> ./bin/WayOut1Loggin ...
You can see the format for representing WayOut levels, just run the program without arguments:
The positions of the coordinate axes for both games are shown below.
Solver coding:
.X.X..
.yyyy.
XYYYY.
.YYyy.
XyyyYX
.X.X.X
Solver coding:
..o.___
.O__.__
._.XO._
._._._O
_o.Oo_.
__.__.o
___..O.