Pathfinding Algorithm Visualization
This project visualizes two pathfinding algorithms, Dijkstra's and A*, using Python and the PyGame library. The goal is to let users interactively create start and end points, set barriers, and watch the algorithm find the shortest path in real-time.
demo.mp4
How It Works:
- Choose Algorithm: Press A for A* or D for Dijkstra.
- Set Start & End: Left-click to place the start (coral color) and end (steel blue color) points on the grid. The first click will set the start point, and the second click will set the end point.
- Add Barriers: Left-click to add barriers (dark gray color) to the grid after setting the start and end points.
- Run the Algorithm: Press Space to start the selected algorithm and visualize the process.
- Reset: Press C to clear the grid and start again.
Color Guide:
- Lime: Nodes that are in the open set and are currently being evaluated.
- Crimson: Closed nodes that have already been evaluated.
- Purple: Final path from start to end.
- White: Unvisited nodes, representing empty space.