SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space...

220
Search Lecture Attendance: http://bit.ly/3GEMoKZ

Transcript of SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space...

Page 1: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 2: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 3: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 4: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 5: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans

(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 6: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 7: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.

Depth First Search.Good space bound, “leftmost” exploration seems bad.

Breadth First Search.Bad space bound, finds plan with fewest number of actions.

Uniform Cost Search.Bad space bounds, finds optimal plan.

Demo: L3D1

Page 8: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 9: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.

Breadth First Search.Bad space bound, finds plan with fewest number of actions.

Uniform Cost Search.Bad space bounds, finds optimal plan.

Demo: L3D1

Page 10: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 11: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.

Uniform Cost Search.Bad space bounds, finds optimal plan.

Demo: L3D1

Page 12: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 13: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 14: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search

Lecture Attendance: http://bit.ly/3GEMoKZ

State space graph.

Given a task, model of world appropriate to task.

Search Tree.

Representation of all plans(also paths through state space graph.)

Uninformed Search.Depth First Search.

Good space bound, “leftmost” exploration seems bad.Breadth First Search.

Bad space bound, finds plan with fewest number of actions.Uniform Cost Search.

Bad space bounds, finds optimal plan.

Demo: L3D1

Page 15: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Informed Search

Page 16: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search Heuristics

11.25

10

A heuristic is:

I A function that estimates how close a stateis to a goal

I Designed for a particular search problem

I Examples: Euclidean distance for pathing.Manhattan distance.

Page 17: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search Heuristics

11.25

10

A heuristic is:

I A function that estimates how close a stateis to a goal

I Designed for a particular search problem

I Examples: Euclidean distance for pathing.Manhattan distance.

Page 18: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search Heuristics

11.25

10

A heuristic is:

I A function that estimates how close a stateis to a goal

I Designed for a particular search problem

I Examples:

Euclidean distance for pathing.Manhattan distance.

Page 19: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search Heuristics

11.2

5

10

A heuristic is:

I A function that estimates how close a stateis to a goal

I Designed for a particular search problem

I Examples: Euclidean distance for pathing.

Manhattan distance.

Page 20: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Search Heuristics

11.25

10

A heuristic is:

I A function that estimates how close a stateis to a goal

I Designed for a particular search problem

I Examples: Euclidean distance for pathing.Manhattan distance.

Page 21: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: Heuristic Function

Page 22: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: Heuristic Function

Heuristic:

the number of the largest pancake that is still out of place

Page 23: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: Heuristic Function

Heuristic: the number of the largest pancake that is still out of place

Page 24: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Page 25: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Expand the node that seems closest

to the goal?

What can go wrong?Greedy: 140 + 99 + 211 = 450Better: 140+80+97+101 = 418

Page 26: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Expand the node that seems closest to the goal?

What can go wrong?Greedy: 140 + 99 + 211 = 450Better: 140+80+97+101 = 418

Page 27: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Expand the node that seems closest to the goal?

What can go wrong?

Greedy: 140 + 99 + 211 = 450Better: 140+80+97+101 = 418

Page 28: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Expand the node that seems closest to the goal?

What can go wrong?Greedy: 140 + 99 + 211 =

450Better: 140+80+97+101 = 418

Page 29: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Expand the node that seems closest to the goal?

What can go wrong?Greedy: 140 + 99 + 211 = 450Better: 140+80+97+101 =

418

Page 30: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Expand the node that seems closest to the goal?

What can go wrong?Greedy: 140 + 99 + 211 = 450Better: 140+80+97+101 = 418

Page 31: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Strategy: expand a node that (you think) is closest to a goal state.Heuristic: estimate of distance to nearest goal for each state

Wildest dream:

Perfect heuristic. A common case:Best-first takes you straight to the (wrong) goal

Worst-case:Like a badly-guided DFS

[Democontours greedy empty (L3D3)][Demo: contours greedy pacman small maze (L3D4)]

Page 32: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Strategy: expand a node that (you think) is closest to a goal state.Heuristic: estimate of distance to nearest goal for each state

Wildest dream:Perfect heuristic.

A common case:Best-first takes you straight to the (wrong) goal

Worst-case:Like a badly-guided DFS

[Democontours greedy empty (L3D3)][Demo: contours greedy pacman small maze (L3D4)]

Page 33: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Strategy: expand a node that (you think) is closest to a goal state.Heuristic: estimate of distance to nearest goal for each state

Wildest dream:Perfect heuristic. A common case:Best-first takes you straight to the (wrong) goal

Worst-case:Like a badly-guided DFS

[Democontours greedy empty (L3D3)][Demo: contours greedy pacman small maze (L3D4)]

Page 34: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Strategy: expand a node that (you think) is closest to a goal state.Heuristic: estimate of distance to nearest goal for each state

Wildest dream:Perfect heuristic. A common case:Best-first takes you straight to the (wrong) goal

Worst-case:Like a badly-guided DFS

[Democontours greedy empty (L3D3)][Demo: contours greedy pacman small maze (L3D4)]

Page 35: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Greedy Search

Strategy: expand a node that (you think) is closest to a goal state.Heuristic: estimate of distance to nearest goal for each state

Wildest dream:Perfect heuristic. A common case:Best-first takes you straight to the (wrong) goal

Worst-case:Like a badly-guided DFS

[Democontours greedy empty (L3D3)][Demo: contours greedy pacman small maze (L3D4)]

Page 36: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Video of Demo Contours Greedy (Empty)

Page 37: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Video of Demo Contours Greedy (pacman/small)

Page 38: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Search

Page 39: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Search

UCS

Greedy

A*

Page 40: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Search

UCS

Greedy

A*

Page 41: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Combining UCS and GreedyUniform-cost orders by path cost, or backward cost: g(n).Greedy orders by goal proximity, or forward cost: h(n).A* Search orders by the sum: f (n) = g(n)+h(n).

Blue g(n), Red h(n).

S0 6

a1 5

b2 6

c3 7

d4 2

G6 0

e9 1

d’10 2

G’12 0

Uniform Cost Search. Greedy Astar.

Page 42: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Combining UCS and GreedyUniform-cost orders by path cost, or backward cost: g(n).Greedy orders by goal proximity, or forward cost: h(n).A* Search orders by the sum: f (n) = g(n)+h(n).

Blue g(n), Red h(n).

S0 6

a1 5

b2 6

c3 7

d4 2

G6 0

e9 1

d’10 2

G’12 0

Uniform Cost Search. Greedy Astar.

Page 43: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Combining UCS and GreedyUniform-cost orders by path cost, or backward cost: g(n).Greedy orders by goal proximity, or forward cost: h(n).A* Search orders by the sum: f (n) = g(n)+h(n).

Blue g(n), Red h(n).

S0 6

a1 5

b2 6

c3 7

d4 2

G6 0

e9 1

d’10 2

G’12 0

Uniform Cost Search.

Greedy Astar.

Page 44: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Combining UCS and GreedyUniform-cost orders by path cost, or backward cost: g(n).Greedy orders by goal proximity, or forward cost: h(n).A* Search orders by the sum: f (n) = g(n)+h(n).

Blue g(n), Red h(n).

S0 6

a1 5

b2 6

c3 7

d4 2

G6 0

e9 1

d’10 2

G’12 0

Uniform Cost Search. Greedy

Astar.

Page 45: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Combining UCS and GreedyUniform-cost orders by path cost, or backward cost: g(n).Greedy orders by goal proximity, or forward cost: h(n).A* Search orders by the sum: f (n) = g(n)+h(n).

Blue g(n), Red h(n).

S0 6

a1 5

b2 6

c3 7

d4 2

G6 0

e9 1

d’10 2

G’12 0

Uniform Cost Search. Greedy Astar.

Page 46: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

When should A* terminate?

Should we stop when we enqueue a goal?

S

h = 3A

h = 2

B

h = 1G

h = 02 2

2 3

G in queue when B expanded.No: only stop when we dequeue a goal.

Page 47: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

When should A* terminate?

Should we stop when we enqueue a goal?

S

h = 3A

h = 2

B

h = 1G

h = 02 2

2 3

G in queue when B expanded.No: only stop when we dequeue a goal.

Page 48: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

When should A* terminate?

Should we stop when we enqueue a goal?

S

h = 3A

h = 2

B

h = 1G

h = 02 2

2 3

G in queue when B expanded.No: only stop when we dequeue a goal.

Page 49: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

When should A* terminate?

Should we stop when we enqueue a goal?

S

h = 3A

h = 2

B

h = 1G

h = 02 2

2 3

G in queue when B expanded.

No: only stop when we dequeue a goal.

Page 50: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

When should A* terminate?

Should we stop when we enqueue a goal?

S

h = 3A

h = 2

B

h = 1G

h = 02 2

2 3

G in queue when B expanded.No: only stop when we dequeue a goal.

Page 51: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Is A* Optimal?

S

h = 7

A

h = 6

G

h = 02 3

6

What goes wrong?

Actual goal cost < estimated goal cost

We need estimates to be less than actual costs!Lower bounds for actual costs.

Page 52: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Is A* Optimal?

S

h = 7

A

h = 6

G

h = 02 3

6

What goes wrong?

Actual goal cost < estimated goal cost

We need estimates to be less than actual costs!Lower bounds for actual costs.

Page 53: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Is A* Optimal?

S

h = 7

A

h = 6

G

h = 02 3

6

What goes wrong?

Actual goal cost < estimated goal cost

We need estimates to be less than actual costs!Lower bounds for actual costs.

Page 54: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Is A* Optimal?

S

h = 7

A

h = 6

G

h = 02 3

6

What goes wrong?

Actual goal cost < estimated goal cost

We need estimates to be less than actual costs!Lower bounds for actual costs.

Page 55: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Is A* Optimal?

S

h = 7

A

h = 6

G

h = 02 3

6

What goes wrong?

Actual goal cost < estimated goal cost

We need estimates to be less than actual costs!

Lower bounds for actual costs.

Page 56: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Is A* Optimal?

S

h = 7

A

h = 6

G

h = 02 3

6

What goes wrong?

Actual goal cost < estimated goal cost

We need estimates to be less than actual costs!Lower bounds for actual costs.

Page 57: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible Heuristics

Page 58: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Idea: Admissibility

Inadmissible (pessimistic)heuristics break optimality bytrapping good plans on the fringe

Admissible (optimistic) heuristicsslow down bad plans but neveroutweigh true costs

Page 59: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Idea: Admissibility

Inadmissible (pessimistic)heuristics break optimality bytrapping good plans on the fringe

Admissible (optimistic) heuristicsslow down bad plans but neveroutweigh true costs

Page 60: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal

Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 61: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.

Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 62: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 63: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 64: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 65: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.

Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 66: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.

Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 67: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?

No. For number offlips.

Yes. For height ofstack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 68: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 69: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 70: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 71: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible?

Yes!

Euclidean Distance.

Admissible? Yes.

Page 72: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 73: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 74: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 75: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible?

Yes.

Page 76: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Admissible HeuristicsA heuristic h is admissible (optimistic) if:

0≤ h(n)≤ h∗(n)where h∗(n) is the true cost to a nearest goal Note: Coming up withadmissible heuristics is most of what’s involved in using A* in practice.Examples:

Optimize: number offlips.

Largest out of placepancake.Admissible?No. For number of

flips.Yes. For height of

stack.

Manhattan distance.

Admissible? Yes!

Euclidean Distance.

Admissible? Yes.

Page 77: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search

Page 78: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 79: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 80: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 81: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).

Admissibility of h(n)≤ h∗(n)=⇒ h = 0 at a goal

Imagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 82: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 83: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goal

Imagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 84: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 85: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 86: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 87: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before B

f(n) is less or equal to f(A)since f (n) = g(n)+h(n)< f (A),

f(A) is less than f(B)since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 88: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 89: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 90: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 91: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 92: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 93: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.

→ A* search is optimal.

Page 94: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Tree Search: Blocking

Claim: Goal A is expanded before B with g(B)> g(A).

Proof:

Definition of f-cost: g(n)+h(n).Admissibility of h(n)≤ h∗(n)

=⇒ h = 0 at a goalImagine B is on the fringe.

Some ancestor n of A is on the fringe, too (maybe A!)

Claim: n will be expanded before Bf(n) is less or equal to f(A)

since f (n) = g(n)+h(n)< f (A),f(A) is less than f(B)

since g(A)+0 < g(B)+h(B)

All ancestors of A expand before B.

A expands before B.→ A* search is optimal.

Page 95: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Properties of A*

UCS A*

Page 96: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

UCS vs A* Contours

Uniform-cost expands equally in all“directions”.

A* expands mainly toward the goal, butdoes hedge its bets to ensure optimality

[Demo: contours UCS / greedy / A* empty (L3D1)][Demo: contours A* pacmansmall maze (L3D5)]

Page 97: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

UCS vs A* Contours

Uniform-cost expands equally in all“directions”.

A* expands mainly toward the goal, butdoes hedge its bets to ensure optimality

[Demo: contours UCS / greedy / A* empty (L3D1)][Demo: contours A* pacmansmall maze (L3D5)]

Page 98: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Video of Demo Contours (Empty) – UCS

Page 99: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Video of Demo Contours (Empty) – Greedy

Page 100: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Video of Demo Contours (Empty) – A*

Page 101: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Video of Demo Contours: Pacman A*

Page 102: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Comparison

Uniform Cost

Greedy

A*

Page 103: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Applications

Page 104: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Applications

Video gamesPathing / routing problemsResource planning problemsRobot motion planningLanguage analysisMachine translationSpeech recognition[Demo: UCS / A * pacman tinymaze (L3D6,L3D7)][Demo: guess algorithm EmptyShallow/Deep (L3D8)]

Page 105: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Video of Demo Pacman (Tiny Maze) – UCS / A*

Page 106: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Video: Demo Water Shallow/Deep – Guess Algorithm

Page 107: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Creating Heuristics

Page 108: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Creating Admissible Heuristics

Manhattan Distance: 15

Straight Line Distance: 366

Most of the work in solving hardsearch problems optimally is incoming up with admissibleheuristics

Often, admissible heuristics aresolutions to relaxed problems,where new actions are available

Inadmissible heuristics are oftenuseful too.

Page 109: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Creating Admissible Heuristics

Manhattan Distance: 15

Straight Line Distance: 366

Most of the work in solving hardsearch problems optimally is incoming up with admissibleheuristics

Often, admissible heuristics aresolutions to relaxed problems,where new actions are available

Inadmissible heuristics are oftenuseful too.

Page 110: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Creating Admissible Heuristics

Manhattan Distance: 15

Straight Line Distance: 366

Most of the work in solving hardsearch problems optimally is incoming up with admissibleheuristics

Often, admissible heuristics aresolutions to relaxed problems,where new actions are available

Inadmissible heuristics are oftenuseful too.

Page 111: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: 8 Puzzle

Start State

Goal State

Actions

What are the states?

How many states?

What are the actions?

How many successors from thestart state?

What should the costs be?

Page 112: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: 8 Puzzle

Start State

Goal State

Actions

What are the states?

How many states?

What are the actions?

How many successors from thestart state?

What should the costs be?

Page 113: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: 8 Puzzle

Start State

Goal State

Actions

What are the states?

How many states?

What are the actions?

How many successors from thestart state?

What should the costs be?

Page 114: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: 8 Puzzle

Start State

Goal State

Actions

What are the states?

How many states?

What are the actions?

How many successors from thestart state?

What should the costs be?

Page 115: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: 8 Puzzle

Start State

Goal State

Actions

What are the states?

How many states?

What are the actions?

How many successors from thestart state?

What should the costs be?

Page 116: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Example: 8 Puzzle

Start State

Goal State

Actions

What are the states?

How many states?

What are the actions?

How many successors from thestart state?

What should the costs be?

Page 117: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle I

Heuristic: Number of tiles misplaced

Why is it admissible? h(start) =

This is a relaxed-problem heuristic

Average nodes expanded when theoptimal path has

4 steps 8 steps 12 steps.UCS 112 6300 3.6×106

TILES 13 39 227

Page 118: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle I

Heuristic: Number of tiles misplaced

Why is it admissible? h(start) =

This is a relaxed-problem heuristic

Average nodes expanded when theoptimal path has

4 steps 8 steps 12 steps.UCS 112 6300 3.6×106

TILES 13 39 227

Page 119: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle I

Heuristic: Number of tiles misplaced

Why is it admissible? h(start) =

This is a relaxed-problem heuristic

Average nodes expanded when theoptimal path has

4 steps 8 steps 12 steps.UCS 112 6300 3.6×106

TILES 13 39 227

Page 120: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle I

Heuristic: Number of tiles misplaced

Why is it admissible? h(start) =

This is a relaxed-problem heuristic

Average nodes expanded when theoptimal path has

4 steps 8 steps 12 steps.UCS 112 6300 3.6×106

TILES 13 39 227

Page 121: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle I

Heuristic: Number of tiles misplaced

Why is it admissible? h(start) =

This is a relaxed-problem heuristic

Average nodes expanded when theoptimal path has

4 steps 8 steps 12 steps.UCS 112 6300 3.6×106

TILES 13 39 227

Page 122: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle II

Start State GoalState

Easier 8-puzzle: tile could slide any directionat any time, ignoring other tiles.

Total Manhattan distance

Why is it admissible?

h(start) = 3+1+2+ ...= 18.

Average nodes expanded when the optimalpath has:

4 steps 8 steps 12 steps.TILES 13 39 227MANHATTAN 12 25 73

Page 123: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle II

Start State GoalState

Easier 8-puzzle: tile could slide any directionat any time, ignoring other tiles.

Total Manhattan distance

Why is it admissible?

h(start) = 3+1+2+ ...= 18.

Average nodes expanded when the optimalpath has:

4 steps 8 steps 12 steps.TILES 13 39 227MANHATTAN 12 25 73

Page 124: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle II

Start State GoalState

Easier 8-puzzle: tile could slide any directionat any time, ignoring other tiles.

Total Manhattan distance

Why is it admissible?

h(start) = 3+1+2+ ...= 18.

Average nodes expanded when the optimalpath has:

4 steps 8 steps 12 steps.TILES 13 39 227MANHATTAN 12 25 73

Page 125: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle II

Start State GoalState

Easier 8-puzzle: tile could slide any directionat any time, ignoring other tiles.

Total Manhattan distance

Why is it admissible?

h(start) = 3+1+2+ ...= 18.

Average nodes expanded when the optimalpath has:

4 steps 8 steps 12 steps.TILES 13 39 227MANHATTAN 12 25 73

Page 126: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle II

Start State GoalState

Easier 8-puzzle: tile could slide any directionat any time, ignoring other tiles.

Total Manhattan distance

Why is it admissible?

h(start) = 3+1+2+ ...= 18.

Average nodes expanded when the optimalpath has:

4 steps 8 steps 12 steps.TILES 13 39 227MANHATTAN 12 25 73

Page 127: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle III

How about using the actual cost as aheuristic?

Would it be admissible?Would we save on nodes expanded?What’s wrong with it?

With A*: a trade-off between quality of estimate and work per node

I As heuristics get closer to the true cost, expand fewer nodes, butmore work per node to compute the heuristic itself.

Page 128: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle III

How about using the actual cost as aheuristic?Would it be admissible?

Would we save on nodes expanded?What’s wrong with it?

With A*: a trade-off between quality of estimate and work per node

I As heuristics get closer to the true cost, expand fewer nodes, butmore work per node to compute the heuristic itself.

Page 129: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle III

How about using the actual cost as aheuristic?Would it be admissible?Would we save on nodes expanded?

What’s wrong with it?

With A*: a trade-off between quality of estimate and work per node

I As heuristics get closer to the true cost, expand fewer nodes, butmore work per node to compute the heuristic itself.

Page 130: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle III

How about using the actual cost as aheuristic?Would it be admissible?Would we save on nodes expanded?What’s wrong with it?

With A*: a trade-off between quality of estimate and work per node

I As heuristics get closer to the true cost, expand fewer nodes, butmore work per node to compute the heuristic itself.

Page 131: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

8 Puzzle III

How about using the actual cost as aheuristic?Would it be admissible?Would we save on nodes expanded?What’s wrong with it?

With A*: a trade-off between quality of estimate and work per node

I As heuristics get closer to the true cost, expand fewer nodes, butmore work per node to compute the heuristic itself.

Page 132: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Semi-Lattice of Heuristics

Page 133: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Trivial Heuristics, Dominance

exact

zero

ha hb

hc

max(ha,hb)

Dominance: ha ≥ hc if

∀n : ha(n)≥ hc(n)

Heuristics form a semi-lattice:Max of admissible heuristics is admissible.

Trivial heuristicsBottom of lattice is the zero heuristic.

(what does this give us?)Top of lattice is the exact heuristic

Page 134: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Trivial Heuristics, Dominance

exact

zero

ha hb

hc

max(ha,hb)

Dominance: ha ≥ hc if

∀n : ha(n)≥ hc(n)

Heuristics form a semi-lattice:

Max of admissible heuristics is admissible.

Trivial heuristicsBottom of lattice is the zero heuristic.

(what does this give us?)Top of lattice is the exact heuristic

Page 135: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Trivial Heuristics, Dominance

exact

zero

ha hb

hc

max(ha,hb)

Dominance: ha ≥ hc if

∀n : ha(n)≥ hc(n)

Heuristics form a semi-lattice:Max of admissible heuristics is admissible.

Trivial heuristicsBottom of lattice is the zero heuristic.

(what does this give us?)Top of lattice is the exact heuristic

Page 136: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Trivial Heuristics, Dominance

exact

zero

ha hb

hc

max(ha,hb)

Dominance: ha ≥ hc if

∀n : ha(n)≥ hc(n)

Heuristics form a semi-lattice:Max of admissible heuristics is admissible.

Trivial heuristics

Bottom of lattice is the zero heuristic.(what does this give us?)

Top of lattice is the exact heuristic

Page 137: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Trivial Heuristics, Dominance

exact

zero

ha hb

hc

max(ha,hb)

Dominance: ha ≥ hc if

∀n : ha(n)≥ hc(n)

Heuristics form a semi-lattice:Max of admissible heuristics is admissible.

Trivial heuristicsBottom of lattice is the zero heuristic.

(what does this give us?)Top of lattice is the exact heuristic

Page 138: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Trivial Heuristics, Dominance

exact

zero

ha hb

hc

max(ha,hb)

Dominance: ha ≥ hc if

∀n : ha(n)≥ hc(n)

Heuristics form a semi-lattice:Max of admissible heuristics is admissible.

Trivial heuristicsBottom of lattice is the zero heuristic.

(what does this give us?)

Top of lattice is the exact heuristic

Page 139: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Trivial Heuristics, Dominance

exact

zero

ha hb

hc

max(ha,hb)

Dominance: ha ≥ hc if

∀n : ha(n)≥ hc(n)

Heuristics form a semi-lattice:Max of admissible heuristics is admissible.

Trivial heuristicsBottom of lattice is the zero heuristic.

(what does this give us?)Top of lattice is the exact heuristic

Page 140: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Page 141: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Tree Search: Extra Work!

Search TreeState Graph

Failure to detect repeated statescan cause exponentially morework.

Page 142: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

In BFS, for example, we shouldn’t bother expanding the circled nodes(why?)

Page 143: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 144: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:

Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 145: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)

Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 146: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...

Before expanding a node,check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 147: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 148: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded before

If yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 149: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 150: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 151: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness?

Why/why not?

How about optimality?

Page 152: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 153: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search

Idea: never expand a state twice

How to implement:Tree search + set of expanded states (“closed set”)Expand the search tree node-by-node, but...Before expanding a node,

check if state was never been expanded beforeIf yes skip it, else add to closed set and expand.

Important: store the closed set as a set, not a list

Can graph search wreck completeness? Why/why not?

How about optimality?

Page 154: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 155: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible?

Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 156: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 157: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 158: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.

A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 159: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!

Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 160: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).

C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 161: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.

G in fringe with key, 5.

Could have been there in 4.

Page 162: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 163: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A* Graph Search Gone Wrong?

Is h(·) admissible? Yes.

Will exploring w.r..t h(B)+g(n) be optimal?

Expand S.A and B in fringe!Expands B, since h(B)+g(B) = 2 < 5 = h(A)+g(A).C in fringe with key, 3+h(C) = 4.G in fringe with key, 5.

Could have been there in 4.

Page 164: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costs

Admissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 165: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.

Consistency: h(x)−h(y)≤ cost(x ,y).heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 166: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 167: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 168: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 169: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible?

Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 170: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes?

No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 171: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 172: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent:

f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 173: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreases

Admissible:f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 174: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 175: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.

f (A) = h(A) = 4.Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 176: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 177: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent:

f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 178: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2

< 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 179: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 180: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).

Proof:f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 181: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)

≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 182: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y)

= g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 183: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x)

= f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 184: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 185: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 186: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Consistency of Heuristics

A

h = 4h = 2

h = 1

C

G

1

3

Main idea: est. heuristic costs ≤ actual costsAdmissibility: h(x)≤ cost to goal.Consistency: h(x)−h(y)≤ cost(x ,y).

heuristic “arc” cost ≤ actual arc cost

Consistent =⇒ admissible? Yes? No?

Consistent: f value along a path neverdecreasesAdmissible:

f (C) = h(C)+1 = 3.f (A) = h(A) = 4.

Consistent: f (A) = 2 < 3 = f (C).

Claim: If y is expanded due to x , f (y)≥ f (x).Proof:

f (y) = g(x)+cost(x ,y)+h(y)≥ g(x)+h(x)−h(y)+h(y) = g(x)+h(x) = f (x)

The “estimate” of plan cost keeps rising as you progress.

Page 187: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Graph Search

Page 188: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Graph Search

Sketch: consider what A* does with aconsistent heuristic:

Fact 1: In tree search, A* expands nodes inincreasing total f value (f-contours)

Fact 2: For every state s, the optimal path isdiscovered.

Result: A* graph search is optimal

Fact 1 Proof. Previous slide.

Page 189: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Graph Search

Sketch: consider what A* does with aconsistent heuristic:

Fact 1: In tree search, A* expands nodes inincreasing total f value (f-contours)

Fact 2: For every state s, the optimal path isdiscovered.

Result: A* graph search is optimal

Fact 1 Proof. Previous slide.

Page 190: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Graph Search

Sketch: consider what A* does with aconsistent heuristic:

Fact 1: In tree search, A* expands nodes inincreasing total f value (f-contours)

Fact 2: For every state s, the optimal path isdiscovered.

Result: A* graph search is optimal

Fact 1 Proof. Previous slide.

Page 191: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Graph Search

Sketch: consider what A* does with aconsistent heuristic:

Fact 1: In tree search, A* expands nodes inincreasing total f value (f-contours)

Fact 2: For every state s, the optimal path isdiscovered.

Result: A* graph search is optimal

Fact 1 Proof. Previous slide.

Page 192: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Graph Search

Sketch: consider what A* does with aconsistent heuristic:

Fact 1: In tree search, A* expands nodes inincreasing total f value (f-contours)

Fact 2: For every state s, the optimal path isdiscovered.

Result: A* graph search is optimal

Fact 1 Proof. Previous slide.

Page 193: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality of A* Graph Search

Sketch: consider what A* does with aconsistent heuristic:

Fact 1: In tree search, A* expands nodes inincreasing total f value (f-contours)

Fact 2: For every state s, the optimal path isdiscovered.

Result: A* graph search is optimal

Fact 1 Proof. Previous slide.

Page 194: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 195: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.

State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 196: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .

Optimal path is from y 6= x .There is a vertex v in the optimal path to y in fringe.

s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 197: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 198: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.

s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 199: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).

v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 200: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).

h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 201: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.

g(v)+pathCost(v ,s)< g(x)+cost(x ,s)=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 202: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 203: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).

But then v would have been expanded before s!

Page 204: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 205: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Proof of A* optimality.

v

sx

Start

g(v)

g(x)

pathCost(v ,s)

cost(x ,s)

Fact 2: The optimal path is discovered to every state s.

Proof: Consider first error.State s discovered from x .Optimal path is from y 6= x .

There is a vertex v in the optimal path to y in fringe.s in fringe with key f (s) = g(x)+cost(x ,s)+h(s).v in fringe with key f (v) = g(v)+h(v).h(v)−h(s)≤ pathCost(v ,s) by induction.g(v)+pathCost(v ,s)< g(x)+cost(x ,s)

=⇒ f (v)< f (s).But then v would have been expanded before s!

Page 206: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality

Tree search:A* is optimal if heuristic is admissible.

UCS is a special case (h = 0)

Graph search:A* optimal if heuristic is consistentUCS optimal (h = 0 is consistent)

Consistency implies admissibility

In general, most natural admissible heuristicstend to be consistent, especially if from relaxedproblems

Page 207: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality

Tree search:A* is optimal if heuristic is admissible.UCS is a special case (h = 0)

Graph search:A* optimal if heuristic is consistentUCS optimal (h = 0 is consistent)

Consistency implies admissibility

In general, most natural admissible heuristicstend to be consistent, especially if from relaxedproblems

Page 208: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality

Tree search:A* is optimal if heuristic is admissible.UCS is a special case (h = 0)

Graph search:

A* optimal if heuristic is consistentUCS optimal (h = 0 is consistent)

Consistency implies admissibility

In general, most natural admissible heuristicstend to be consistent, especially if from relaxedproblems

Page 209: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality

Tree search:A* is optimal if heuristic is admissible.UCS is a special case (h = 0)

Graph search:A* optimal if heuristic is consistent

UCS optimal (h = 0 is consistent)

Consistency implies admissibility

In general, most natural admissible heuristicstend to be consistent, especially if from relaxedproblems

Page 210: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality

Tree search:A* is optimal if heuristic is admissible.UCS is a special case (h = 0)

Graph search:A* optimal if heuristic is consistentUCS optimal (h = 0 is consistent)

Consistency implies admissibility

In general, most natural admissible heuristicstend to be consistent, especially if from relaxedproblems

Page 211: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality

Tree search:A* is optimal if heuristic is admissible.UCS is a special case (h = 0)

Graph search:A* optimal if heuristic is consistentUCS optimal (h = 0 is consistent)

Consistency implies admissibility

In general, most natural admissible heuristicstend to be consistent, especially if from relaxedproblems

Page 212: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Optimality

Tree search:A* is optimal if heuristic is admissible.UCS is a special case (h = 0)

Graph search:A* optimal if heuristic is consistentUCS optimal (h = 0 is consistent)

Consistency implies admissibility

In general, most natural admissible heuristicstend to be consistent, especially if from relaxedproblems

Page 213: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A*: Summary

Page 214: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A*: Summary

A* uses both backward costs and (estimates of) forward costs

A* is optimal with admissible / consistent heuristics

Heuristic design is key: often use relaxed problems

Page 215: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A*: Summary

A* uses both backward costs and (estimates of) forward costs

A* is optimal with admissible / consistent heuristics

Heuristic design is key: often use relaxed problems

Page 216: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A*: Summary

A* uses both backward costs and (estimates of) forward costs

A* is optimal with admissible / consistent heuristics

Heuristic design is key: often use relaxed problems

Page 217: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

A*: Summary

A* uses both backward costs and (estimates of) forward costs

A* is optimal with admissible / consistent heuristics

Heuristic design is key: often use relaxed problems

Page 218: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Tree Search Pseudo-Code

Page 219: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Graph Search Pseudo-Code

Page 220: SearchBad space bound, finds plan with fewest number of actions. Uniform Cost Search. Bad space bounds, finds optimal plan. Demo: L3D1 Informed Search Search Heuristics 11.2 5 10

Yaay!