An interactive grid-based pathfinding visualizer built with Python and Pygame. This project demonstrates how the Breadth-First Search (BFS) algorithm explores a search space and guarantees finding the optimal (shortest) path in an unweighted grid, even when faced with complex asymmetrical mazes.
- Real-time BFS Visualization: Step-by-step exploration of nodes across the grid space.
- Guaranteed Optimal Path: Highlights the shortest route from the start node to the destination.
- Custom Maze Layouts: Implements asymmetrical wall structures to showcase the difference between optimal and suboptimal paths.
- Interactive UI: Dynamic rendering of visited nodes, active paths, and final route using Pygame.
- Language: Python 3.12+
- GUI Engine: pygame-ce (Pygame Community Edition)
- Data Structures: Queue (deque), NumPy arrays
-
Clone the repository: git clone https://github.com/shresthajitendra/AI-Pathfinding-Visualizer-Pygame.git
-
Go to project directory: cd AI-Pathfinding-Visualizer-Pygame
-
Install dependencies: pip install pygame-ce numpy
-
Run the visualizer: python main.py
- Add Reinforcement Learning (Q-Learning) agent for comparative pathfinding.
- Implement A* and Dijkstra algorithms.