CS 188: Artificial Intelligence Fall 2006AnnouncementsTodayLocal Search MethodsHill ClimbingHill Climbing DiagramIterative Algorithms for CSPsExample: 4-QueensPerformance of Min-ConflictsSimulated AnnealingSlide 11Beam SearchGenetic AlgorithmsExample: N-QueensContinuous ProblemsGradient MethodsRobot motion planning!Robotics TasksMobile RobotsManipulator RobotsSensors and EffectorsDegrees of FreedomExampleSlide 24HolonomicityConfiguration SpaceKinematicsSlide 28Obstacles in C-SpaceMore ObstaclesTopologyExample: 2D PolygonsExample: RotationExample: A Less Simple ArmSummaryMotion as SearchDecomposition MethodsApproximate DecompositionHierarchical DecompositionSkeletonization MethodsVisibility GraphsSlide 44Probabilistic RoadmapsRoadmap ExamplePotential Field MethodsPotential FieldsCS 188: Artificial IntelligenceFall 2006Lecture 5: Robot Motion Planning9/14/2006Dan Klein – UC BerkeleyMany slides over the course adapted from either Stuart Russell or Andrew MooreAnnouncementsProject 1.2 is up (Single-Agent Pacman)Critical update: make sure you have the most recent version!Reminder: you are allowed to work with a partner!Change to John’s section: M 3-4pm now in 4 EvansTodayLocal searchRobot motion planningLocal Search MethodsQueue-based algorithms keep fallback options (backtracking)Local search: improve what you have until you can’t make it betterGenerally much more efficient (but incomplete)Hill ClimbingSimple, general idea:Start whereverAlways choose the best neighborIf no neighbors have better scores than current, quitWhy can this be a terrible idea?Complete?Optimal?What’s good about it?Hill Climbing DiagramRandom restarts?Random sideways steps?Iterative Algorithms for CSPsHill-climbing, simulated annealing typically work with “complete” states, i.e., all variables assignedTo apply to CSPs:Allow states with unsatisfied constraintsOperators reassign variable valuesVariable selection: randomly select any conflicted variableValue selection by min-conflicts heuristic:Choose value that violates the fewest constraintsI.e., hillclimb with h(n) = total number of violated constraintsExample: 4-QueensStates: 4 queens in 4 columns (44 = 256 states)Operators: move queen in columnGoal test: no attacksEvaluation: h(n) = number of attacksPerformance of Min-ConflictsGiven random initial state, can solve n-queens in almost constant time for arbitrary n with high probability (e.g., n = 10,000,000)The same appears to be true for any randomly-generated CSP except in a narrow range of the ratioSimulated AnnealingIdea: Escape local maxima by allowing downhill movesBut make them rarer as time goes onSimulated AnnealingTheoretical guarantee:Stationary distribution:If T decreased slowly enough,will converge to optimal state!Is this an interesting guarantee?Sounds like magic, but reality is reality:The more downhill steps you need to escape, the less likely you are to every make them all in a rowPeople think hard about ridge operators which let you jump around the space in better waysBeam SearchLike greedy search, but keep K states at all times:Variables: beam size, encourage diversity?The best choice in MANY practical settingsComplete? Optimal?Why do we still need optimal methods?Greedy Search Beam SearchGenetic AlgorithmsGenetic algorithms use a natural selection metaphorLike beam search (selection), but also have pairwise crossover operators, with optional mutationProbably the most misunderstood, misapplied (and even maligned) technique around!Example: N-QueensWhy does crossover make sense here?When wouldn’t it make sense?What would mutation be?What would a good fitness function be?Continuous ProblemsPlacing airports in RomaniaStates: (x1,y1,x2,y2,x3,y3)Cost: sum of squared distances to closest cityGradient MethodsHow to deal with continous (therefore infinite) state spaces?Discretization: bucket ranges of values E.g. force integral coordinatesContinuous optimizationE.g. gradient ascentImage from vias.orgRobot motion planning!Robotics TasksMotion planning (today)How to move from A to BKnown obstaclesOffline planningLocalization (later)Where exactly am I?Known mapOngoing localization (why?)Mapping (much later)What’s the world like?Exploration / discoverySLAM: simultaneous localization and mappingMobile RobotsHigh-level objectives: move around obstacles, etcLow-level: fine motor control to achieve motionWhy is this hard?Start ConfigurationImmovable ObstaclesGoal ConfigurationManipulator RobotsHigh-level goals: reconfigure environmentLow-level: move from configuration A to B (point-to-point motion)Why is this already hard?Also: compliant motionSensors and EffectorsSensors vs. PerceptsAgent programs receive perceptsAgent bodies have sensorsIncludes proprioceptive sensorsReal world: sensors break, give noisy answers, miscalibrate, etc.Effectors vs. ActuatorsAgent programs have actuators (control lines)Agent bodies have effectors (gears and motors)Real-world: wheels slip, motors fail, etc.Degrees of Freedom2 DOFs3 DOFsQuestion: How many DOFs for a polyhedron free-flying in 3D space?The degrees of freedom are the numbers required to specify a robot’s configurationPositional DOFs:(x, y, z) of free-flying robotdirection robot is facingEffector DOFsArm angleWing positionStatic state: robot shape and positionDynamic state: derivatives of static DOFs (why have these?)ExampleHow many DOFs?What are the natural coordinates for specifying the robot’s configuration?These are the configuration space coordinatesWhat are the natural coordinates for specifying the effector tip’s position?These are the work space coordinatesExampleHow many DOFs?How does this compare to your arm?How many are required for arbitrary positioning of end-effector?HolonomicityHolonomic robots control all their DOFs (e.g. manipulator arms)Easier to controlHarder to buildNon-holonomic robots do not directly control all DOFs (e.g. a car)Configuration SpaceWorkspace:The world’s (x, y) systemObstacles specified hereConfiguration spaceThe robot’s statePlanning happens hereObstacles can be projected to hereKinematicsKinematicsThe mapping from configurations to workspace
View Full Document