You are on page 1of 1

Consider the following map (not drawn to scale).

a)Using the A* algorithm work out a route from town A to town M. Use the following cost functions.
 G(n) = The cost of each moe as the distance !etween each town (shown on map).
 "(n) = The #traight $ine %istance !etween an& town and town M. These distances are gien in the
ta!le !elow.
Straight Line Distance to M
A ''.() * +,.-) . ,,.,/ M 0.00
1 )0.00 2 )).+- 3 4.00
C ++.4' G ,'.,' 5 '0.00
% )4.00 " ,0.00 $ )0.00
6roide the search tree for &our solution7 showing the order in which the nodes were e8panded and the
cost at each node.
#tate the route &ou would take and the cost of that route.
(!) Assume the #traight $ine %istance Ta!le was replaced !& the following ta!le
Straight Line Distance to M
A 90.00 * -.00 . )+.00 M 0.00
1 ,0.00 2 4'.00 3 +'.00
C '0.00 G ,9.00 5 )(.00
% ,/.00 " ,-.00 $ ,0/.00
:hat route would now !e returned !& the A* algorithm and what would the cost of that route
!e;
c) "ow do &ou account for the different routes returned !& the two A* algorithms;
10
40
10
10
5
14.14
20
20 20
22.36
10
10
10
5
5
M
L
K
H
J
I
G
F
E
D
!
"
11.1#