FastMysticSquare is a very fast solver of the 15 Puzzle Problem, written in C++.
- Compiler with C++17 support;
- CMake as build generator (
version >= 3.14
).
CMAKE_BUILD_TYPE
specifies the type:Release
orDebug
(default);BUILD_TESTS
specifies whether you want to build unit tests:OFF
(default) orON
;CMAKE_INSTALL_PREFIX
the installation prefix (default:/usr/local
on UNIX andC:/Program Files
on Windows).
- Clone the repository and open the project directory:
git clone https://github.com/BiagioFesta/FastMysticSquare.git
cd FastMysticSquare
- Create a build directory:
mkdir build
cd build
- Generate compilation files:
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=./opt ..
- Run compilation:
cmake --build . --config Release
- Install executable:
cmake --install . --config Release
Usage:
./opt/bin/FastMysticSquare [OPTION...]
-h, --help Display this help message.
-a, --algorithm {MANHATTAN|PATTERN}
Select the heuristic algorithm to use.
-s, --state {RANDOM|0,1,2,3,...}
Select the initial state of the problem.
-i, --interactive Enables the interactive mode.