Title: PLANNING
1PLANNING
- Partial order regression planning
Temporal representation 1 Deductive planning in
Logic Temporal representation 2
2Temporal representation 1
- From STRIPS to a simple situation calculus
3Towards planning as Automated Reasoning
- Formulate in a logic theory T
- The initial situation
- For each operator
- its preconditions
- the relation between the previous
situation and the next one.
- Prove the logical consequence F
There exists a sequence of operations, such
that if they are applied to the initial
situation, the resulting situation satisfies some
given properties.
- Extract the plan from the proof.
4What the STRIPS represen-tation lacks to do this
do NOT describe WHEN (at which time point or in
which situation) these properties hold.
- Remember logic is monotonic no
consequences get removed!
- 2) Add and Delete list are procedural.
- These do not declaratively describe the relation
between the previous situation and the next.
5Introducing temporal information
- Two dimensions of options
on(A,B,T)
on(A,B,S)
holds(on(A,B),T)
holds(on(A,B),S)
6A tiny example problem
7Situation calculus, extra argument.
8The situations in this world
9The plan ?
10Completing situations
- In STRIPS (and in LP) these are implicitly
represented.
- In FOL, we could instead add
?x,y,z,s on(x,y,s) ? yTable ? xz ?
on(z,y,s)
?x,y,z,s on(x,y,s) ? yz ? on(x,z,s)
?x,y,s on(x,y,s) ? yTable ? clear(y,s)
PS also completes all later situations
11Relating different situations (1)
- For each operator we need to represent the
relation between previous and next situation
?s on(B,A,s) ? clear(B,s) ? on(B,Table,moveBATable
(s)) ? clear(A,moveBATable(s))
- Note delete on(B,A) is implicitly represented
because of add on(B,Table) and the completing
formulae.
12Relating different situations Frame axioms (1)
- STRIPS operators only express which things change
!
13Relating different situations Frame axioms (2)
- Anything that was on something else before,
except for B on A, still is
?x,y,s on(B,A,s) ? clear(B,s) ? on(x,y,s) ?
(xB ? yA) ?
on(x,y,moveBATable(s))
- Anything that was clear before, still is
?x,s on(B,A,s) ? clear(B,s) ? clear(x,s)
? clear(x,moveBATable(s))
14Discussion
- This is one of the most simple options.
- Generalizing to operators patterns in not easy.
- But this is sufficient to illustrate planning as
deduction. - We discuss more refined representations later.
15Planning as deduction
- Automated reasoning applied to a simple situation
calculus representation
16The theory and goal
17Normalization
18A linear top-down proof
What is the plan?? The answer substitution
s1/moveBATable(S0)
19The relevance of Frame axioms?
- Find a plan such that B gets on the Table AND A
is still on the Table.
20A linear top-down proofextended
No longer resolves with anything, except frame
axioms !
21Normalization of Frame Axiom 1
?x,y,s on(B,A,s) ? clear(B,s) ? on(x,y,s) ?
(xB ? yA) ? on(x,y,moveBATable(s))
?x,y,s on(x,y,moveBATable(s)) ? on(B,A,s) ?
clear(B,s) ? on(x,y,s) ? (xB ? yA)
?x,y,s (on(x,y,moveBATable(s)) ? xB ? on(B,A,s)
? clear(B,s) ? on(x,y,s)) ? (on(x,y,moveBATable
(s)) ? yA ? on(B,A,s) ? clear(B,s) ?
on(x,y,s))
22The continuation of the proof
23Unique Names Axioms
- For each two non-unifiable syntactic objects o1
and o2 o1o2.
24Can deductive planning achieve the STRIPS
control?
- Definitely does regression (goal directed search)
!
- Reason ? s property(s)
- Resolution steps construct
- s move(move(move( . . . )))
- this is a total order !!
- Need more refined temporal representations to do
these.
25Temporal representation 2
- Representing operator patterns
- Meta-representation
- situation calculus
- Time-point representation
- event calculus
26Representing operator patterns (1)
- S0 still represents the initial situation.
- Representation of a situation resulting from an
operator pattern functor move/4
- WE get MUCH LESS different axioms!
27Representing operator patterns (2)
- Better represent other operator patterns with
other functors (to avoid confusion - and
unification with wrong ones).
- Still 3 such axioms 6 frame axioms needed !
28The full theory
Initial situation
Consistency axioms
New initiated properties for each action
29The full theory (2)
Frame axioms for move x from y to z
Frame axioms for move x from y to table
Frame axioms for move x from Table to y
30Difference with previous representation?
31Difference with previousrepresentation (2)
Also for the frame axioms!
32Meta-representation
33Meta-representation
- Could not be done with extra-argument
representation.
34 Meta-representationinitial situation
35Situation Namesfinal version
1
2
Reason The name of the operator is now a term
that we can abstract with a variable
3
movetoT(B,A)
36Formally situation names
- Situations are now represented as result(o,s) ,
where o is an operator pattern and s a situation.
37Improvement ?
- Use we can now define if list, add list and
delete list of each operator pattern explicitly
with new predicates !
38If-list legal/2 predicate
39Add-list initiates/2 predicate
40Delete-list terminates/2 predicate
41What is gained ?The Situation Calculus!
42Problem independence
- Observe that these axioms defining holds are
problem independent - and can be applied to any planning problem.
- For each new planning problem only initially,
legal, initiates and terminates need to be
defined ! - These correspond to the initial situation and to
the if- add- and delete-lists of operator
patterns.
43Planning
- should be added, where p1,,pn are the properties
that should hold in the goal situation.
- Deduction proceeds similarly to what was
presented in the extra-argument representation.
- In particular the final value for s in the
unifier is the plan !
44Completion and consistency
- Note that all formulae are essentially Horn
clauses (possibly extended with negation in the
bodies - case terminates).
- Disjunctions in bodies are readily transformed to
a set of Horn clauses.
45Completion and consistency (2)
- Assume that this description is complete
(anything else than described is false !), then
we can interpret these Horn clauses as a Logic
program.
- Consequence the consistency axioms are no
longer needed
- Requires that we understand holds(p,s) as
holds(p,s), - then information such as holds(on(B,Table)
,S0) follows from our specification.
46Meta-representation (2)
47Using time points
- Alternative to situations
- Ontology something holds on a specific moment in
time.
48The main axioms
Where the concepts initially/1, initiates/2 and
terminates/2 are the same as before (and problem
dependent), and legal/2 is completely similar as
before,but defined in terms of holds(p,t) instead
of holds(p,s) .
49Event calculus pictured
- When does something hold at time t ?
- If is was true from the beginning and not
clipped
- If something happened to make it true and not
clipped
50The event calculus
- The new elements in this ontology
- Temporal identification through time points
instead of situations. - The relation lt/2 should be defined as a (strict)
partial order (the temporal order on time points)
. - There is now only 1 definition of holds !!
- This includes the initial situation relating
situations the frame axioms! - In situations calculus situations are related to
the previous situation In event
calculus they are related to some previous moment
in time that initiated something (which hasnt
been clipped). - Allows to make bigger steps than just 1 at a
time.
51Relation to planning?
- A plan in this representation is a set of atoms
event(O1,T1) event(O2,T2) event(O3,T3) ..
where each Oi is an operator, each Ti a time
point, Ti lt Ti1 and executing O1, O2, O3, in
sequence in the initial state gives the goal
state.
- We CAN NOT (deductively) !!!!
52Relation to planning (2)
- Deduction from a goal
- needs to go through initiated/2.
- Unless the goal was already satisfied in the
initial state, this requires event/2 facts to
hold ! - But there is NO definition for event/2
- This predicate is the object of our search !!
- SO
- is not a logical consequence of the event
calculus theory. - It is not true in ALL models.
?t holds(on(A,Table) ,t)
53Model generation
- SO the goal
- is not true in all models.
- BUT if there exists a model (with some event/2
facts true) in which the goal is also true, then
the true event/2 atoms in that model give us the
plan. - Model-generation techniques!
- Or alternatively abductive reasoning
techniques. - Meaning find a set of hypothesis ? of event/2
atoms such that
?t holds(on(A,Table) ,t)
?t holds(on(A,Table) ,t)
? ? Theory entails