42 school project requires solving n-puzzle game with A* and similar algorithms, click this link for more info.
the project includes a web interface to experiment and play with, you can visit it here.
- solving 3*3 and 4*4 boards with optimal speed.
- using different algorithms
- A*
- IDA*
- using multiple heuristic functions
- manhattan distance
- linear conflict
- disjoint pattern database
- web api to visualize and experiment with the program.
theoretically the program can solve any bord size (n-puzzle), but in practice it will be to slow for boards bigger or equal to 5*5.
cmake, g++ or clang++
all those programs must be added to your path
git clone https://github.com/ZackChOfficial/n-puzzle.git
cd n-puzzle
./utils/configure.sh && ./utils/build.sh
node, npm, emscripten
cd web/public/wasm/
./configure.sh && ./build.sh
cd ../..
npm install
npm start
or you can visit it online at this link.
the program reads the board from the standard input and prints a bunch of useful data. example :
Type :
./buils/n-puzzle -h # for more info about usage