A* in action
Having established the optimal path between the two towns of
Arad and Bucharest we can now test the efficiency of the A*
search pattern in finding the same goal state.
Remember that the A* search pattern is the union of two
evaluation functions. In the following demonstration the A*
search pattern evaluates the cost of the path so far (UCS),
together with an admissible heuristic function based on the
shortest line distance (SLD) between between the initial state
and the goal location, such that
hSLD(n) = straight line distance between n and the goal
location.
The following is table of the straight line distances between
some of the major Romanian cities and and the goal state,
Bucharest.