Reputation: 173
I'm trying to figure out if I can use A* algorithm to fine the longest path to goal under the assumption of admissibility.
I tried with maximal max(f(n)=g(n)+h(octile-distance))
, but it seems wrong to me.
If admissible heuristic is to under estimate the f*
, for longest path i had to find heuristic that always over estimate the f*
?
According to 1, if i need to over-estimate geographic distance to goal. someone can recommend me for some kind of heuristic ?
Is it optimal finding the longest path with A* like this ?
Upvotes: 1
Views: 1396
Reputation: 3745
Finding the longest path is NP-Hard, so trying to adapt A* or any other shortest path algorithm to find it will unfortunately not work.
Upvotes: 2