-2

i'm looking for admissible heuristics for A Star Algorithm in a road network with the means of transport car, train and plane. The aim is the fastest route (time) between two points. I found the straight line distance, h=0 and the heuristic of searching nearest airport for starting point and end point.

Can you help me find another heuristic?

Thanks

kraskevich
  • 18,368
  • 4
  • 33
  • 45
Zeus7
  • 1

1 Answers1

0

I think you should do fine with just the 2 heuristics you already have.

If you really need a 3rd one then you could categorize roads/trains as either fast (high speed limit) or slow (low speed limit). Make sure that all fast roads are interconnected. If they aren't, then either skip the ones that aren't, or recategroize slow roads that connect the different nets of fast roads.

You can then use a third heuristic: Get to the nearest fast road from the start/end points. Then use only fast roads. This heuristic would be the equivalent of "taking the freeway to your destination".

Klas Lindbäck
  • 33,105
  • 5
  • 57
  • 82
  • Thank you. I categorize roads/trains as fast and slow. I think your third heuristic is equivalent to my heuristic to look for the nearest airport for starting point and end point. Then you assume that the airports are based on linear distance. Isn't it? – Zeus7 Sep 15 '16 at 15:13
  • It is similar, yes. The difference is the distance between two airports is linear. Freeways aren't. In some corner cases, using the freeway may result in a long detour, so you have to treat the freeways as a separate network (when using this heuristic) and use A* to connect the points once you reach the freeway network. – Klas Lindbäck Sep 15 '16 at 15:23
  • Ok I get it. But if ,for simplicity's sake, we consider that with the car the distance is also linear and only the speed from the means of transport are different then your heuristic would be same like my heuristic? – Zeus7 Sep 15 '16 at 15:41
  • Yes, just on another set. – Klas Lindbäck Sep 16 '16 at 06:54