A Algorithm
A Algorithm
A* Search Algorithm is a simple and efficient search algorithm that can be used to find
the optimal path between two nodes in a graph. It will be used for the shortest path
finding. It is an extension of Dijkstra’s shortest path algorithm (Dijkstra’s Algorithm). The
extension here is that, instead of using a priority queue to store all the elements, we use
heaps (binary trees) to store them. The A* Search Algorithm also uses a heuristic
function that provides additional information regarding how far away from the goal
node we are.
Open Set: The open set is a collection of nodes that are candidates for evaluation.
Closed Set: The closed set contains nodes that have already been evaluated.
EXAMPLE:
Node (S-G):
f(S-G) = 10 + 0 = 10 // hold
Node (S-A-B):
Node (S-A-C):
Node (S-A-C-D):
Node (S-A-C-G):
Thus, the optimal path between the start node to goal node is S-A-C-G