
For example, the Manhattan distance between the nodes v and w in Figure
5.39 is 10 (6 + 4).
The Manhattan distance gives a speed increase over the Euclidean heuristic
because no square root is required for the calculation.
Summing Up
You should now have a decent understanding of graphs and of the algo-
rithms you can use to search them. As with most AI techniques, your
understanding will grow enormously through practical experience, so I
urge you to attempt at least some of the following problems.
Practice Makes Perfect
1. Using a pencil and paper, trace out the DFS, BFS, and Dijkstra’s algo
-
rithm for the following graph. Use a different start and finish ...