This project is a Pac-Man-inspired maze solver that visualizes pathfinding algorithms in a randomly generated maze. It demonstrates how A Search* and Depth-First Search (DFS) algorithms work in real time.
- Generates a random maze with walls and open paths.
- Implements A Search* and DFS to find a path from Pac-Man's starting position to the goal.
- Animates Pac-Man’s movement along the solved path.
- Displays the path length for comparison between A* and DFS.
- Allows users to regenerate a new maze dynamically.
- Python for logic and algorithms.
- Pygame for graphical visualization.
- PriorityQueue & Stack for pathfinding implementation.
- Algorithm.py Contains A* and DFS implementations.
- Maze_GUI.py Handles Pygame rendering and maze generation.
- Main.py Runs the game loop and event handling.
- Install Dependencies
pip install pygame
- Run the main script
python Main.py
Press A to solve the maze using A Search*. Press D to solve using DFS. Press R to regenerate a new maze.
This project was developed by: