Homework 1 Lab 3 Kinematics Vision Open loop
• Homework 1 • Lab 3: – Kinematics – Vision
• Open loop control vs. Closed loop control • Recap – Control Architectures – Sensors & Vision – Control & Kinematics
Core AI Problem • Mobile robot path planning: identifying a trajectory that, when executed, will enable the robot to reach the goal location • Representation – State (state space) – Actions (operators) – Initial and goal states • Plan: – Sequence of actions/states that achieve desired goal state
Model of the world Compute Path Smooth it and satisfy differential constraints Design a trajectory (velocity function) along the path Design a feedback control law that tracks the trajectory Execute
Fundamental Questions • • How is a plan represented? How is a plan computed? What does the plan achieve? How do we evaluate a plan’s quality?
1) World is known, goal is not
2) Goal is known, world is not
3) World is known, goal is known
4) Finding shortest path?
5) Finding shortest path with costs
The World consists of. . . • Obstacles – Places where the robot can’t (shouldn’t) go • Free Space – Unoccupied space within the world – Robots “might” be able to go here • There may be unknown obstacles • The state may be unreachable
Configuration Space Point robot (no constraints) C Cfree qgoal Cobs qinit For a point robot moving in 2 -D plane, C-space is
Path Planning in Configuration Space • Typical simplifying assumptions for indoor mobile robots: – 2 DOF for representation – robot is round, so that orientation doesn’t matter – robot is holonomic, can move in any direction
Back to Path Planning… • qinit to qgoal? start Fundamental Questions � � How is a plan represented? How is a plan computed? What does the plan achieve? How do we evaluate a plan’s quality? goal
Discretize start goal
Occupancy Grid start goal
Occupancy Grid, accounting for C-Space start goal
Occupancy Grid, accounting for C-Space start goal Slightly larger grid size can make the goal unreachable. Problem if grid is “too small”?
4) Finding shortest path
General Tree Search • Important ideas: – Fringe – Expansion – Exploration strategy • Main question: which fringe nodes to explore?
Review: Depth First Search G a Strategy: expand deepest node first c b e d Implementation: Fringe is a LIFO stack S f h p r q S e d b c a a e h p q q c a h r p f q G p q r q f c a G
Depth-first search • Expand deepest unexpanded node • Implementation: – fringe = LIFO queue, i. e. , put successors at front – (i. e. a stack)
Depth-first search
Review: Breadth First Search Strategy: expand shallowest node first a b G c e d Implementation: Fringe is a FIFO queue S f h p r q S e d Search Tiers b c a a e h p q q c a h r p f q G p q r q f c a G
Breadth-first search • Expand shallowest unexpanded node • Implementation: – Fringe is a FIFO queue, i. e. , new successors go at end
DFS Algorithm DFS Depth First Search Complete Optimal Time Space N LMAX) Infinite O(B Infinite O(LMAX) N N N b START a GOAL • Infinite paths make DFS incomplete… • How can we fix this?
DFS • With cycle checking, DFS is complete. * … 1 node b b nodes b 2 nodes m tiers bm nodes Algorithm DFS w/ Path Checking Complete Optimal Y N Time O(bm+1) Space O(bm) * Or with graph search version of DFS
BFS Algorithm DFS w/ Path Checking BFS Complete Optimal Y N O(bm+1) O(bm) Y N* O(bs+1) O(bs) s tiers … b Time Space 1 node b nodes b 2 nodes bs nodes bm nodes • When is BFS optimal?
C F A S D G B E In this problem the start state is S, and the goal state is G. Assume that ordering is defined by, and ties are always broken by choosing the state that comes first alphabetically. 1. What is the order of states expanded using Depth First Search? Assume DFS terminates as soon as it reaches G.
C F A S D G B E In this problem the start state is S, and the goal state is G. Assume that ordering is defined by, and ties are always broken by choosing the state that comes first alphabetically. 1. What is the order of states expanded using Depth First Search? Assume DFS terminates as soon as it reaches G. 2. What is the order of states expanded using Breadth First Search? Assume BFS terminates as soon as it reaches G.
3 A 1 2 S 5 5 C F 4 4 3 B 3 5 6 D G 6 E 10 In this problem the start state is S, and the goal state is G. The transition costs are next to the edges. Assume that ordering is defined by, and ties are always broken by choosing the state that comes first alphabetically. 1. What is the order of states expanded using Depth First Search? Assume DFS terminates as soon as it reaches G. 2. What is the order of states expanded using Breadth First Search? Assume BFS terminates as soon as it reaches G.
Iterative Deepening Iterative deepening uses DFS as a subroutine: 1. Do a DFS which only searches for paths of length 1 or less. 2. If “ 1” failed, do a DFS which only searches paths of length 2 or less. 3. If “ 2” failed, do a DFS which only searches paths of length 3 or less. …. and so on. Algorithm DFS w/ Path Checking Complete Optimal Time … b Space Y N O(bm+1) O(bm) BFS Y N* O(bs+1) O(bs) ID Y N* O(bs+1) O(bs)
5) Finding shortest path with costs
Costs on Actions a 2 GOAL 2 c b 1 3 2 d 3 START e 9 8 p 15 f 2 h 4 1 2 8 4 q 1 r Notice that BFS finds the shortest path in terms of number of transitions. It does not find the least-cost path. We will quickly cover an algorithm which does find the least-cost path.
Uniform Cost Search 2 b Expand cheapest node first: b 4 c a 6 a p h 17 r 11 e 5 11 h 13 r 7 p f 8 q q q 11 c a 15 9 e 3 d p G 10 2 9 e h 8 2 q f c a G f 1 r q 0 S Cost contours d S 1 c 8 1 3 Fringe is a priority queue G a p 1 q 16 1
Uniform-cost search • For graphs with actions of different cost – Equivalent to breadth-first if step costs all equal • Expand least “total cost” unexpanded node • Implementation: – fringe = queue sorted by path cost g(n), from smallest to largest (i. e. a priority queue)
Uniform Cost Issues • Remember: explores increasing cost contours … c 1 c 2 c 3 • The good: UCS is complete and optimal! • The bad: – Explores options in every “direction” – No information about goal location Start Goal DEMOS
3 A 1 2 S 5 5 C F 4 4 3 B 3 5 6 D G 6 E 10 In this problem the start state is S, and the goal state is G. The transition costs are next to the edges. Assume that ordering is defined by, and ties are always broken by, choosing the state that comes first alphabetically. 3. What is the order of states expanded using Uniform Cost Search? Assume algorithm terminates when reaches G.
Informed Search start goal Uninformed search Informed search
Search Heuristics § Any estimate of how close a state is to a goal § Designed for a particular search problem § Examples: Manhattan distance, Euclidean distance 10 5 11. 2
Big Picture • Occupancy grids perform exhaustive search across the state space. – Represent and evaluate a far greater number of world states than the robot would actually need to traverse • What can we do differently?
- Slides: 42