Why is A* search algorithm better than A? -


i trying understand why, theoretically, a* search algorithm considered better a search algorithm.

in both algorithms, nodes expanded according function f(n).

in a: f(n) = g(n) + h(n)

in a*: f(n) = g(n) + h*(n) (the * means function estimate).

a* supposed reduce amount of paths have generated , compared. question is: how using h*(n) instead of h(n) reduce amount of paths?

thanks :)

because don't know exact value of h(n). calculate you'll have complete search node goal, , doing each node expensive.


consider cities connected roads. how know travel distance reach goal city given city is? can't without searching. instead, can, example, use direct distance estimate of actual travel distance, simple , fast calculation if have coordinates of both cities.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -