Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Build a graph for the (offline) road mapetwork 1- Consider the following as the list of major cities in the greater Vancouver area and lower
Build a graph for the (offline) road mapetwork 1- Consider the following as the list of major cities in the greater Vancouver area and lower mainland: Vancouver, North Vancouver, West Vancouver, Burnaby, Richmond, Surrey, New Westminster, Delta, Langley, Abbotsford, Chilliwack, Hope, Mission. Hint: you can use the two-letters from the name of the city when defining a variable for that city in your program (use capital letters) 2- Calculate the cost function (using Google map application) a. Consider the minimum distance between the city halls (assume the mayor's office is in the city hall) as the cost of traveling between two cities. For simplicity, you could round down this number. For example, the cost of traveling from city hall Abbotsford to Chilliwack operation center =32.7Km i. Note: if the city/district doesn't have a city hall, search for a municipality building or downtown or .... 3- Build a heuristic function a. X= minimum distance between the city halls b. Y= a random number between 5 to 10 c. H(c1,c2)= round_down (XY) \# heuristic value between city 1 and 2 4- (Optional/bonus) Subtracting the random number (Y) from X in the heuristic function makes sure the heuristic value is admissible but doesn't guarantee that it is consistent. Write a function that makes sure the heuristic values are consistent as well. This means, for some nodes the Y value should be changed to make their heuristic consistent. Build a graph for the (offline) road mapetwork 1- Consider the following as the list of major cities in the greater Vancouver area and lower mainland: Vancouver, North Vancouver, West Vancouver, Burnaby, Richmond, Surrey, New Westminster, Delta, Langley, Abbotsford, Chilliwack, Hope, Mission. Hint: you can use the two-letters from the name of the city when defining a variable for that city in your program (use capital letters) 2- Calculate the cost function (using Google map application) a. Consider the minimum distance between the city halls (assume the mayor's office is in the city hall) as the cost of traveling between two cities. For simplicity, you could round down this number. For example, the cost of traveling from city hall Abbotsford to Chilliwack operation center =32.7Km i. Note: if the city/district doesn't have a city hall, search for a municipality building or downtown or .... 3- Build a heuristic function a. X= minimum distance between the city halls b. Y= a random number between 5 to 10 c. H(c1,c2)= round_down (XY) \# heuristic value between city 1 and 2 4- (Optional/bonus) Subtracting the random number (Y) from X in the heuristic function makes sure the heuristic value is admissible but doesn't guarantee that it is consistent. Write a function that makes sure the heuristic values are consistent as well. This means, for some nodes the Y value should be changed to make their heuristic consistent
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started