This project is an implementation of the Depth-First Search (DFS) and A* algorithms for solving puzzles. The DFS and A* algorithms are used to find the shortest path from the starting point to the ending point on the puzzle.
- Implementation of the DFS and A* algorithms for solving puzzles
- Generation of random puzzles with adjustable size
- Display of the shortest path found by the DFS and A* algorithms
- Comparison of the execution time between the DFS and A* algorithms
- Python 3.x
- Pygame
- Clone this repository to your local directory
- Install Pygame by running the command
pip install pygame
in the terminal - Run the
main.py
file by running the commandpython main.py
in the terminal - Wait for the puzzle to be generated and the DFS and A* algorithms to solve it
This project is licensed under the MIT License.