A* Pathfinding (E03: algorithm implementation)