ROBOTICS COE 584 Reactive Systems Previously on Robots

ROBOTICS COE 584 Reactive Systems

Previously, on Robots … l Robots are agents in physical or virtual environments l l Environments have different characteristics l l Static/dynamic, accessible? , deterministic? , …. Since we are lazy, we want robots to do things for us l l Persistent, situated, responsive Robots must consider task when deciding what to do Action-selection problem: What to do now in service of the task?

Physical Environments l l Dynamic Non-deterministic Inaccessible Continuous

A Crash Course in AI Planning l l l Planning: An approach to action-selection problem Very long history, since the very beginning of AI 1971, seminal paper: STRIPS (Fikes and Nilsson) l l Still cited and taught today, despite much progress STRIPS originally developed for SRI robot, Shakey l l This is ironic Later on, STRIPS planning was rejected for robot control

AI Planning Definition: State { On(A, table), On(B, table), On(C, table), In-hand(nil) } A B C { On(A, B), On(B, table), On(C, table), In-hand(D) } A B C D

AI Planning Definition: Operators l Operators change state of the world l l Pick-A(? x) l l Preconditions, add-list, delete-list Preconditions: On(A, ? x), In-hand(nil) Add: In-hand(A) Delete: In-hand(nil), On(A, ? x) Put-A(? y) l l l Preconditions: In-hand(A), not On(? x, ? y) Add: On(A, ? y), In-hand(nil) Delete: In-hand(A)

STRIPS Planning l Given: l l Initial state of the world Operators Goal state Produce: l l Plan: Ordered list of instantiated operators Will change the world from initial state to goal state

Planning Example Initial State A B After Pick-B(table) After Put-B(A) B B C A A C C C B B A A Goal State After Put-C(B) After Pick-C(table) C

Planning on robots l l l Sense initial state using sensors Create a full plan given goal state (given task) Feed plan, step-by-step to motors l No need to sense again What’s wrong with this? (Hint: Think about Schoppers’ paper)

Deliberative Control Sense Model Think Act Deliberative: l l l Has internal state (typically a model of the world) Uses this internal state to make decisions Decisions made between alternatives

When plans goes wrong l Dynamic environment l l Non-deterministic l l State changes not according to operator specs Inaccessible l l State changes even if no operator applied Cannot sense entire state of the world Continuous l Predicate-based description of world is discrete

Reactive control Sense l Hard Wiring Act Reactive: l l No internal state Direct connection from sensors to actions S-R (stimulus response) systems No choices, no alternatives

Universal Planning l Have a plan ready for any possible contingency l l l From any initial state, know how to get to goal state Input: Operators, goal state l l Scouts: Be prepared! Do not need to give initial state Output: Decision tree l l What operator to take, depending on environment state Not a single ordered list of operators

Universal planning algorithm Initial State A B After Pick-B(table) After Put-B(A) B B C A A C C C B B A A Goal State After Pick-C(table) C

Robot Control Algorithm Using Universal Planning l l Robot given task (goal, operators) Uses universal planner to create universal plan Robot senses environment Goal state reached? l l No: Execute operator according to decision tree Yes (keep persistency)

Advantages of Universal Planning l Guaranteed to use optimal (shortest) plan to goal l l A very good thing! Optimal solution to action selection problem Robust to failures Robust in dynamic and non-deterministic domains

Problems with Universal Planning l l l Assumes accessibility Assumes perfect sensors Assumes discrete actions (operators)

Universal plan as mapping sensors to actions l l Universal plan can be viewed as a function Sensor readings to actions u: S A l Essentially a table: For each state, give action l Schoppers uses a decision-tree representation

Problems: Planning Time l l What is the planning time? Planning time grows with the number of states l l Since we have to enumerate operator for every state What is the number of states in an environment? Worst case: All possible combinations of sensor readings (state predicates)

Problems: Universal Plan Size l Plan size grows with the number of possible states l “Curse of dimensionality” X 1 X 2 Pick X 1 Put Pick X 2 X 1 Pick Put

Problems: Stupid executioner l Schoppers: l l Ginsberg: l l Baby goes around knocking blocks around? What if baby repeatedly knocks down the same block? Universal plans may get into cycles This is because no deliberation is done Universal planner relies on simple executioner l l Sense, consult table, act Same as regular planner – except for sensing

Brooks’ Subsumption Architecture Multiple levels of control: Behaviors Plan changes Identify objects Monitor Change Map Explore Wander Avoid Object

Why does this work? l It breaks the ideal universal plan into behaviors l l l avoids the curse of dimensionality Behaviors (levels) interact to generate behavior Note that programmer is responsible for taskoriented design Goes both below and above universal plans Hand programmed: approximate plan l Not automatically generated

Subsuming Layers l How to make sure overall output is coherent? l l e. g. , avoid object is in conflict with explore Subsumption hierarchy: Higher levels modify lower Map Explore Wander Avoid Object

Coherence using subsumption Key principle Higher layers control input/outputs of lower layers In practice: l Can be difficult to design l l l a lot depends on programmer Single module per layer can be restrictive Increasingly challenging to control at higher levels

Irony l Ginsberg’s article pretty much killed universal planning l l Though occasional papers still published Reactive control very popular in practice l l But due to theory problem, no more automated planners! So we get lots of reactive plans, but no planning

Irony again l Ginsberg was right: l l l Approximating universal plan is possible Tends to be useful only in fairly low level locomotion control Approximation is what Brooks had done l Which is why he often gets the credit for the revolution

Starting next week Behavior-Based Control: Expanding on Subsumption
- Slides: 28