This project is a visualization of the A* algorithm using Pygame. The A* algorithm is a popular pathfinding algorithm used in various applications, including robotics and gaming.
The project provides a graphical interface where users can create a grid, place a start and end node, and add barriers. The A* algorithm then finds the shortest path between the start and end nodes while avoiding barriers.
- Interactive grid creation
- Placement of start and end nodes
- Addition of barriers
- Visualization of the A* algorithm
- Real-time pathfinding visualization
- Color-coded nodes for easy visualization
- Python
- Pygame library
- Clone the repository to your local machine.
- Install the required dependencies (
pygame
). - Run the
A_star_pygame.py
file. - Follow the on-screen instructions to interact with the visualization:
- Left-click to add start node, end node, or barriers.
- Right-click to remove nodes.
- Press the SPACE key to start the A* algorithm.
- Press the I key to start the BFS algorithm.
- Watch as the algorithm finds the shortest path between the start and end nodes.
- Implement additional pathfinding algorithms.
- Add more customization options for the grid and visualization.
- Optimize the code for better performance.
- Improve the user interface for better user experience.
Contributions are welcome! If you have any suggestions, bug fixes, or feature implementations, feel free to open an issue or submit a pull request.