An open API service indexing awesome lists of open source software.

https://github.com/kingcitaldo125/pystar

A* pathfinding visualizer in Python/PyGame
https://github.com/kingcitaldo125/pystar

astar-algorithm astar-pathfinding pygame python

Last synced: over 1 year ago
JSON representation

A* pathfinding visualizer in Python/PyGame

Awesome Lists containing this project

README

          

# PyStar

A* pathfinding visualizer done in Python/PyGame.

## Installing

Run
```
pip install -r requirements.txt
```
to install dependencies.
This is mainly just [PyGame](https://www.pygame.org/wiki/GettingStarted).

## Running

Simply run the script with `python astar.py`.

Use the left mouse button to select cells and the right mouse button to modify the terrain on the map.
Click on one cell to mark it as a start cell and a second cell to mark it as the end cell for the search algorithm.
Terrain must be modified prior to making your start/end cell selections.

Press the Spacebar to reset the map.
Press the Escape key to quit.

## References
[PyGame Docs](https://www.pygame.org/docs/)

[A* Pathfinding (E01: algorithm explanation)](https://www.youtube.com/watch?v=-L-WgKMFuhE)