python implementation of the A* pathfinding algorithm