Professional Documents
Culture Documents
Astar
Astar
Now, since the start is at the source A, which will have some
initial heuristic value. Hence, the results are
2
f(A) = g(A) + h(A)
f(A) = 0 + 6 = 6
Now take the path to the destination from these nodes, and
calculate the weights : 0
f(A-B-D) = (1+ 7) + 0
f(A-C-D) = (5 + 10) + 0
It is clear that node B gives you the best path, so that is the node
you need to take to reach the destination.