This is a Python implementation of a maze generator and solver. Develop massive mazes, solve them using various algorithms, and compare the costs of each algorithm on each size of maze.
MazeSolver.mov
Before running the game, ensure you have the following installed:
- Python 3.10 or higher
pygamelibrary
- Maze Generation: Randomized maze creation using recursive backtracking.
- Pathfinding Algorithms: Solve the maze using DFS, BFS, or A* with visual animations.
- Interactive UI: Built-in menu to start generation, select algorithms, and observe real-time progress.
- Customizable Grid: Modify the number of rows and columns for different maze sizes.
MazeSolver/
├── main.py
├── game.py
├── gamestate.py
├── menu.py
├── menuitems.py
├── objects.py
├── settings.py
├── Assets/
│ ├── Tile1.png
│ └── ...
├── ...
- Clone the repository.
git clone https://github.com/meshhi13/MazeSolver- Navigate to the project directory.
cd MazeSolver- Run the game using the following command:
python main.py-
Objective: Find a path from the start to the end of a generated maze using a search algorithm.
-
Controls:
- Menu: Customize the generated maze and algorithm in the menu screen.
- Generate and Solve: A random maze is autogenerated, then you can select the algorithm to run by clicking on the "ALGO" button. Once ready, click the "SOLVE MAZE" button to see the action and the cost.
- Reset: Continue by either resetting the maze, or restarting completely and generating a new maze.
Visualize maze-solving like never before!