SLIDE 1
1
Evaluation function Evaluation function
- expand vertex minimizing
expand vertex minimizing f f( (v v) = ) = g g( (s s ~>
~> v
v) + ) + h h( (v v ~>
~> r
r) )
- g
g( (s s ~>
~> v
v) estimates the minimum cost from the ) estimates the minimum cost from the start vertex to start vertex to v v
- h
h( (v v ~>
~> r
r) estimates (heuristically) the cost from ) estimates (heuristically) the cost from v v to the goal vertex to the goal vertex
- if we had exact evaluation function
if we had exact evaluation function f f *
*, we could
, we could solve the problem without expanding any solve the problem without expanding any unnecessary vertices unnecessary vertices
Cost function Cost function g g
- actual cost from
actual cost from s s to to v v along the cheapest path along the cheapest path found so far found so far
- exact cost if
exact cost if G G is a tree is a tree
- can never underestimate the cost if
can never underestimate the cost if G G is a general is a general graph graph
- f
f( (v v) = ) = g g( (s s ~>
~> v
v) and unit cost ) and unit cost → breadth → breadth-
- first search
first search
- f
f( (v v) = ) = – –g g( (s s ~>
~> v
v) and unit cost ) and unit cost → depth → depth-
- first search
first search
Heuristic function Heuristic function h h
- carries information from outside the graph
carries information from outside the graph
- defined for the problem domain
defined for the problem domain
- the closer to the actual cost, the less superfluous
the closer to the actual cost, the less superfluous vertices are expanded vertices are expanded
- f
f( (v v) = ) = g g( (s s ~>
~> v
v) → cheapest ) → cheapest-
- first search
first search
- f
f( (v v) = ) = h h( (v v ~>
~> r
r) → best ) → best-
- first search
first search
Admissibility Admissibility
- let Algorithm A be a best
let Algorithm A be a best-
- first search using the
first search using the evaluation function evaluation function f f
- search algorithm is
search algorithm is admissible admissible if it finds the if it finds the minimal path (if it exists) minimal path (if it exists)
- if
if f f = = f f *
*, Algorithm A is admissible
, Algorithm A is admissible
- Algorithm A* = Algorithm A using an estimate
Algorithm A* = Algorithm A using an estimate function function h h
- A* is admissible, if
A* is admissible, if h h does not overestimate the does not overestimate the actual cost actual cost
Monotonicity Monotonicity
- h
h is locally admissible → is locally admissible → h h is monotonic is monotonic
- monotonic heuristic is also admissible
monotonic heuristic is also admissible
- actual cost is never less than the heuristic cost
actual cost is never less than the heuristic cost → → f f will never decrease will never decrease
- monotonicity → A* finds the shortest path to
monotonicity → A* finds the shortest path to any vertex the first time it is expanded any vertex the first time it is expanded
- if a vertex is rediscovered, path will not be shorter
if a vertex is rediscovered, path will not be shorter
- simplifies implementation
simplifies implementation
Optimality Optimality
- Optimality theorem: The first path from
Optimality theorem: The first path from s s to to r r found by A* is optimal. found by A* is optimal.
- Proof: lecture notes pp. 94
Proof: lecture notes pp. 94-
- 95