Skip to content

An algorithm for automatically solving Wayout and Wayout 2 puzzles (games based on the Lights Out mechanic). Implemented with C++17 and Boost Test Library

License

Notifications You must be signed in to change notification settings

2lx/wayout_solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wayout_solver

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.

Required

  • C++17
  • Boost Test Library

Installing

> 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 ...

Level format

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.

About

An algorithm for automatically solving Wayout and Wayout 2 puzzles (games based on the Lights Out mechanic). Implemented with C++17 and Boost Test Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published