0% found this document useful (0 votes)
11 views23 pages

CH 11 Classical Planning

Classical planning involves finding a sequence of actions to achieve a goal in a fully observable, deterministic environment, where an agent plans, acts, and learns. It utilizes action schemas represented in PDDL, which define the initial state, actions, results, and goals. The complexity of classical planning includes decision problems like PlanSAT and Bounded PlanSAT, which are decidable and lie in the PSPACE complexity class.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views23 pages

CH 11 Classical Planning

Classical planning involves finding a sequence of actions to achieve a goal in a fully observable, deterministic environment, where an agent plans, acts, and learns. It utilizes action schemas represented in PDDL, which define the initial state, actions, results, and goals. The complexity of classical planning includes decision problems like PlanSAT and Bounded PlanSAT, which are decidable and lie in the PSPACE complexity class.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Chapter 11

Classical Planning
4.7 Definition of Classical Planning

It is defined as the task of finding a sequence of actions to accomplish a goal in a


discrete, deterministic, static, fully observable environment.
In Classical Planning, an agent takes the advantage of the problem structure to construct
complex plans of an action.

The agent performs three tasks in classical planning:

Planning: The agent plans after knowing what is the problem.

Acting: It decides what action it has to take.

Learning: The actions taken by the agent make him learn new things.

Factored representation is the one in which a state of the world is represented by a collection of
variables.
Action schema, represents a number of different actions that can be derived by instantiating the
variables p, from, and to different constants.

In general, an action schema consists of three parts:

1. The action name and parameter list—for example, Fly(p, from, to)—serves to identify
the action.

2. Precondition: The precondition is, what must be true in a state before the action can be
executed. Any variables in the precondition must also appear in the action’s parameter
list.

3. Effect: The effect is to describe, how the state changes when the action is executed.

A language known as PDDL(Planning Domain Definition Language) which is used to


represent all actions into one action schema.
PDLL describes the four basic things needed in a search problem:

 Initial state: It is the representation of each state as the conjunction of the ground and

functionless atoms.
 Actions: It is defined by a set of action schemas which implicitly define
the ACTION() and RESULT() functions.
 Result: It is obtained by the set of actions used by the agent.

 Goal: It is same as a precondition, which is a conjunction of literals (whose value is either

positive or negative).

There are various examples which will make PDLL understandable:

1. Air cargo transport

2. The spare tire problem

3. The blocks world and many more.


Air cargo transport

An air cargo transport problem is based on loading and unloading the cargo and flying it from
one place to another.
This problem can be illustrated with the help of the following actions:
 Load: This action is taken to load cargo.
 Unload: This action is taken to unload the cargo when it reaches its destination.
 Fly: This action is taken to fly from one place to another.

In PDLL,the actions described, (i.e., load, unload, and fly) affects the following two predicates:

 (c,p): the cargo is inside the plane p.

 (x,a): the object x is at the airport a. Here, object can be the cargo or plane.
Below is the PDLL description for Air cargo transport:
It is to be noted that when the plan flies from one place to another, it should carry all cargo inside

it.

It becomes difficult with the PDLL to give solution for such a problem. Because PDLL do not

have the universal quantifier.

Thus, the following approach is used:

 piece of cargo ceases to be On anywhere when it is In a plane.

 the cargo only becomes On the new airport when it is unloaded.

Therefore, the planning for the solution is:

 [ Load (C1, P1, SFO), Fly(P1, SFO, JFK),Unload(C1, P1, JFK),

Load (C2, P2, JFK), Fly(P2, JFK, SFO),Unload(C2, P2, SFO)]


The spare tire problem

The problem is that the agent needs to change the flat tire. The aim is to
place a good spare tire over the car’s axle.
There are four actions to define the spare tire problem:
1. Remove the spare from the trunk.

2. Remove the flat spare from the axle.

3. Putting the spare on the axle.

4. Leave the car unattended overnight. (Assuming that the car is parked at an unsafe
neighborhood.)
 The PDLL description for the spare tire problem is:

 The solution to the problem is:


 [Remove(Flat,Axle),Remove(Spare,Trunk), PutOn(Spare, Axle)]
Blocks World Problem

Suppose you have three cubical blocks, A, B, and C, and a robot arm that can pick up and move
one block at a time
Suppose they are initially arranged on a table like, A and B are on the table, and C is on top of A.

Suppose, we want to re-arrange them like, C must be on table, B on top of C and A on top of B.
Suppose, we re-arrange blocks by picking up one block at a time and moving it to the table, or on
top of another block
 We can only pick up a block if there is nothing on top if it
 On(b, x) : indicate that , block b is on x, where x is either another block or the table.

 Move(b, x, y) : indicates that, moving block b from the top of x to the top of y .

 Clear(x) means there is nothing on top of object x.

 Action(Move(b, x, y)

 PRECOND: On(b, x) ∧ Clear (b) ∧ Clear (y) ∧ Block (b) ∧ Block (y) ∧ (b=x) ∧ (b=y) ∧ (x=y),

 EFFECT: On(b, y) ∧ Clear (x) ∧ ¬On(b, x) ∧ ¬Clear (y))

Move(b, x, y) is the action that moves block b The effect of Move(b, x, y) is:

from x to y, and it has this pre-condition:  b is on top of y

 b must clear so that b can be picked up  y is no longer clear (because b has been put on it)

 y must be clear so that b can be placed on top of  x is clear (because b has been moved from on top of

it it)
 b must be on top of x  b is no longer on top of x
The table presents a problem
Move(B, Table, C) has the effect Clear(Table); so we will take Clear(Table) to mean that a
block can be placed on the table
Move(C, A, Table) has the effect !Clear(Table); but the table should always have space for
a block, so that cannot happen

So add a second action schema:


Action(MoveToTable(b, x)
 PRECOND: On(b, x) ∧ Clear (b) ∧ Block (b) ∧ (b=x),

 EFFECT: On(b, Table) ∧ Clear (x) ∧ ¬On(b, x))

We take the interpretation of Clear (x) to be “there is a clear space on x to hold a
block.” Under this interpretation, Clear (Table) will always be true.
Complexity of the classical planning

In classical planning, there occur following two decision problems:


1. PlanSAT: It is the question asking if there exists any plan that solves a planning problem.

2. Bounded PlanSAT: It is the question asking if there is a solution of length k or less than
it.

PlanSAT and Bounded PlanSAT are decidable for classical planning.

Both decision problems lie in the complexity class PSPACE, which is larger than
NP.
PSPACE is the class which refers to those problems that can be solved via
deterministic Turing machine under a polynomial amount of space.
It can be concluded that:
PlanSAT is P whereas Bounded PlanSAT is NP-complete.

Optimal planning is hard with respect to sub-optimal planning.

Advantages of Classical Planning


It has provided the facility to develop accurate domain-independent heuristics.

The systems are easy to understand and work efficiently.


4.8 Algorithms for Planning

In Description of planning to a problem defines a search problem: here the


search takes place from the initial state through the state space, looking for a
goal.

In Declarative representation of action schemas we can also search backward


from the goal, looking for the initial state.

The third possibility is to translate the problem description into a set of logic
sentences and logical inferences algorithms can be applied to find the solution.
Forward state-space search for planning

Forward state-space search is also called progression algorithm.

We can use either heuristic search algorithms or local search algorithm

start in the initial state

use actions to search forward for a goal state

Need accurate heuristic

Forward search prone to exploring irrelevant actions

i.e. buying a book by ISBN (10 digits number), search through 10 billion ground
actions, enumerating too many ISBN’s to reach the goal state.
Planning problems often have large state spaces

 i.e. Air cargo problem with 10 airports, 50 planes and 20 pieces of cargo per airport

 Goal: moving cargo from airport A to airport B

 Average branching factor is huge: 50 planes can fly to 9 other airports, each of 200 packages can be
unloaded or loaded
 Minimum of 450 actions per state (all packages at airports with no planes)

 Maximum of 10,450 (all packages and planes at the same airport)

 Search graph with around 2000 possible actions per state: depth of solution has about 2000^41 nodes.
Reverse state-space search for planning
Reverse state-space search is also called regression algorithm.

start from goal states .

use reverse actions to search forward for the initial state.

Consider the set of relevant states at each level (not only one).

If there are n ground fluents in a domain, then there are 2^n ground states (each fluent can be true
or false), but 3^n descriptions of sets of goal states (each fluent can be positive, negative, or not
mentioned).

Given a ground goal description g and a ground action a, the regression from g over a gives us a
state description g' defined by

g' = (g − ADD(a))∪ Precond(a) .


For example, suppose the goal is to deliver a specific piece of cargo to SFO: At(C2, SFO).

That suggests the action Unload(C2, p', SFO):

 Action(Unload(C2, p', SFO)

 PRECOND: In(C2, p') ∧ At(p', SFO) ∧ Cargo(C2) ∧ Plane(p') ∧ Airport(SFO)

 EFFECT: At(C2, SFO) ∧ ¬In(C2, p')

The regressed state description is

g'= In(C2, p') ∧ At(p', SFO) ∧ Cargo(C2) ∧ Plane(p') ∧ Airport(SFO).


Heuristics for planning
Heuristics for planning

 (h(s)) estimates distance from a state (s) to the goal

 If we find an admissible heuristic (one that doesn’t overestimate), we can use (A*)

 In order to find optimal solutions

 To define an admissible heuristic we could relax the problem (define a problem easier to solve)

Search problem as a graph

 Nodes are states and edges are actions

 Problem is to find a path from initial state to a goal state

 Two ways to relax the problem

 Adding edges to the graph, makes it easier to find a path to the goal

 Grouping multiple nodes together, abstraction of the state space with fewer states, easier to
Important to make forward or backward search efficient.

The easiest form of state abstraction is to ignore some fluents.

In the cargo problem:

 10 airports, 50 planes, 200 pieces of cargo

 Each plane can be at one of 10 airports, each package can be uploaded into a plane or unloaded at an
airport
 There are 50^{10} times, 200^(50+10)approx 10^(155) states possible.

Particular cargo problem instance:

 All packages are in 5 airports

 All packages at given airport have the same destination

 A useful abstraction

 Drop all the At fluents except those involving a plane and one package at each of the 5 airports

 There are 5^(10)times 5^(5+10) approx 10^(17) states.


When defining heuristics

A key idea is decomposition:

Divide the problem into parts

Solve each part independently

Combine the parts

We make the subgoal independence assumption

his assumption can be:The cost of solving a conjunction of subgoals is


approximated by the sum of the costs of solving each subgoal independently.

You might also like