planning ii cse 573. © daniel s. weld 2 logistics reading for wed ch 18 thru 18.3 office hours no...
Post on 22-Dec-2015
216 views
TRANSCRIPT
![Page 1: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/1.jpg)
Planning II
CSE 573
![Page 2: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/2.jpg)
© Daniel S. Weld 2
Logistics
•Reading for Wed Ch 18 thru 18.3
•Office Hours No Office Hour Today
![Page 3: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/3.jpg)
© Daniel S. Weld 3
573 Topics
Agency
Problem Spaces
Search
Knowledge Representation & Inference
Planning SupervisedLearning
Logic-Based
Probabilistic
ReinforcementLearning
![Page 4: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/4.jpg)
© Daniel S. Weld 4
Planning
• Description of initial state of world E.g., 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 worlds or…
E.g., Logical conjunction Any world satisfying conjunction is a goal (and (on a b) (on b c)))
• Description of available actions
• Sequence of Actions
Input:
Output:
![Page 5: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/5.jpg)
© Daniel S. Weld 5
STRIPS Representation
• 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)
![Page 6: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/6.jpg)
© Daniel S. Weld 6
Action Schemata
(:operator pick-up :parameters ((block ?ob1)) :precondition (and (clear ?ob1)
(on-table ?ob1) (arm-empty))
:effect (and (not (clear ?ob1)) (not (on-table ?ob1))
(not (arm-empty)) (holding ?ob1)))
• Instead of defining: pickup-A and pickup-B and …
• Define a schema:Note: strips doesn’t
allow derived effects;
you must be complete!}
![Page 7: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/7.jpg)
© Daniel S. Weld 7
Planning Outline
• The planning problem• Representation• Compilation to SAT• Searching world states
Regression Heuristics
• Graphplan• Reachability analysis & heuristics
• Planning under uncertainty
![Page 8: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/8.jpg)
© Daniel S. Weld 8
Planning as Search
• Nodes
• Arcs
• Initial State
• Goal State
World states
Action executions
The state satisfying the complete description of the initial conds
Any state satisfying the goal propositions
![Page 9: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/9.jpg)
© Daniel S. Weld 9
Forward-Chaining World-Space Search
AC
BCBA
InitialState Goal
State
![Page 10: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/10.jpg)
© Daniel S. Weld 10
Backward-Chaining Search Thru Space of Partial World-States
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 11: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/11.jpg)
© Daniel S. Weld 11
Planning as Search - Backward
• Nodes
• Arcs
• Initial State
• Goal State
A conjunctive goal (“set of goals”)
Regression of goal through action defn
The goal of the planning problem
A set of goals the planning problem’s initial description
![Page 12: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/12.jpg)
© Daniel S. Weld 12
Regression• Regressing a goal, G, thru an action, A• Yields the weakest precondition G’
Such that: if G’ is true before A is executed G is guaranteed to be true afterwards
A Gp
recon
d
eff
ectG’
Represents a set of
world states
Represents a set of
world states
![Page 13: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/13.jpg)
© Daniel S. Weld 13
Regression Example
pick-up :parameters ((block ?ob1)) :precondition (and (clear ?ob1)
(on-table ?ob1) (arm-empty))
:effect (and (not (clear ?ob1)) (not (on-table ?ob1))
(not (arm-empty)) (holding ?ob1)))
A G
pre
con
d
eff
ectG’
(and (holding C) (on A B))
(and (clear C) (on-table C) (arm-empty) (on A B))
Disjunction preconditions
![Page 14: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/14.jpg)
© Daniel S. Weld 14
Conditional Effects
![Page 15: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/15.jpg)
© Daniel S. Weld 15
Regressing Conditional Effects
A G
pre
con
d
eff
ectG’
(and (at keys home) (at paycheck bank))
(and (at briefcase bank) (in keys briefcase) (not (in paycheck briefcase)) (at paycheck bank))
bankhome
![Page 16: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/16.jpg)
© Daniel S. Weld 16
Heuristics
• Raise issue• Defer until…
![Page 17: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/17.jpg)
© Daniel S. Weld 17
Planning Outline
• The planning problem• Representation• Compilation to SAT• Searching world states
Regression Heuristics
• Graphplan• Reachability analysis & heuristics
• Planning under uncertainty
![Page 18: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/18.jpg)
© Daniel S. Weld 18
Graphplan
• 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 19: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/19.jpg)
© Daniel S. Weld 19
The Plan Graph
…
…
…
level 0 level 2 level 4 level 6
level 1 level 3 level 5
pro
posi
tions
act
ions
pro
posi
tions
pro
posi
tions
pro
posi
tions
act
ions
act
ions
![Page 20: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/20.jpg)
© Daniel S. Weld 20
Graph Expansion
Proposition level 0
initial conditions
Action level i
no-op for each proposition at level i-1
action for each operator instance whose
preconditions exist at level i-1
Proposition level i
effects of each no-op and action at level i
…
…
…
…
i-1 i i+10
![Page 21: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/21.jpg)
© Daniel S. Weld 22
![Page 22: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/22.jpg)
© Daniel S. Weld 23
Mutual Exclusion
Two actions are mutex if• one clobbers the other’s effects or preconditions• they have mutex preconditions
Two proposition are mutex if• all ways of achieving them are mutex
![Page 23: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/23.jpg)
© Daniel S. Weld 25
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 24: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/24.jpg)
© Daniel S. Weld 27
Searching for a solution
If goals are present & non-mutex:Choose action to achieve each goalAdd preconditions to next goal set
Recurse!
![Page 25: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/25.jpg)
© Daniel S. Weld 28
Dinner DateInitial 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 26: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/26.jpg)
© Daniel S. Weld 29
Planning Graph noGarb
cleanH
quiet
dinner
present
carry
dolly
cook
wrap
cleanH
quiet
0 Prop 1 Action 2 Prop 3 Action 4 Prop
![Page 27: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/27.jpg)
© Daniel S. Weld 30
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 28: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/28.jpg)
© Daniel S. Weld 31
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 29: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/29.jpg)
© Daniel S. Weld 32
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 30: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/30.jpg)
© Daniel S. Weld 33
Searching Backwards 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 31: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/31.jpg)
© Daniel S. Weld 34
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 32: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/32.jpg)
© Daniel S. Weld 35
Graphplan Solution Extraction as a Constraint Network
Present@4
NoGarb@4
Dinner@4
Not carry & cook
Not dolly & wrap
Vars =
Domain =
Constraints =
Goals@t
Actions@t-1
![Page 33: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/33.jpg)
© Daniel S. Weld 36
Review: Arc- & Path-Consistency
• Connect with graph construction• What is k?
![Page 34: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/34.jpg)
© Daniel S. Weld 37
Blackbox SAT Encoding
…
…
…
level 0 level 2 level 4 level 6
level 1 level 3 level 5
prop
ositio
ns
action
s
prop
ositio
ns
prop
ositio
ns
prop
ositio
ns
action
s
action
s
![Page 35: Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today](https://reader036.vdocuments.site/reader036/viewer/2022062715/56649d805503460f94a6499c/html5/thumbnails/35.jpg)
© Daniel S. Weld 38
Heuristics for Regression Planning