Planning Examples

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Planning Examples

1. The Blocks World Problem


In order to compare the variety of methods of planning, we should find it useful to
look at all of them in a single domain that is complex enough that the need for each of the
mechanisms is apparent yet simple enough that easy-to-follow examples can be found.
 There is a flat surface (table) on which blocks can be placed.
 There are a number of square blocks, all the same size.
 They can be stacked one upon the other.
 There is robot arm that can manipulate the blocks. ( A robot arm can pick up a block and
move it to another position, either on the table or on top of another block.)
Actions of the robot arm
1. UNSTACK (A, B): Pick up block A from its current position on block B.
2. STACK (A, B): Place block A on block B.
3. PICKUP (A): Pick up block A from the table and hold it.
4. PUTDOWN (A): Put block A down on the table.
Note: The robot arm can hold only one block at a time.
Predicates
In order to specify both the conditions under which an operation may be performed
and the results of performing it, we need the following predicates:
1. ON (A, B): Block A is on Block B.
2. ONTABLES (A): Block A is on the table.
3. CLEAR (A): There is nothing on the top of Block A.
4. HOLDING (A): The arm is holding Block A.
5. ARMEMPTY: The arm is holding nothing.

Example: A planning problem in the blocks world - building a three-block tower.

Figure: A planning problem in the blocks world - building a three-block tower. One solution
is the sequence [Move (B, Table, C), Move (A, Table, B)].
2. Air cargo transport
Figure below shows an air cargo transport problem involving loading and unloading
cargo onto and off of planes and flying it from place to place. The problem can be defined
with three actions: Load, Unload, and Fly. The actions affect two predicates: In(c, p) means
that cargo c is inside plane p, and At (x, a) means that object x (either plane or cargo) is at
airport a. Note that cargo is not At anywhere when it is In a plane, so At really means
‘available for use at a given location’. It takes some experience with action definitions to
handle such details consistently. The following plan is a solution to the problem:
[Load (C1, P1, SFO), Fly (P1, SFO, JFK), Unload (C1, P1, JFK),
Load (C2, P2, JFK), Fly (P2, JFK, SFO), Unload (C2, P2, SFO)].

Figure: Transportation of air cargo between airports

3. The spare tire problem


Consider the problem of changing a flat tire. The goal is to have a good spare tire
properly mounted onto the car's axle, where the initial state has a flat tire on the axle and a
good spare tire in the trunk. There are just four actions: removing the spare from the trunk,
removing the flat tire from the axle, putting the spare on the axle, and leaving the car
unattended overnight. We assume that the car is in a particularly bad neighbourhood, so that
the effect of leaving it overnight is that the tires disappear.
The description of the problem is shown in below figure. Notice that it is purely
propositional.
Figure: The simple spare tire problem

You might also like