Skip to content

A sliding puzzle solver using the A* search algorithm with several heuristics.

Notifications You must be signed in to change notification settings

Eutienne/N-Puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N-PUZZLE

A sliding puzzle solver using the A* search algorithm with several heuristics.

The goal is to solve in a snail pattern, with a target of under 10 seconds for puzzle size 3. See the subject for more details.

starting 8-puzzle goal 8-puzzle
drawing drawing
Usage : ./[executeble] [file] [--A_STAR*] [--GREEDY*] [--UNIFORM*]
        [--MANHATTAN / --m**] [--EUCLIDEAN / -e**] [--HAMMING / --h**] [--VERBOSE***]  

positional arguments:
    file                  input file

Optional choice of heuristic and search

-h, --help                  show this help message and exit

* : --A_STAR                use A_star search
    --GREEDY                use greedy search
    --UNIFORM               use uniform search

**: --MANHATTAN, --m        use manhattan heuristic
    --EUCLIDEAN, --e        use euclidean heuristic
    --HAMMING, --h          use manhattan heuristic

***:--VERBOSE               gui visualizer

Examples:

cmake -B build / cmake .
(cd build) / make
./N-puzzle_solver ../maps/3puzzle/3npuzzle1.txt

Output example

drawing

Play by yourself

If you build like befor, you can use ./N-puzzle_Manuel [file].
q = quit
            w = up
     a = left    d = right   
            s = down

drawing

About

A sliding puzzle solver using the A* search algorithm with several heuristics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published