A* tree search at the start node and goal node

54 Views Asked by At

I want to know if i'm understand the idea behind A* tree search correctly. My understanding is that the path is given by:

$f(n) = g(n) + h(n)$

and that

$h(n) \leqslant h^*(n)$

Where $g(n)$ is the cost from start node to node n, $h(n)$ is the estimate of the cost of the cheapest path from n to the goal, and $h^*(n)$ is the exact cost to get from x to the goal.

So given all of that, can we say that at the start node $g(start) = 0 $ and that at the goal node $h(goal) = h^*(goal) = 0$ ?

Can we also say that $f(start) = f(goal)$ ?

1

There are 1 best solutions below

1
On BEST ANSWER

g(start)=0 is true.

h(goal)=h∗(goal)=0 is also true.

You can't say that f(start)=f(goal) is true.

f(start) = g(start) + h(start) = h(start).

f(goal) = g(goal) + h(goal) = g(goal).

You can't say that h(start) = g(goal) because h is just an estimate, while g is a real path cost from start to goal node. These values can be different.