A* heuristic.