![Page 1: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/1.jpg)
1
Planning
Chapters 11 and 12
Thanks: Professor Dan Weld, University of Washington
![Page 2: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/2.jpg)
2
Planning
Input Description of initial state of world (in
some KR) Description of goal (in some KR) Description of available actions (in some
KR) Output
Sequence of actions Or, a partial order of actions
![Page 3: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/3.jpg)
3
Input Representation
Description of initial state of world Set of propositions: ((block a) (block b) (block c) (on-table a) (on-
table b) (clear a) (clear b) (clear c) (arm-empty)) Description of goal (i.e. set of desired worlds)
Logical conjunction Any world that satisfies the conjunction is a goal (:and (on a b) (on b c)))
Description of available actions
![Page 4: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/4.jpg)
4
How Represent Actions? Simplifying assumptions
Atomic time Agent is omniscient (no sensing necessary). Agent is sole cause of change Actions have deterministic effects
STRIPS representation World = set of true propositions Actions:
Precondition: (conjunction of literals) Effects (conjunction of literals)
a
aa
north11 north12
W0 W2W1
![Page 5: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/5.jpg)
5
STRIPS Actions Action = a function from world-state to world-
state Precondition says when function defined Effects say how to change set of propositions
aa
north11
W0 W1
north11precond: (and (agent-at 1 1)
(agent-facing north))
effect: (and (agent-at 1 2)
(not (agent-at 1 1)))
![Page 6: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/6.jpg)
6
Action Schemata
(:operator pick-up :parameters ((block ?ob1)) :precondition (and (clear ?ob1) (on-table ?ob1) (arm-empty)) :effect (and (not (on-table ?ob1))
(not (clear ?ob1)) (not (arm-empty))
(holding ?ob1)))
Instead of defining: pickup-A and pickup-B and …
Variables: ?x. For example, ?ob1 Define a schema:
![Page 7: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/7.jpg)
7
STRIPS vs ADL
Positive/Negative conditions Closed world assumption Negated Effects Quantified Effects Goals as conjunctions and disjunctions Conditional Effects (when …) Equality Predicate Typing
![Page 8: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/8.jpg)
8
Examples
Air Cargo Domain Spare Tire Problem The blocks world
![Page 9: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/9.jpg)
9
Planning as Search
Nodes
Arcs
Initial State
Goal State
World states
Actions
The state satisfying the complete description of the initial conds
Any state satisfying the goal propositions
![Page 10: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/10.jpg)
10
Forward-Chaining World-Space Search
AC
BCBA
InitialState Goal
State
![Page 11: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/11.jpg)
11
Backward-Chaining World-Space Search
DCBA
E
D
CBA
E
DCBA
E
* * *
Problem: Many possible goal states are equally acceptable.
From which one does one search?
AC
B
Initial State is completely defined
DE
![Page 12: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/12.jpg)
12
Backward Planning
Try out http://www.cs.ubc.ca/labs/lci/CIspace/Version4/planning/ at UBC which shows goal-directed planning
Shows blocks world planning Idea: find a first subgoal
Achieve it by selecting an action Regress to discover new subgoals from the
action’s preconditions Continue
![Page 13: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/13.jpg)
13
Planning as Search 2
Nodes
Arcs
Initial State
Goal State
Partially specified plans
Adding + deleting actions or constraints (e.g. <) to plan
The empty plan
A plan which when simulated achieves the goal
![Page 14: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/14.jpg)
14
Plan-Space Search and Partial Order Planning
pick-from-table(C)
pick-from-table(B)
pick-from-table(C)put-on(C,B)
How represent plans? How test if plan is a solution?
![Page 15: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/15.jpg)
15
Terminologies
Partial Ordering Linearization Ordering constraints Causal Links Achieves Conflicts Open Preconditions Consistent Plans
![Page 16: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/16.jpg)
16
Planning as Search 3
Phase 1 - Graph Expansion Necessary (insufficient) conditions for plan existence Local consistency of plan-as-CSP
Phase 2 - Solution Extraction Variables
action execution at a time point Constraints
goals, subgoals achieved no side-effects between actions
![Page 17: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/17.jpg)
17
Planning Graph
PropositionInit State
ActionTime 1
PropositionTime 1
ActionTime 2
![Page 18: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/18.jpg)
18
Constructing the planning graph…
Initial proposition layer Just the initial conditions
Action layer i If all of an action’s preconds are in i-1 Then add action to layer I
Proposition layer i+1 For each action at layer i
Add all its effects at layer i+1 Also allow propositions at layer i to persist
to i+1
![Page 19: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/19.jpg)
19
Mutual Exclusion (or Mutex)
Actions A,B exclusive (at a level) if A deletes B’s precond, or B deletes A’s precond, or A & B have inconsistent preconds (so they
cannot be executed at the same time) Propositions P,Q inconsistent (at a level)
if all ways to achieve P exclude all ways to achieve
Q
![Page 20: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/20.jpg)
20
Graphplan Create level 0 in planning graph Loop
If goal contents of highest level (nonmutex)
Then search graph for solution If find a solution then return and terminate
Else Extend graph one more level
A kind of double search: forward direction checks necessary
(but insufficient) conditions for a solution, ...
Backward search verifies...
![Page 21: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/21.jpg)
21
Searching for a Solution
For each goal G at time t For each action A making G true @t
If A isn’t mutex with a previously chosen action, select it If no actions work, backup to last G (breadth first search)
Recurse on preconditions of actions selected, t-1
PropositionInit State
ActionTime 1
PropositionTime 1
ActionTime 2
![Page 22: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/22.jpg)
22
Dinner Date
Initial Conditions: (:and (cleanHands) (quiet))
Goal: (:and (noGarbage) (dinner) (present))
Actions:(:operator carry :precondition
:effect (:and (noGarbage) (:not (cleanHands)))(:operator dolly :precondition
:effect (:and (noGarbage) (:not (quiet)))(:operator cook :precondition (cleanHands)
:effect (dinner))(:operator wrap :precondition (quiet)
:effect (present))
![Page 23: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/23.jpg)
23
Planning Graph noGarb
cleanH
quiet
dinner
present
carry
dolly
cook
wrap
cleanH
quiet
0 Prop 1 Action 2 Prop 3 Action 4 Prop
![Page 24: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/24.jpg)
24
Are there any exclusions? noGarb
cleanH
quiet
dinner
present
carry
dolly
cook
wrap
cleanH
quiet
0 Prop 1 Action 2 Prop 3 Action 4 Prop
![Page 25: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/25.jpg)
25
Do we have a solution? noGarb
cleanH
quiet
dinner
present
carry
dolly
cook
wrap
cleanH
quiet
0 Prop 1 Action 2 Prop 3 Action 4 Prop
![Page 26: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/26.jpg)
26
Extend the Planning Graph noGarb
cleanH
quiet
dinner
present
carry
dolly
cook
wrap
carry
dolly
cook
wrap
cleanH
quiet
noGarb
cleanH
quiet
dinner
present
0 Prop 1 Action 2 Prop 3 Action 4 Prop
![Page 27: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/27.jpg)
27
One (of 4) possibilities noGarb
cleanH
quiet
dinner
present
carry
dolly
cook
wrap
carry
dolly
cook
wrap
cleanH
quiet
noGarb
cleanH
quiet
dinner
present
0 Prop 1 Action 2 Prop 3 Action 4 Prop
![Page 28: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/28.jpg)
28
Planning Languages
PDDL Tutorials FF Planner
![Page 29: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/29.jpg)
29
Robot Architectures (page787)
Problem: low level action takes too long to reason about!
Function Based Architecture:
Task Planning and Learning
Vision Inferencing
Map based Navigation
Sensors and Actuators
![Page 30: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/30.jpg)
30
Behavior-based Robotics (page 788)
Rodney Brooks designed behavior-based robotics
Agent design should not be function based (I.e., should not be based on learning, task planning, sensing, etc).
Instead, it should be indepdent modules
Each has own sensing, inferencing, and acting
Higher level modules more intelligent, and can access sensors independently, and can modify outputs of lower-level modules
sensors actuatorsexplore
wonder
Avoid objects
vision
learn
Plan ahead
![Page 31: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/31.jpg)
31
Robot Insect Video
Rodney Brooks’ robots in a video http://www.youtube.com/watch?v=C9p8B7-
5MTI
![Page 32: 1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d785503460f94a5af70/html5/thumbnails/32.jpg)
32
Summary Planning
Reactive systems vs. planning Planners can handle medium to large-
sized problems Relaxing assumptions
Atomic time Agent is omniscient (no sensing necessary). Agent is sole cause of change Actions have deterministic effects
Generating contingent plans Large time-scale Spacecraft control