how are things going?

44

Upload: tannar

Post on 22-Feb-2016

101 views

Category:

Documents


0 download

DESCRIPTION

How are things going?. 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 : - PowerPoint PPT Presentation

TRANSCRIPT

CptS: Introduction to Robotics

How are things going?

Core AI ProblemMobile robot path planning: identifying a trajectory that, when executed, will enable the robot to reach the goal location

RepresentationState (state space)Actions (operators)Initial and goal states

Plan:Sequence of actions/states that achieve desired goal state.

4) Finding shortest path?

General Tree SearchImportant ideas:FringeExpansionExploration strategy

Main question: which fringe nodes to explore?

Review: Depth First SearchSabdpacephfrqqcGaqephfrqqcGaSGdbpqcehafrqphfdbacerStrategy: expand deepest node firstImplementation: Fringe is a LIFO stackDepth-first searchExpand deepest unexpanded nodeImplementation:fringe = LIFO queue, i.e., put successors at front(i.e. a stack)

7Depth-first search

DEMOS8cd /Users/taylorm/Documents/pacman/published/demospython pacman.py -l contoursMaze -p SearchAgent -a fn=dfs --frameTime -1python pacman.py -p SearchAgent -a fn=dfs -l smallMaze --frameTime -1

Review: Breadth First SearchSabdpacephfrqqcGaqephfrqqcGaSGdbpqcehafrSearchTiersStrategy: expand shallowest node firstImplementation: Fringe is a FIFO queueBreadth-first searchExpand shallowest unexpanded nodeImplementation:Fringe is a FIFO queue, i.e., new successors go at end

DEMOS10cd /Users/taylorm/Documents/pacman/published/demospython pacman.py -l contoursMaze -p SearchAgent -a fn=bfs --frameTime -1python pacman.py -p SearchAgent -a fn=bfs -l smallMaze --frameTime -1

DFSInfinite paths make DFS incompleteHow can we fix this?AlgorithmCompleteOptimalTimeSpaceDFSDepth First SearchNNO(BLMAX)O(LMAX)STARTGOALabNNInfiniteInfiniteDFSWith cycle checking, DFS is complete.*

AlgorithmCompleteOptimalTimeSpaceDFSw/ Path CheckingYNO(bm+1)O(bm)b1 nodeb nodesb2 nodesbm nodesm tiers* Or with graph search version of DFS12BFSWhen is BFS optimal?

AlgorithmCompleteOptimalTimeSpaceDFSw/ Path CheckingBFSYNO(bm+1)O(bm)b1 nodeb nodesb2 nodesbm nodess tiersYN*O(bs+1)O(bs)bs nodes13

In this problem the start state is S, and the goal state is G. IGNORE the heuristic estimate, h, and the transition costs next to the edges. Assume that ordering is defined by, and ties are always broken by, choosing the state that comes first alphabetically.

What is the order of states expanded using Depth First Search? Assume DFS terminates as soon as it reaches G.What is the order of states expanded using Breadth First Search? Assume BFS terminates as soon as it reaches G.

SABDFGSABCDEFG14Iterative DeepeningIterative deepening uses DFS as a subroutine:

Do a DFS which only searches for paths of length 1 or less. If 1 failed, do a DFS which only searches paths of length 2 or less.If 2 failed, do a DFS which only searches paths of length 3 or less..and so on.AlgorithmCompleteOptimalTimeSpaceDFSw/ Path CheckingBFSIDYNO(bm+1)O(bm)YN*O(bs+1)O(bs)YN*O(bs+1)O(bs)b5) Finding shortest path with costs

Costs on ActionsNotice 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. STARTGOALdbpqcehafr29281823144151322Uniform Cost SearchSabdpacephfrqqcGaqephfrqqcGaExpand cheapest node first:Fringe is a priority queueSGdbpqcehafr39116411571381011171106391128811512Cost contours2Uniform-cost searchFor graphs with actions of different costEquivalent to breadth-first if step costs all equal

Expand least total cost unexpanded nodeImplementation:fringe = queue sorted by path cost g(n), from smallest to largest (i.e. a priority queue)

19Uniform Cost IssuesRemember: explores increasing cost contours

The good: UCS is complete and optimal!

The bad:Explores options in every directionNo information about goal location

StartGoalc 3c 2c 1DEMOScd /Users/taylorm/Documents/pacman/published/demospython pacman.py -l contoursMaze -p SearchAgent -a fn=ucs --frameTime -1python pacman.py -p SearchAgent -a fn=ucs -l smallMaze --frameTime -1

20

In this problem the start state is S, and the goal state is G. The transition costs are next to the edges. IGNORE the heuristic estimate, h. Assume that ordering is defined by, and ties are always broken by, choosing the state that comes first alphabetically.

What is the order of states expanded using Uniform Cost Search? Assume algorithm terminates when reaches G.

SABCDEFG21BreatherO Fortunahttp://www.youtube.com/watch?v=nIwrgAnx6Q8

Informed Search

goalstartUninformed searchInformed searchSearch Heuristics

Any estimate of how close a state is to a goalDesigned for a particular search problemExamples: Manhattan distance, Euclidean distance10511.2Best-First SearchA*HeuristicsAdmissibleQuick to computeInadmissible

Where are we?Uninformed Graph SearchReal World to GraphsInformed Graph SearchConfiguration Space (C-Space)Configuration Space: the space of all possible robot configurations.Data structure that allows us to represent occupied and free space in the environment

Configuration SpaceFor a point robot moving in 2-D plane, C-space is qgoalqinitCCfreeCobs

Point robot (no constraints)

Example WorkspaceBack to Path PlanningTypical simplifying assumptions for indoor mobile robots:2 DOF for representationrobot is round, so that orientation doesnt matterrobot is holonomic, can move in any direction

Back to Path PlanningHow is a plan represented?How is a plan computed?What does the plan achieve?How do we evaluate a plans quality?Fundamental Questions

startgoalOccupancy Grid

startgoalOccupancy Grid, accounting for C-Space

startgoalOccupancy Grid, accounting for C-Space

startgoalSlightly larger grid size can make the goal unreachable.Problem if grid is too small?Big PictureOccupancy 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?Roadmap AlgorithmsShortest Path between Two Points

Shortest Path with Obstacles

Sweep Algorithms

Visibility Graph

Visibility GraphsShortest path butStays as close as possible to the obstaclesDeviations from path can lead to collisionsRequires polygonal obstacles

Other AlternativesWhat if we care more about keeping our robot safe than about optimality?The other extreme: stay away from obstacles as far as possible.

Voronoi Diagram

Control easy: stay equidistant away from closest obstaclesBut what if are too far away to see object?Voronoi DiagramsDifficult to compute in higher dimensionsStaying away from obstacles is not necessarily the best heuristic Can lead to paths that are much too conservativeCan be unstable: small changes in obstacle configuration can lead to large changes in the diagram

Fortunes Algorithm