Anda di halaman 1dari 18

Planning

Jeremy Wyatt

| 
   
Plan
© Àituation calculus

© The frame problem

© The ÀTRIPÀ representation for planning

© Àtate space planning:

‡ Forward chaining search (progression planning)


‡ Backward chaining search (regression planning)

© Reading: Russell and Norvig pp.375-387

| 
   
Àituation Calculus
© The situation calculus is a general system for allowing you
to reason automatically about the effects of actions, and to
search for plans that achieve goals.

© However, it has some flaws that took a long time to iron


out«

© The situation calculus is composed of


‡ Àituations: À is the initial situation Result(a,À ) is the situation that
results from applying action a in situation À

‡ Fluents: functions and predicates that may be true of some situation


e.g. ¬Holding(G1,À ) says that the agent is not holding G1 in
situation À

| 
   
Àituation Calculus
© |ctions are described in the situation calculus using two kinds of
axioms:
‡ Possibility |xioms: say when you can apply an action
‡ Effect |xioms: that say what happens when you apply them

© The essential problem with situation calculus however, is that

‡ Effect |xioms only say what changes, not what stays the same, but
reasoning in the situation calculus requires the explicit representation of all
the things that don¶t change. These are handled by Frame |xioms, and
hence this is called the Representational Frame Problem.

‡ Reasoning about all the effects and non-effects of a sequence of actions is


thus very inefficient. This is known as the Inferential Frame Problem.

© Eventually solutions to both the Frame Problems were found. But in the
meantime researchers began to look for representations to support more
efficient planning.

| 
   
The ÀTRIPÀ representation
© The Grandad of planning representations

© |voids the difficulties of more general representations (e.g.


situation calculus) for reasoning about action effects and
change

© Devised for, and used in the Àhakey project

© The key contribution of the representation of action effects is


to assume that anything that isn¶t said to change as the
result of an action, doesn¶t change

© It is this assumption (sometimes called the ÀTRIPÀ


assumption) that avoids the representational frame problem

| 
   
ÀTRIPÀ operators

|ction(Move(b,x,y))-
Preconditions: On(b,x) ^ Clear(b) ^ Clear(y)
Effects: On(b,y) ^ Clear(x) ^ ¬On(b,x) ^ ¬Clear(y)

© |ll effects are modelled, anything that isn¶t
in the effects list stays the same
| ë
© The effect P^¬Q adds P to the world
description and removes Q

© Variables in the operator (e.g. x) must be
bound (unified) with entities in the | ë
description of the world to apply the
operator, so Move(C,|,B) requires
{b/C,x/|,y/B}, i.e. b is substituted by C etc.

| 
   
ÀTRIPÀ operators

|ction(Move(b,x,y))-
Preconditions: On(b,x) ^ Clear(b) ^ Clear(y)
Effects: On(b,y) ^ Clear(x) ^ ¬On(b,x) ^ ¬Clear(y)

© ÀTRIPÀ doesn¶t allow us to use full first order
logic
| ë
© Ào we have to create a Clear(b) predicate,
rather than use ' p Ô to indicate that
there is no block x on block b

|lso we actions like Move(C,|,|) create
©
inconsistent effects | ë
© |nd we may need additional special operators
e.g. Move_to_table(b,x,Table) whenever the
effects are slightly different

| 
   
The ÀTRIPÀ state and goal descriptions
Àtate Goal
On(|,Table) On(B,Table) On(|,B)
On(C,|)
Clear(B)
Clear(C) | On(B,C)

 ë
| ë 
© In the state description anything that isn¶t stated is assumed to be false
(Closed World |ssumption)

© Ào only +ve literals are allowed in the state description

© Only ground literals are allowed in the goals. Ào not


On(Next_|lpha(x),C) or On(x,C)

© The goal description specifies a set of states


| 
   
|pplication of an action
Àtate Àtate
On(|,Table) On(B,Table) On(|,Table) On(B,Table)
On(C,|) Clear(C) On(C,|)
On(C,B) Clear(C)
Clear(B) Clear(B)
Clear(|)
 
| ë | ë
|ction(Move(C,x,y))-
|ction(Move(C,|,B))-
|ction(Move(b,x,y))-
|ction(Move(C,|,y))-
© |pply Move(C,|,B)
On(C,x) ^^^Clear(b)
Preconditions: On(C,|)
On(b,x) Clear(C)
Clear(C)^^^Clear(y)
Clear(y)
Clear(B)
Clear(y)
On(C,y) ^^^Clear(x)
Effects: On(C,B)
On(b,y) Clear(x)
Clear(|)^^^^¬On(b,x)
Clear(|) ¬On(C,x)
¬On(C,|)
¬On(C,|)^^¬Clear(y)
^^¬Clear(y)
¬Clear(B)
¬Clear(y)

| 
   
Forward Chaining Àearch

On(|,Table)
On(B,Table)
On(C,Table)
Clear(|)
  | Clear(C) Clear(B)
 
On(|,Table)
On(B,Table)
On(C,|)
Clear(C) Clear(B)
  | ë
On(|,Table)
On(B,Table)
On(C,B)
Clear(C) Clear(|)

| 
   
Forward Chaining Àearch
© Because of the restrictions on ÀTRIPÀ representation there
can only be a finite number of states

© You need a graph search algorithm (e.g. | )

© You need a decent heuristic to control search behaviour

© Forward search is inefficient in the number of irrelevant


actions there are.


 | ë  
| 
   
Backward Chaining Àearch
Initial Àtate: On(|,Table) 
On(B,Table) On(C,|)
Clear(C) Clear(B) | ë
|ction(Move(b,x,y))-
Preconditions: On(b,x) ^ Clear(b) ^ Clear(y)
Effects: On(b,y) ^ Clear(x) ^ ¬On(b,x) ^ ¬Clear(y)

|
  ë

 |  ë

On(B,C) On(|,B)

| 
   
Backward Chaining Àearch
Initial Àtate: On(|,Table) 
On(B,Table) On(C,|)
Clear(C) Clear(B) | ë
|ction(Move(b,x,y))-
Preconditions: On(b,x) ^ Clear(b) ^ Clear(y)
Effects: On(b,y) ^ Clear(x) ^ ¬On(b,x) ^ ¬Clear(y)

|
On(|,Table)
Clear(|)   ë
Clear(B)
On(B,C) 
 |  ë

On(B,C) On(|,B)
ë
 |

| 
   
Backward Chaining Àearch
Initial Àtate: On(|,Table) 
On(B,Table) On(C,|)
Clear(C) Clear(B) | ë
|ction(Move(b,x,y))-
Preconditions: On(b,x) ^ Clear(b) ^ Clear(y)
Effects: On(b,y) ^ Clear(x) ^ ¬On(b,x) ^ ¬Clear(y)

|
On(|,Table)
Clear(|)   ë
Clear(B)
On(B,C) 
ë  |  ë
  | 
 | On(B,C) On(|,B)
ë
 ë
On(|,Table)  |
Clear(B)
On(B,|)
Clear(C)

| 
   
Backward Chaining Àearch
Initial Àtate: On(|,Table) 
On(B,Table) On(C,|)
Clear(C) Clear(B) | ë
On(|,Table) |ction(Move(b,x,y))-
On(B,Table) Preconditions: On(b,x) ^ Clear(b) ^ Clear(y)
Clear(B) Effects: On(b,y) ^ Clear(x) ^ ¬On(b,x) ^ ¬Clear(y)
Clear(C)
Clear(|)
 

 | ë  ë  
|
On(|,Table)
Clear(|)   ë
Clear(B)
On(B,C) 
ë  |  ë
  | 
 | On(B,C) On(|,B)
ë
 ë
On(|,Table)  |
Clear(B)
On(B,|)
Clear(C)

| 
   
Backward Chaining Àearch

© |n operator is chosen that achieves one of the unachieved


parts of the goal state

© Variables in the action are bound to entities in the world

© When an operator is applied


‡ Its positive effects are deleted to create the predecessor
‡ Each precondition is added to the list of sub-goals

© | sub-goal that is not true in the initial state is then chosen


to be achieved

| 
   
Linear vs non-linear planning
© In early planners it was assumed that sub-goals could be solved completely
independently

© |nd the plans produced for these sub-goals could then be sequenced

© This approach is called Linear Planning (Àacerdoti, 1975), but it is incomplete


(not guaranteed to find solutions when they exist) because it doesn¶t interleave
the solutions.

© Non-interleaved planners can¶t solve some problems (e.g. the Àussman


|nomaly)

© Non-linear planners attempt to solve this problem


|
 ë
| ë 
| 
   
Conclusion
© Planning is an important area of |I. Àtate of the art planners are now
beyond human level performance.

© Àpecialist representations of action effects have been used to overcome


issues of representational and inferential inefficiency

© The ÀTRIPÀ representation has been influential, succeeded by |DL and


the overarching framework of PDDL

© Àtate space planning still requires search, either forward or backward


chaining

© This is the ancient history of planning, later on came partial order


planning (1975-1995), satisfiability planners (1992 on), graph planning
(1995 on), and then the resurgence of state space planning (1996 on),
and also planning under uncertainty (decision theoretic planning) (1997
on).

| 
   

Anda mungkin juga menyukai