(A-Star) Search Algorithm
(A-Star) Search Algorithm
In this graph:
• Node A has neighbors B and C with respective costs 1 and 3.
• Node B has neighbor D with cost 5.
• Node C has neighbor D with cost 1.
The heuristic values are given in parentheses, indicating the
estimated cost to reach the goal node D.
Running the provided code will result in finding the path from node
A to node D, which in this case is A -> C -> D with a total cost of
4.