Skip to content

solvictor/n-puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

n-puzzle

42 Algorithm project that solve n-puzzle

Requirements

python >= 3.9

Usage

git clone https://github.com/solvictor/n-puzzle
cd n-puzzle
pip install -r requirements.txt
python3 sources/n-puzzle.py -h

Features

  • 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
  • Visualizer
    • Visualize N x M grids being solved
    • Change move speed
  • 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)