Simple AI pathfinding solution using a best-first algorithm.