A* is a graph traversal and path search algorithm. It's often used in many fields of computer science (e.g. in video games). It's simple and easy to understand.
This is my implemantation of this algorithm, based on pseudo-code from this wikipedia page.
Only module required is pygame.
pip install pygame
Run with python main.py
.
Use LMB
to draw impassable walls, RMB
to remove them, s
to place starting point, g
to place goal.
r
to start pathfinding. To restart press any of the above.