Title: Planning
1Planning
- Tuomas Sandholm
- Carnegie Mellon University
- Computer Science Department
2Planning
3Search-based problem solving
Actions generate successor states States
completely described only used for successor
generation, heuristic fn. Evaluation goal
testing. Goals represented via goal test
heuristic fn. Black boxes cannot
look inside to select actions that might be
useful Representation of plans unbroken
sequences of actions forward from initial states
(or backward from goal state)
4Get a quart of milk, a bunch of bananas and a
variable-speed cordless drill.
5From problem solving to planning
- Open up the representation (usually FOL or a
subset) - State goals set of sentences
- Actions preconditions effects
- Direct connections between state actions used
in choice of actions - Actions can be added to the plan whenever needed.
- (Also, actions operate on partial state
descriptions) - Most part of the world are independent ? divide
the plan into subplans. - Real world vs. puzzles
6STRIPS language
States are conjunctions of function-free ground
literals At (home) ?Have(milk)
?Have(bananas) ?Have(drill) Often assumed
that if a positive literal does not appear, then
the negation can be assumed (aka. closed world
assumption) Goals are also conjunctions of
literals, but may contain variables At(x)
Sells(x, Milk)
7STRIPS language
Actions
Precondition conjunctions of positive literals
At(here), Path(here, there)
operator
Go (there)
effects conjunction of literals
At(there), ? At(here)
add list delete list
An operator is applicable in states if there is
some way to instantiate the variables in the
operator s.t. every one of the preconditions is
true.
8Planning
Situation-space planning Progression planning
(forward from initial state) high branching
factor Regression planning (backward from
goal) But often need to achieve a conjunction of
goals. STRIPS was incomplete. Fixing it with an
adequate method for handling conjunction goals
is inefficient. Plan-space planning
Refinement ops vs. modification ops
instantiate a var fully vs. partially
instantiated plan
add op
Least-commitment planning
Impose ordering between 2 ops Partial vs. total
order
9Start
Start
Initial State Goal State
LeftShoeOn RightShoeOn
Finish
Finish
(a)
(b)
10Partial Order Plan vs. Total Order Plan
11Planning
- Plan has
- Set of steps (one op per step)
- Set of binary ordering constraints on steps
- A set of variable binding constraints
- A set of causal links. Si ? Sj Si achieves
preconditions c for Sj - The planner only considers adding steps that
serve to achieve a precondition that has not yet
been achieved.
A solution is a complete consistent plan.
Every precondition is achieved by some other step.
No contradiction in the ordering or binding
constraints
12Planning
E.g. Actions Op(ACTION Go(there), PRECOND
At(here), EFFECT At(there) ?At(here))
Op(ACTION Buy(x), PRECOND At(store)
Sells(store,x) EFFECT Have(x))
Start
At(Home) Sells(SM, Banana) Sells(SM,Milk)
Sells(HWS,Drill)
Have(Drill) Have(Milk) Have(Banana) At(Home)
Finish
13Planning
Ordering constraints
Start
At(s), Sells(s,Drill)
At(s), Sells(s,Milk)
At(s), Sells(s,Bananas)
Buy(Drill)
Buy(Milk)
Buy(Bananas)
Have(Drill), Have(Milk), Have(Bananas), At(Home)
Finish
Causal links (protected) Have light arrows at
every bold arrow.
Start
At(HWS), Sells(HWS,Drill)
At(SM), Sells(SM,Milk)
At(SM), Sells(SM,Bananas)
Buy(Drill)
Buy(Milk)
Buy(Bananas)
Have(Drill), Have(Milk), Have(Bananas), At(Home)
Finish
14Planning
Start
At(x)
At (x)
Go(SM)
Go(HWS)
At(HWS), Sells(HWS,Drill)
At(SM), Sells(SM,Milk)
At(SM), Sells(SM,Bananas)
Buy(Drill)
Buy(Milk)
Buy(Bananas)
Have(Drill), Have(Milk), Have(Bananas), At(Home)
Finish
15Planning
Impasse ? must backtrack make another choice
Start
At(Home)
At (Home)
Go(SM)
Go(HWS)
At(HWS), Sells(HWS,Drill)
At(SM), Sells(SM,Milk)
At(SM), Sells(SM,Bananas)
Buy(Drill)
Buy(Milk)
Buy(Bananas)
Have(Drill), Have(Milk), Have(Bananas), At(Home)
Finish
16How to identify a dead end?
(c) Promotion
(a)
(b) Demotion
17Planning
1. Try to go from HWS to SM (i.e. a different way
of achieving At(x))
Start
At(Home)
At (HWS)
Go(SM)
Go(HWS)
2. by promotion
At(HWS), Sells(HWS,Drill)
At(SM), Sells(SM,Milk)
At(SM), Sells(SM,Bananas)
At(SM)
Buy(Drill)
Buy(Milk)
Buy(Bananas)
Go(Home)
Have(Drill), Have(Milk), Have(Bananas), At(Home)
18Planning
If 2 would try At(HWS) or At(Home), threats could
not be resolved.
19Do not backtrack on this
Choose from existing steps or op pool.
Presented as nondeterministic (choose and fail)
POP is a regression planner. Sound complete
Assuming BFS or iterative deepening
20Planning with partially instantiated operators
Keep track of binding lists unify right
expressions at right time.
- Effect ?At(x) is a possible threat for condition
At(Home) - Resolve now with an equality constraint, e.g.
xHWS - Resolve now with an inequality constraint, e.g.
x?HWS - Resolve later (only deal with it if it becomes a
necessary threat) lt- we will now give a POP
algorithm for this
Less commitment
21Planning with partially instantiated operators
- New definition of achievement
- A step Si achieves a precondition c of step Sj if
- (1) Si lt Sj and Si has an effect that necessarily
unifies with c, and - (2) there is no step Sk such that Si lt Sklt Sj in
some linearization of the plan, and Sk has an
effect that possibly unifies with ?c
22Planning with partially instantiated operators
Sound complete