New answers tagged

2

I think you might have misunderstood the heuristic function. It is supposed to give an underestimate on the distance from a node $n$ to the goal node $t$. The closer this estimate is to the true value, the better A* will perform. The only criterion for the heuristic function is that it never gives a higher value for $h(n)$ than the true cost of going from $...


1

They can't possibly be on the same scale throughout the search, if by that you mean that $g(n) \approx h(n)$ for every node encountered near the search. Near the start, you'll have $g(n) \approx 0$, so $g(n) \ll h(n)$. Near the goal node, you'll likely have $h(n) \approx 0$, so $h(n) \ll g(n)$. On the other hand, it is possible to have the range of values ...


Top 50 recent answers are included