You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the Uniform Cost Search algorithm, we calculate the shortest distance between two desired nodes of a weighted graph as in the picture below. Here, our nodes become our cities and our weighted edges become the roads between our cities.
With the Uniform Cost Search algorithm, while going from the starting node to the target node, we continuously select the least cost edge until we find the node we are looking for. However, in the next step, we also check our previous node while selecting the shortest edge, and after calculating our cost cumulatively, we choose our new edge.
About
Calculating the shortest path between two nodes with the Uniform Cost Search algorithm.