The A*-Algorithm helps you find the optimal route from point A to B on a given graph plane. Let's say that I have the following problem where I have to go from Köln to Karlsruhe.
Without actually writing an algorithm, I tried to find the optimal route by finding the minimum distance from point A to B. I went from Köln to Frankfurt to Kaiserlautern to Ludwigshafen to Karlsruhe, where the total distance ends up being $912$ units. The quesion then asks that if a hypothetical algorithm was designed, which cities would it check? I think it should check all cities that're connected directly to the starting city (and then the cities that're on the optimal route), so Metz, Saarbrücken and Frankfurt. My answer is correct except for Metz which is not a city that the algorithm would "visit"?
So I have $3$ questions:
- Why would Metz not be correct?
- Is my distance value correct?
- What does the $h$-value tell us?
P.S. - I know this is basic theoretical CS stuff but I'm just in my first semester so please have mercy. :)