A* Search Method in PROLOG
The cost can represent the distance, the time required or the amount required to be spent while traversing from one node to the next node. Additionally an estimate of the straight line distance of each node from the goal is also given. This total knowledge can serve us as a heuristic to navigate from one node to one of neighboring nodes, and thus will guide us to navigate from the start node to the goal node.