heuristic search - university of washington · heuristic search and what we want from it 3....
TRANSCRIPT
![Page 1: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/1.jpg)
1
Sanjiban Choudhury
Heuristic Search
TAs: Matthew Rockett, Gilwoo Lee, Matt Schmittle
Content adapted from LaValle
![Page 2: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/2.jpg)
2
Create a graph
General framework for motion planning
![Page 3: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/3.jpg)
2
Create a graph
General framework for motion planning
Search the graph
![Page 4: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/4.jpg)
2
Create a graph
General framework for motion planning
Search the graph
Interleave
![Page 5: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/5.jpg)
3
Any planning algorithm Create graph Search graph Interleave
General framework for motion planning
![Page 6: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/6.jpg)
3
Any planning algorithm Create graph Search graph Interleave
General framework for motion planning
RRT*-XYZ
![Page 7: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/7.jpg)
3
Any planning algorithm Create graph Search graph Interleave
General framework for motion planning
RRT*-XYZ
=
![Page 8: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/8.jpg)
3
Any planning algorithm Create graph Search graph Interleave
General framework for motion planning
RRT*-XYZe.g. fancy random sampler
e.g. fancy heuristic
e.g. fancy way of
densifying⇥ ⇥=
![Page 9: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/9.jpg)
3
Any planning algorithm Create graph Search graph Interleave
Whats the best we can do?
Whats the best we can do?
Whats the best we can do?
General framework for motion planning
RRT*-XYZe.g. fancy random sampler
e.g. fancy heuristic
e.g. fancy way of
densifying⇥ ⇥=
![Page 10: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/10.jpg)
For this lecture….
4
We will focus on the search assuming everything we need is given
Optimal Path = SHORTESTPATH(V,E, start, goal)
![Page 11: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/11.jpg)
If you are serious about heuristic search
5
This lecture: Skewed view of search
that will be helpful for robot motion planning
![Page 12: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/12.jpg)
Today’s objective
6
1. Best first search as a meta-algorithm
2. Heuristic search and what we want from it
3. Laziness in search
![Page 13: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/13.jpg)
High-order bit
7
Expansion of a search wavefront from start to goal
Courtesy wikipedia
Djikstra A* Weighted A*
![Page 14: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/14.jpg)
High-order bit
7
Expansion of a search wavefront from start to goal
Courtesy wikipedia
Djikstra A* Weighted A*
![Page 15: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/15.jpg)
What do we want?
8
1. Search to systematically reason over the space of paths
(minimize planning effort)
2. Find a (near)-optimal path quickly
![Page 16: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/16.jpg)
9
Best first searchThis is a meta-algorithm
![Page 17: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/17.jpg)
9
Best first searchThis is a meta-algorithm
![Page 18: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/18.jpg)
9
Best first searchThis is a meta-algorithm
BFS maintains a priority queue of promising nodes
Each node s ranked by a function f(s)
Element (Node)
Priority Value (f-value)
Node A f(A)
Node B f(B)
….. ……
Populate queue initially with start node
![Page 19: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/19.jpg)
10
Best first search
Element (Node)
Priority Value (f-value)
Node A f(A)
Node D f(D)
Node B f(B)
Node C f(C)
AC
D
Search explores graph by expanding most promising node min f(s)
Terminate when you find the goal
![Page 20: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/20.jpg)
10
Best first search
Element (Node)
Priority Value (f-value)
Node A f(A)
Node D f(D)
Node B f(B)
Node C f(C)
AC
D
Search explores graph by expanding most promising node min f(s)
Terminate when you find the goal
![Page 21: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/21.jpg)
11
Best first search
Key Idea: Choose f(s) wisely!
- minimize the number of expansions
- when goal found, it has (near) optimal path
![Page 22: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/22.jpg)
11
Best first search
Key Idea: Choose f(s) wisely!
- minimize the number of expansions
- when goal found, it has (near) optimal path
![Page 23: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/23.jpg)
Notations
12
Given:
Start sstart Goal sgoal
Cost c(s, s’)
Objects created:
OPEN: priority queue of nodes to be processed
CLOSED: list of nodes already processed
g(s): estimate of the least cost from start to a given node
![Page 24: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/24.jpg)
Pseudocode
13
While goal not expanded
Add (or update) s’ to OPEN
Push start into OPEN
Pop best from OPEN
Add best to CLOSED
For every successor s’
If g(s’) > g(s) + c(s,s’)
g(s’) = g(s) + c(s,s’)
![Page 25: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/25.jpg)
Djikstra’s Algorithm
14
Set f(s) = g(s)
Sort nodes by their cost to come
![Page 26: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/26.jpg)
Djikstra’s Algorithm
14
Set f(s) = g(s)
Sort nodes by their cost to come
![Page 27: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/27.jpg)
!15
Djikstra’s Algorithm
![Page 28: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/28.jpg)
!16
Djikstra’s Algorithm
![Page 29: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/29.jpg)
!16
Djikstra’s Algorithm
Nice property: Only process nodes ONCE. Only process cheaper nodes than goal.
![Page 30: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/30.jpg)
17
Can we have a better f(s)?
![Page 31: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/31.jpg)
17
Can we have a better f(s)?
Yes!
f(s) should estimate the cost of the path to goal
![Page 32: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/32.jpg)
Heuristics
18
What if we had a heuristic h(s) that estimated the cost to goal?
Set the evaluation function f(s) = g(s) + h(s)
![Page 33: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/33.jpg)
Example of heuristics?
19
![Page 34: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/34.jpg)
Example of heuristics?
19
1. Minimum number of nodes to go to goal
![Page 35: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/35.jpg)
Example of heuristics?
19
1. Minimum number of nodes to go to goal
2. Euclidean distance to goal (if you know your cost is measuring length)
![Page 36: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/36.jpg)
Example of heuristics?
19
1. Minimum number of nodes to go to goal
3. Solution to a relaxed problem
2. Euclidean distance to goal (if you know your cost is measuring length)
![Page 37: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/37.jpg)
Example of heuristics?
19
1. Minimum number of nodes to go to goal
3. Solution to a relaxed problem
2. Euclidean distance to goal (if you know your cost is measuring length)
4. Domain knowledge / Learning ….
![Page 38: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/38.jpg)
A* [Hart, Nillson, Raphael, ’68]
20
Let L be the length of the shortest path
Djikstra
Expand every state g(s) < L
A*
Expand every state f(s) = g(s) + h(s) < L
but A* only expands relevant states, i.e., does much less work!
Both find the optimal path …
![Page 39: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/39.jpg)
A* [Hart, Nillson, Raphael, ’68]
20
Let L be the length of the shortest path
Djikstra
Expand every state g(s) < L
A*
Expand every state f(s) = g(s) + h(s) < L
but A* only expands relevant states, i.e., does much less work!
Both find the optimal path …
![Page 40: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/40.jpg)
ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
A* Search
Computes optimal g-values for relevant states
![Page 41: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/41.jpg)
ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
CLOSED = {} OPEN = {sstart}
next state to expand: sstart
S2 S1
Sgoal
2
g=∞ h=2
g= ∞ h=1
g= ∞ h=02
S4 S33
g= ∞ h=2
g= ∞ h=1
1Sstart
1
1
g=0 h=3
A* Search
Computes optimal g-values for relevant states
![Page 42: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/42.jpg)
CLOSED = {} OPEN = {sstart}
next state to expand: sstart
g(s2) > g(sstart) + c(sstart,s2)
S2 S1
Sgoal
2
g=∞ h=2
g= ∞ h=1
g= ∞ h=02
S4 S33
g= ∞ h=2
g= ∞ h=1
1Sstart
1
1
g=0 h=3
A* Search
ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
Computes optimal g-values for relevant states
![Page 43: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/43.jpg)
CLOSED = {sstart} OPEN = {s2}
next state to expand: s2
S2 S1
Sgoal
2
g=1 h=2
g= ∞ h=1
g= ∞ h=02
S4 S33
g= ∞ h=2
g= ∞ h=1
1Sstart
1
1
g=0 h=3
A* Search
ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
Computes optimal g-values for relevant states
![Page 44: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/44.jpg)
S2 S1
Sgoal
2
g=1 h=2
g= 3 h=1
g= ∞ h=02
S4 S33
g= 2 h=2
g= ∞ h=1
1Sstart
1
1
g=0 h=3CLOSED = {sstart,s2}
OPEN = {s1,s4} next state to expand: s1
A* Search
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
Computes optimal g-values for relevant statesComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
![Page 45: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/45.jpg)
S2 S1
Sgoal
2
g=1 h=2
g= 3 h=1
g= 5 h=02
S4 S33
g= 2 h=2
g= ∞ h=1
1Sstart
1
1
g=0 h=3CLOSED = {sstart,s2,s1}
OPEN = {s4,sgoal} next state to expand: s4
A* Search
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
Computes optimal g-values for relevant statesComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
![Page 46: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/46.jpg)
S2 S1
Sgoal
2
g=1 h=2
g= 3 h=1
g= 5 h=02
S4 S33
g= 2 h=2
g= 5 h=1
1Sstart
1
1
g=0 h=3CLOSED = {sstart,s2,s1,s4}
OPEN = {s3,sgoal} next state to expand: sgoal
A* Search
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
Computes optimal g-values for relevant statesComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
![Page 47: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/47.jpg)
S2 S1
Sgoal
2
g=1 h=2
g= 3 h=1
g= 5 h=02
S4 S33
g= 2 h=2
g= 5 h=1
1Sstart
1
1
g=0 h=3CLOSED = {sstart,s2,s1,s4,sgoal}
OPEN = {s3} done
A* Search
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
Computes optimal g-values for relevant statesComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
![Page 48: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/48.jpg)
S2 S1
Sgoal
2
g=1 h=2
g= 3 h=1
g= 5 h=02
S4 S33
g= 2 h=2
g= 5 h=1
1Sstart
1
1
g=0 h=3
for every expanded state g(s) is optimal for every other state g(s) is an upper bound
we can now compute a least-cost path
A* Search
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
Computes optimal g-values for relevant statesComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
![Page 49: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/49.jpg)
S2 S1
Sgoal
2
g=1 h=2
g= 3 h=1
g= 5 h=02
S4 S33
g= 2 h=2
g= 5 h=1
1Sstart
1
1
g=0 h=3
for every expanded state g(s) is optimal for every other state g(s) is an upper bound
we can now compute a least-cost path
A* Search
insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;
Computes optimal g-values for relevant statesComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN;
![Page 50: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/50.jpg)
Properties of heuristics
31
What properties should h(s) satisfy? How does it affect search?
![Page 51: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/51.jpg)
Properties of heuristics
31
What properties should h(s) satisfy? How does it affect search?
Admissible: h(s) <= h*(s)
If this true, the path returned by A* is optimal
h(goal) = 0
![Page 52: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/52.jpg)
Properties of heuristics
31
What properties should h(s) satisfy? How does it affect search?
Admissible: h(s) <= h*(s)
If this true, the path returned by A* is optimal
h(goal) = 0
Consistency: h(s) <= c(s,s’) + h(s’)
If this true, A* is optimal AND efficient (will not re-expand a node)
h(goal) = 0
![Page 53: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/53.jpg)
Admissible vs Consistent
32
Admissible
Consistent
Theorem: ALL consistent heuristics are admissible, not vice versa!
![Page 54: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/54.jpg)
33
Takeaway: Heuristics are great because they focus
search on relevant states
AND
still give us optimal solution
![Page 55: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/55.jpg)
34
Design of Informative Heuristics
• For grid-based navigation:– Euclidean distance– Manhattan distance: h(x,y) = abs(x-xgoal) + abs(y-ygoal)– Diagonal distance: h(x,y) = max(abs(x-xgoal), abs(y-ygoal))– More informed distances???
Carnegie Mellon University
Which heuristics are admissible for4-connected grid?8-connected grid?
Courtesy Max Likhachev
![Page 56: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/56.jpg)
35
Design of Informative Heuristics
• For lattice-based 3D (x,y,Ѳ) navigation:
Carnegie Mellon University
Any ideas?
Courtesy Max Likhachev
![Page 57: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/57.jpg)
36
Design of Informative Heuristics
• For lattice-based 3D (x,y,Ѳ) navigation:
– 2D (x,y) distance accounting for obstacles (single Dijkstra’s on 2D grid cell starting at goalcell will give us these values)
Carnegie Mellon University
Any problems where it will be highly uninformative?
Courtesy Max Likhachev
![Page 58: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/58.jpg)
37
Design of Informative Heuristics
• For lattice-based 3D (x,y,Ѳ) navigation:
– 2D (x,y) distance accounting for obstacles (single Dijkstra’s on 2D grid cell starting at goalcell will give us these values)
Carnegie Mellon University
Any problems where it will be highly uninformative?
Any heuristic functions that will guide search well
in this example?
Courtesy Max Likhachev
![Page 59: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/59.jpg)
38
Design of Informative Heuristics
• Arm planning in 3D:
Carnegie Mellon University
Any ideas?
Courtesy Max Likhachev
![Page 60: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/60.jpg)
39
Is admissibility always what we want?
Admissible Inadmissible
![Page 61: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/61.jpg)
39
Is admissibility always what we want?
Admissible Inadmissible
![Page 62: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/62.jpg)
40
Solution Quality
Number of states
expanded
Can inadmissible heuristics help us with this tradeoff?
![Page 63: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/63.jpg)
!41 Courtesy Max Likhachev
![Page 64: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/64.jpg)
!42 Courtesy Max Likhachev
![Page 65: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/65.jpg)
Effect of the Heuristic Function
sgoalsstart
A* Search: expands states in the order of f = g+h values
Courtesy Max Likhachev
![Page 66: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/66.jpg)
Effect of the Heuristic Function
sgoalsstart
… …
A* Search: expands states in the order of f = g+h values
Courtesy Max Likhachev
![Page 67: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/67.jpg)
Effect of the Heuristic Function
sgoalsstart
… …
A* Search: expands states in the order of f = g+h values
for large problems this results in A* quickly running out of memory (memory: O(n))
Courtesy Max Likhachev
![Page 68: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/68.jpg)
Effect of the Heuristic Function
Weighted A* Search: expands states in the order of f = g+εh values, ε > 1 = bias towards states that are closer to goal
sstart sgoal
Courtesy Max Likhachev
![Page 69: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/69.jpg)
Effect of the Heuristic Function
Weighted A* Search: expands states in the order of f = g+εh values, ε > 1 = bias towards states that are closer to goal
sstart sgoal…
…
Courtesy Max Likhachev
![Page 70: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/70.jpg)
Effect of the Heuristic Function
Weighted A* Search: expands states in the order of f = g+εh values, ε > 1 = bias towards states that are closer to goal
sstart sgoal…
…
solution is always ε-suboptimal: cost(solution) ≤ ε·cost(optimal solution)
Courtesy Max Likhachev
![Page 71: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/71.jpg)
Effect of the Heuristic Function
Courtesy Max Likhachev
![Page 72: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/72.jpg)
Effect of the Heuristic Function
Weighted A* Search: expands states in the order of f = g+εh values, ε > 1 = bias towards states that are closer to goal
20DOF simulated robotic arm state-space size: over 1026 states
planning with ARA* (anytime version of weighted A*)Courtesy Max Likhachev
![Page 73: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/73.jpg)
Effect of the Heuristic Function
Weighted A* Search: expands states in the order of f = g+εh values, ε > 1 = bias towards states that are closer to goal
20DOF simulated robotic arm state-space size: over 1026 states
planning with ARA* (anytime version of weighted A*)Courtesy Max Likhachev
![Page 74: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/74.jpg)
Effect of the Heuristic Function
Weighted A* Search: expands states in the order of f = g+εh values, ε > 1 = bias towards states that are closer to goal
20DOF simulated robotic arm state-space size: over 1026 states
planning with ARA* (anytime version of weighted A*)Courtesy Max Likhachev
![Page 75: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/75.jpg)
Effect of the Heuristic Function• planning in 8D (<x,y> for each foothold) • heuristic is Euclidean distance from the center of the body to the goal location • cost of edges based on kinematic stability of the robot and quality of footholds
Uses R* - A randomized version of weighted A* Joint work between Max Likhachev, Subhrajit Bhattacharya, Joh Bohren, Sachin
Chitta, Daniel D. Lee, Aleksandr Kushleyev, and Paul Vernaza
Courtesy Max Likhachev
![Page 76: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/76.jpg)
Effect of the Heuristic Function• planning in 8D (<x,y> for each foothold) • heuristic is Euclidean distance from the center of the body to the goal location • cost of edges based on kinematic stability of the robot and quality of footholds
Uses R* - A randomized version of weighted A* Joint work between Max Likhachev, Subhrajit Bhattacharya, Joh Bohren, Sachin
Chitta, Daniel D. Lee, Aleksandr Kushleyev, and Paul Vernaza
Courtesy Max Likhachev
![Page 77: heuristic search - University of Washington · Heuristic search and what we want from it 3. Laziness in search. High-order bit 7 Expansion of a search wavefront from start to goal](https://reader030.vdocument.in/reader030/viewer/2022040822/5e6b7fdde61a847aaa303b23/html5/thumbnails/77.jpg)
Effect of the Heuristic Function• planning in 8D (<x,y> for each foothold) • heuristic is Euclidean distance from the center of the body to the goal location • cost of edges based on kinematic stability of the robot and quality of footholds
Uses R* - A randomized version of weighted A* Joint work between Max Likhachev, Subhrajit Bhattacharya, Joh Bohren, Sachin
Chitta, Daniel D. Lee, Aleksandr Kushleyev, and Paul Vernaza
Courtesy Max Likhachev