This project is an implementation of the A* pathfinding algorithm using Python and Pygame for visualization. The A* algorithm finds the shortest path from a start point to a goal point on a grid.
- A* pathfinding algorithm implementation.
- Real-time visualization using Pygame.
- User-defined grid size and start/goal points.
- Separation of concerns using classes for nodes, board, and rendering.
- Clean and modular code structure.
Before running this program, you must install Python and Pygame on your system. If you don't have Pygame installed, you can install it using pip:
pip install pygame
- Clone this repository to your local machine:
git clone https://github.com/gabrielhsdev/A_star_simple.git
- Navigate to the project directory:
cd your-repo-name
- Run the
main.py
script to start the A* pathfinding algorithm visualization.
python main.py
-
Use the following controls:
- On main.py, you can set the number of nodes, where the walls are, and start/end coordinates
- run the main.py file to visualize the program running
You can customize the project by modifying the following:
- Grid size and resolution.
- Start and goal points.
- Obstacle generation.
Contributions are welcome! If you have any ideas for improvements or find any issues, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.