Human-aware Robotics 1 Informed Search • 2018/01/18 • Chapter 3.5 in R&N 3rd Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/CSE471/Lectures/informed. pdf q Project 1 released. Due in two weeks, on Jan 31 by midnight.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Human-awareRobotics
1
Informed Search• 2018/01/18
• Chapter 3.5 in R&N 3rd
Ø Announcement:q Slides for this lecture are here:
q Project 1 released. Due in two weeks, on Jan 31 by midnight.
Human-awareRobotics
2
• Planning agent (goal-based agent) and environment
• Planning problem
• Search
• Search strategies
• Required reading (red means it will be on your exams):
o R&N: Chapter 3.1-3.4
Last time
Human-awareRobotics
3
Outline for today
• Heuristics
• Best-first search
• Admissible heuristics
• Graph search and consistency
• Required reading (red means it will be on your exams):
o R&N: Chapter 3.5-3.6
Human-awareRobotics
• Search problem:– States (configurations of the world)– Actions and costs– Successor function (world dynamics)– Start state and goal test
• Search tree:– Nodes: represent plans for reaching states– Plans have costs (sum of action costs)
• Search algorithm:– Systematically builds a search tree– Chooses an ordering of the fringe (unexplored nodes)– Optimal: finds least-cost plans
Planning agent
fromhttp://ai.berkeley.edu
Human-awareRoboticsTree search
Human-awareRobotics
• Remember: UCS explores increasing cost contours
• The good: UCS is complete and optimal!
• The bad:– Explores options in every “direction”– No information about goal location
• We’ll fix it today!
Start Goal
…
c£ 3c£ 2
c£ 1
Issues with UCS
Human-awareRoboticsInformed search
Human-awareRobotics§ A heuristic is:
§ A function that estimates how close a state is to a goal
§ Designed for a particular search problem§ Examples: Manhattan distance, Euclidean
distance for path finding
10
5
11.2
Search heuristics
Human-awareRobotics
9
Outline for today
• Heuristics
• Best-first search
• Admissible heuristics
• Graph search and consistency
• Required reading (red means it will be on your exams):
o R&N: Chapter 3.5-3.6
Human-awareRoboticsBest-first search
Idea:
• Use heuristic for each node to estimate its “desirability”• Expand the most desirable unexpanded node
Special cases:
Greedy searchA* search
Human-awareRoboticsGreedy search
Human-awareRobotics
• Strategy: expand a node that you think is closest to a goal state– Heuristic: estimate of distance to
nearest goal for each state
• A common case:– Best-first takes you straight to the
(wrong) goal
• Worst-case: like a badly-guided DFS
…b
…b
Greedy search
Human-awareRoboticsGreedy search
Human-awareRoboticsGreedy search
Human-awareRoboticsGreedy search
Human-awareRobotics• What nodes does greedy search expand?
– Takes time O(bm) (exponential in effective depth)– A good heuristic can give dramatic improvement!
• How much space does the fringe take?– May keeps all nodes at the bottom tier, so O(bm)
• Is it complete?– No, i.e., stuck in loops (when state space graph has
loops)
• Is it optimal?– No
Properties of greedy search
…b
…b
mtiers
Human-awareRoboticsA* search
Human-awareRobotics• Uniform-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)
S a d
b
Gh=5
h=6
h=2
1
8
11
2
h=6 h=0
c
h=7
3
e h=11
S
a
b
c
ed
dG
G
g =0h=6
g =1h=5
g =2h=6
g =3h=7
g =4h=2
g =6h=0
g =9h=1
g =10h=2
g =12h=0
Combining UCS and Greedy
Human-awareRobotics• Should we stop when we enqueue a goal?• No: only stop when we dequeue a goal
S
B
A
G
2
3
2
2h=1
h=2
h=0h=3
When should A* terminate?
Human-awareRobotics
• What went wrong?• Actual bad goal cost < estimated good goal cost• We need estimates to be less than actual costs!
A
GS
1 3h=6
h=0
5
h =7
Is A* optimal
Human-awareRobotics
21
Outline for today
• Heuristics
• Best-first search
• Admissible heuristics
• Graph search and consistency
• Required reading (red means it will be on your exams):
o R&N: Chapter 3.5-3.6
Human-awareRoboticsAdmissible Heuristic
Human-awareRobotics
Inadmissible (pessimistic) heuristics break optimality by trapping good plans on the fringe
Admissible (optimistic) heuristics slow down bad plans but never outweigh true costs
Admissibility
Human-awareRobotics• A heuristic h is admissible (optimistic) if:
where is the true cost to a nearest goal
• Examples:
• Coming up with admissible heuristics is most of what’s involved in using A* in practice.
15
Admissible Heuristic
Human-awareRobotics
• Most of the work in solving hard search problems optimally is in coming up with admissible heuristics
• Often, admissible heuristics are solutions to relaxed problems, where new actions are available
• Inadmissible heuristics are often useful too
15366
Admissible heuristics
Human-awareRobotics• Heuristic: Number of tiles
misplaced• Why is it admissible?• h(start) = • This is a relaxed-problem heuristic
Averagenodesexpandedwhentheoptimalpathhas……4steps
…8steps
…12steps
UCS 112 6,300 3.6x106
TILES 13 39 227
StartState GoalState
StatisticsfromAndrewMoore
Example
8
Human-awareRobotics
• What if we had an easier 8-puzzle where any tile could slide any direction at any time, ignoring other tiles?