Unit 1 Informed Search-Introduction
Unit 1 Informed Search-Introduction
• pq initially contains S
• We remove S from pq and process unvisited neighbors of S to pq.
• pq now contains {A, C, B} (C is put before B because C has lesser cost)
Step-06:
Step-07:
Go back to Step-02.
The numbers written on edges represent the distance between the nodes.
The numbers written on nodes represent the heuristic value.
Find the most cost-effective path to reach from start state A to final state J using A* Algorithm.
Solution-
Step-01:
Path- A → F
Step-02:
Node G and Node H can be reached from node F.
A* Algorithm calculates f(G) and f(H).
f(G) = (3+1) + 5 = 9
f(H) = (3+7) + 3 = 13
Since f(G) < f(H), so it decides to go to node G.
Path- A → F → G
Step-03:
Node I can be reached from node G.
A* Algorithm calculates f(I).
f(I) = (3+1+3) + 1 = 8
It decides to go to node I.
Path- A → F → G → I
Step-04: