Spring 2025_CS607_1
Spring 2025_CS607_1
Question:
You are required to implement the A*(A-star) algorithm to find the shortest
node from a source node S to a goal node G considering the following graph:
You must:
Show the path taken at each step (No need to make diagram at each step)
Calculate the total cost ( f(n)=g(n) + h(n) ) at each step where g(n) is actual
cost and h(n) is heuristic cost.
Show the final optimal path with cost.
Solution:
1. Path 1: S to A to C to G
Total Cost: 2(S to A) + 4(A to C) + 3(C to G) = 9
2. Path 2: S to B to D to G
Total Cost: 5(S to B) + 3(B to D) + 1( D to G) = 9
THE END