cs221-lecture9
cs221-lecture9
Right
Shoe
Start Finish
Finish
Start
Left
Sock
Finish
Plan-space search
Progression vs. Regression
Ontable(A) Pickup(A)
~Clear(A)
B
~Ontable(A)
Ontable(B), Ontable(B), ~clear(B) Putdown(A)
holding(A)
Clear(A) Clear(B) ~clear(B)
holding(B)
Clear(B) hand-empty
~handempty
hand-empty
~Clear(B) Stack(A,B)
Pickup(B) ~Ontable(B) holding(A)
Ontable(A), clear(B) Putdown(B)??
Clear(A)
~handempty
Planning vs. Search
Search assumes successor and goal-test functions which know how to
make sense of the states and generate new states
Planning makes the additional assumption that the states can be
represented in terms of state variables and their values
Initial and goal states are specified in terms of assignments over state variables
Which means goal-test doesn’t have to be a blackbox procedure
That the actions modify these state variable values
The preconditions and effects of the actions are in terms of partial assignments over
state variables
Given these assumptions certain generic goal-test and successor functions can
be written
Specifically, we discussed one Successor called “Progression”, another called
“Regression” and a third called “Partial-order”
Notice that the additional assumptions made by planning do not change the
search algorithms (A*, DFS, etc)—they only change the successor and
goal-test functions
In particular, search still happens in terms of search nodes that have parent
pointers etc.
The “state” part of the search node will correspond to
“Complete state variable assignments” in the case of progression
“Partial state variable assignments” in the case of regression
“A collection of steps, orderings, causal commitments and open-conditions in the case of partial
order planning
State of the art
Annual planning competitions
Best technique has varied over time
Currently: mostly forward state-space
Largely due to good heuristics (relaxed prob.)
Heuristics for atomic (state search) problem
Can only come from outside analysis of domain
Heuristics for factored (planning) problem
Can be domain-independent
8-puzzle state space
8-puzzle action schema
Action(Slide(t, a, b),
Pre: On(t, a)∧ Tile(t) ∧ Blank(b) ∧ Adjacent(a,b)
Eff: On(t, b) ∧Blank(a) ∧ ¬On(t, a) ∧¬Blank(b))
8-puzzle heuristics
Convex search: ignore del lists
Factored Rep allows control
Factored Rep allows control
Planning Graphs
Planning graphs are an efficient way to
create a representation of a planning
problem that can be used to
Achieve better heuristic estimates
Directly construct plans
Planning graphs only work for
propositional problems
Compile to propositional if necessary
Planning Graphs
Planning graphs consists of a seq of levels
that correspond to time steps in the plan.
Level 0 is the initial state.
Each level consists of a set of literals and a
set of actions that represent what might be
possible at that step in the plan
Might be is the key to efficiency
Records only a restricted subset of possible
negative interactions among actions.
Planning Graphs
Each level consists of
Literals = all those that could be true at
that time step, depending upon the actions
executed at preceding time steps.
Actions = all those actions that could
have their preconditions satisfied at that
time step, depending on which of the
literals actually hold.
Planning Graph Example
Init(Have(Cake))
Goal(Have(Cake) Eaten(Cake))
Action(Eat(Cake),
PRECOND: Have(Cake)
EFFECT: ¬Have(Cake) Eaten(Cake))
Action(Bake(Cake),
PRECOND: ¬ Have(Cake)
EFFECT: Have(Cake))
Planning Graph Example
Initially the plan consist of 5 literals from the initial state (S0).
Add actions whose preconditions are satisfied by EXPAND-GRAPH (A0)
Also add persistence actions and mutex relations.
Add the effects at level S1
Repeat until goal is in level Si
GRAPHPLAN example
In S2, the goal literals exist and are not mutex with any other
Solution might exist and EXTRACT-SOLUTION will try to find it
EXTRACT-SOLUTION can search with:
Initial state = last level of PG and goal goals of planning problem
Actions = select any set of non-conflicting actions that cover the goals in the state
Goal = reach level S0 such that all goals are satisfied
Cost = 1 for each action.
GRAPHPLAN Termination
Termination of graph construction? YES
PG are monotonically increasing or decreasing:
Literals increase monotonically
Actions increase monotonically
Mutexes decrease monotonically
Because of these properties and because
there is a finite number of actions and literals,
every PG will eventually level off
Planning with Structured Rep
Situation Calculus
First-order Logic
Situation Calculus
Convenient to have more expressive lang.
“Move all the cargo from SFO to JFK”
Use existing mechanisms for logical proof
Strong foundation for studying planning
Still, less used in practice than other
techniques
Situation Calculus
Possibility Axioms (for each action)
SomeFormula(s) ⇒Poss(a, s)
Alive(Agent, s) ∧ Have(Agent, Arrow, s) ⇒
Poss(Shoot, s)
Successor-state Axiom (for each fluent)
Poss(a, s) ⇒(fluent is true ⇔ a made it true
∨ it was true and a left it alone)
Poss(a, s) ⇒ (Holding(Agent, g, Result(s, a)) ⇔
a = Grab(g) ∨
(Holding(Agent, g, s) ∧ a ≠ Release(g)))