Aims
g(n)
h(n)
f(n)=g(n)+h(n)
- g(n) = cost so far to reach n
- h(n) = est. cost from n to goal
- f(n) = est. total cost of path through n to the goal
The idea is that we take into account both the cost and estimated cost and combine them to decide which nodes to add to the fringe queue!
BFS and UCS Special Case
h(n)
is admissible if for every node n: - h(n) <= h*(n)
where h*(n)
is the true cost to reach a goal from n
- The estimate to reach the goal is smaller or equal to the true cost to reach the goaloptimistic
- they think that the cost of solving the problem is less than it actually is. - heuristic never overestimates actual cost -> it is admissibleTheorem
If h
is an admissible heuristic
than A* is complete and optimal.
How to check?
See if the estimated cost for a node is <= the actual cost from that node to the goal node.
Compare f(G2) and f(G)
Two admissibleheuristics h(1) and h(2)
h[2]
dominates h[1]
if for all nodes n
we have h[2](n) >= h[1](n)