Skip to content

Implementing Sliding Puzzle with DFS, BFS, and A* (with 3 heuristics) for the sliding puzzle game

Notifications You must be signed in to change notification settings

ridwant/Sliding-Tile-Puzzle

Repository files navigation

# I have implemented AStarH3 (Linear Conflicts Heuristics) for extra credit

# This project is done using python3. Please download and install python3 if not already installed 
python3: https://www.python.org/downloads/ 


# install dependencies like numpy, argparse and sortedcontainers. sortedcontainers is a must as I have used this to sort a list of tuples

pip install numpy
pip install argparse
pip install sortedcontainers

# Specific instructions can be found here: 

numpy: https://numpy.org/install/
argparse: https://pypi.org/project/argparse/
sortedcontainers: https://pypi.org/project/sortedcontainers/


# Keep all the python files in one folder. Run the code using the command below (format given): 
 
python3 SolvePuzzle.py problem.txt method tmax solution.txt


# method is the name of the method to be used. It can be one of the following:
DFS, BFS, AStarH0, AStarH1, AStarH2 and AStarH3 (I have done the AStarH3 for extra credit)

About

Implementing Sliding Puzzle with DFS, BFS, and A* (with 3 heuristics) for the sliding puzzle game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages