python >= 3.9
git clone https://github.com/solvictor/n-puzzle
cd n-puzzle
pip install -r requirements.txt
python3 n-puzzle.py -h
- Algorithms
- A*
- Uniform-Cost Search
- Greedy Search
- Iterative deepening A*
- Bidirectionnal A*
- Bidirectionnal Uniform-Cost Search
- Bidirectionnal Greedy Search
- Heuristics
- Misplaced count
- Manhattan distance
- Euclidean distance
- Chebyshev distance
- Manhattan with linear conflicts
- Pattern database
- Generator
- Generate
N x M
valid random grids - Generate
N x M
spiral goals
- Generate
- Visualizer
- Visualize
N x M
grids being solved - Change move speed
- Visualize
- Misc
- Custom goal handling
- Display computing time, space and time complexities, solution size and moves
- Solvability check
- Support for multiple input algorithms (executed in a row)
- Ranking on multiple algorithms
- CTRL-C Handling
- Verbose option (display every state of the puzzle between start and solution)