Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/klihe/astar-visualization
I am trying to implement *a path finding algorithm and create a visualization of it with Python and numpy library
https://github.com/klihe/astar-visualization
algorithm astar-algorithm numpy pathfinding pygame python visualization
Last synced: 17 days ago
JSON representation
I am trying to implement *a path finding algorithm and create a visualization of it with Python and numpy library
- Host: GitHub
- URL: https://github.com/klihe/astar-visualization
- Owner: Klihe
- Created: 2024-01-26T12:50:50.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-06-22T14:22:29.000Z (5 months ago)
- Last Synced: 2024-06-22T22:23:34.406Z (5 months ago)
- Topics: algorithm, astar-algorithm, numpy, pathfinding, pygame, python, visualization
- Language: Python
- Homepage:
- Size: 31.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# AStar-Visualization
I am trying to implement *a path finding algorithm and create a visualization of it with Python and numpy library
## Requirement
- [pygame](https://www.pygame.org/wiki/GettingStarted)
- [numpy](https://numpy.org)## Install requirements
### MacOS/Linux
```bash
pip3 install pygame
pip3 install numpy
```### Windows
```bash
pip install pygame
pip install numpy
```## Run
### MacOS/Linux
```bash
python3 main.py
```### Windows
```bash
python main.py
```## Controls
exit window - esc
selecting of color - arrow up, arrow down
drawing state - 1
calculating state - 2
final result - 3## Drawing
![_](image/startDrawing.png)
- Black = barriers
- Yellow = start
- Blue = end## Calculating
![_](image/oneBlock.png)
value (left) - distance from start
value (right) - distance from end
value (center) - distance start + end## Final result
![_](image/pathResult.png)
Display the optimal route from the starting point to the ending.