Fikes 1971 - Strips
Fikes 1971 - Strips
Fikes 1971 - Strips
189
ABSTRACT
We describe a new problem solver called STRIPS that attempts to find a sequence o f operators
in a spcce o f world models to transform a given initial world model into a model in which a
given goal formula can be proven to be true. STRIPS represents a world n,~del as an arbitrary
collection o f first-order predicate calculus formulas and is designed to work with .models consisting o f large numbers o f formulas. It employs a resolution theorem prover to answer questions o f particular models and uses means-ends analysis to guide it to the desired goal-satisfying
model.
DESCRIFIIVE TERMS
Problem solving, theorem proving, robot planning, heuristic search.
1. Introduction
This paper describes a new problem-solving program called STRIPS
(STanford Research Institute Problem Solver). An initial version of the
program has been implemented in LISP on a PDP-10 and is being used in
conjunction with robot ~esearch at SRI. STRIPS is a member of the class of
problem solvers that search a space of "world models" to find one in which a
given goal is achieved. For any world model, we assume that there exists a set
1 The research reported herein was sponsored by the Advanced Research Projects
Agency and the National Aeronautics and Space Administr~ttion under Contract NAS122221.
Artificial Intelligence 2 (1971), 189--208
190
RICHARD E. HKES A N D
NILS J. NILSSON
STRn~S
191
192
parts: a description of the effects of the operator, and the conditions under
which the operator is applicable. The effects of an operator are simply
defined by a list of wffs that must be added to the model and a list of wffs that
are no longer true and therefore must be deleted. We shall discuss the process
of calculating these effects in more detail later. It is convenient to state the
applicability condition, or precondition, for an operator schema as ,~ wff
schenu~. To determine whether or not there is an instance of an operator
schema applicable to a world model, we must be able to prove that there is an
instance of the corresponding wff schema that logically follows from the
model.
For example, consider the question of applying instances of the operator
.subschema goto (m, b) to a world model containing the wff ATR(a), where a
and b are constants. If the precondition wff schema ofgoto (m, n) is ATR(m~,
then we find that the instance ATR(a) can be proved from the world model.
Thus, an applicable instance of goto(m, b) is goto(a, b).
It is important to distinguish between the parameters appearing in wff
schemata and ordinary existentially snd universally quantified variables that
may also appear. Certain modifications must be made to theorem-proving
programs to enable them to handle wff schemata; these are discussed later.
G0al statements are also represented by wfl's. For example, the task "Get
Boxes B and C to Location a" might be stated as the wff:
AT(B, a) A AT(C, a).
To summarize, the problem space for STRIPS is defined by three entiti,s:
(1) An initial world model, which is a set of wffs describing the present
state of the world.
(2) A set of operators, including a description of their effects and their
precondition wff schemata.
(3) A goal cendition stated as a wff.
The problem is solved when STRIPS produces a world model that satisfies
the goal wff.
189-208
STRWS
193
194
'",'%"
I"o"c'%'% ',
OP
c
("1,(%,%))1
i("=,(%0%))
("3" (c;l'Co)~"]
!%
I
In this case, two aRernative subgoals Ga and Gb are set up. These are added
to the front of the goal lists in the two successor nodes. Pursuing one of these
subgoals, suppose that in the node (Mo, (Ga, Go)), goal Go is satisfied in Mo;
the corresponding operator, say OPo, is then applied to Mo to yield M1. Thus,
along this branch, the problem is now to satisfy goal Go from Ml, and this
problem is represented by the node (MI, (Go)). Along the other path, suppose
Gc is set up as a subgoal for achieving Gband thus the node (Mo, (Go, Gb, Go))
is created. Suppose Gc is satisfied in -44oand thus OPc is applied to Mo yielding M2. Now STRIPS must still solve the subproblem Gb before attempting
the main goal Go. Thus, the result of applying OPc is to replace Mo by M2
and to remove Gc from the goal list to produce the node (M2, (Gb, Go)).
Artificial Intelligence 2 (1971), 189-20{,
s33~Jps
195
This process continues until STRIPS produces the node (M,, (Go)). Here
suppose Go can be proved directly from M, so that this node is terminal. The
solution sequence of operators is thus (OPt, OPb, OPe).
This example search tree indicates clearly that when an operator is found
to be relevant, it is not known where it will occur in the completed plan;that
is, it may be applicable to the initial model and therefore be the first operator
applied, its effects may imply the goal so that it is the last operator applied,
or it may be some intermediate step toward the goal. This flexible search
strategy embodied in STRIPS combines many of the advantages of both
forward search (from the initial model toward the goal) and backward
search (from the goal toward the initial model).
I M.O*tJ*ToAt.~ w . o
~ L
(~C)AL.LISTqPIIdAIN GOAL|
~)~lM.
GO&L-LISTI
i
I c,.,.
in,ltl NI
I
i |1 .[11
iii
l
~ALoLOST
!
,.
i,...
P.T?AH OIFFIIqtlvCE TO
N O ~ AkD
IVOR|
,~
Slt|f~!
A i l r O I l | | ~ NOt)~ NAVINI~
r ......
~ U T I
O S~ C f U OAS
'
i
tlIV
.I
1
A L * L t S T ~ N | GOAL,L~T O~ 1HI,
NODI[
J
l
G I ~ I A T ~ O K O~ A
IUCCQIOn ~,OD!
At~
~ m G m qll
GOAL~ T ~ L ~
fa~mm
~ I, om GOAL-LIST
NOM ~ M ,
~EMOII
NO~
Io
GOAL-L~T~L~; f w m l l l I v
GOAL-L~TI
196
the difference (i.e., the uncompleted proof) is stored with the node. Except
for those successor nodes generated as a result of applying operators, the
process of successor generation is as follows: STRIPS selects a node and
uses the difference stored with the node to select a relevant operator. It uses
the precondition of this operator to generate a new successor. (If all of the
node's successors have already been generated, STRIPS selects some other
node still having uncompleted successors.) A flowchart summarizing the
STRIPS search process is shown in Fig. 2.
STRIPS has a heuristic mechanism to select nodes with uncompleted successors to work on next. For this purpose we use an evaluation function that
takes into account such factors as the number of remaining goals on the goal
list, the number and types of predicates in the remaining goal formulas, and
the complexity of the difference attached to the node.
3. Implementation
3.1. Theorem-Proving with Parameters
In this section, we discuss the more important details of our implementation
of STRIPS; we begin by describing the automatic theorem-proving component.
STRIPS uses the resolution theorem-prover QA3.5 [7] when attempting
to prove goal and sub-goal wffs. We assume that the reader is familiar with
resolution proof techniques for the predicate calculus [1]. These techniques
must be extended to handle the parameters occurring in wff schemas; we
discuss these extensions next.
The general situation is that we have some goal wff schema G(p), say, that
is to be proved from a set M of clauses where ~ is a set of schema parameters.
Following the general strategy of resolution theorem provers, we attempt to
prove ~he inconsistency of the set ( M U ~ G(p)). That is, we attempt to
find an instance p' of ~ for which (M U ~ G(,~')} is inconsistent.
We have been able to use the standard unification algorithm of the resolution method to compute the appropriate instances of schema variables during
the search for a proof This algorithm has the advantage that it finds the most
general instances of parameters needed to effect unification. To use the unification algorithm we must specify how it is to treat parameters. The following
substitution types are allowable components of the output of the modified
unification algorithm:
Terms that can be substituted f o r a variable: variables, constants, parameters, and functionel terms not containing the variable
Terms that can be substituted f o r a parameter: constants, parameters,
and functional terms not containing Skolem functions, variables, or
the parameter.
Artificial Intelligence 2 (1971), 189-208
!
STgtPS
197
The fact that the same parameter may have multiple occurrences in a set of
clauses demands another modification to the theorem prover. Suppose tw~
clauses Ct and C2 resolve to form clause C and that in the process some term
t is substituted for parameter p, Then we must make sure that p is replaced
by t in all of the clauses that are descendants of C.
198
InCHeD
]99
STRIPS
negation of the goal wff, plus all of their descendants (if any), less any clauses
eliminated by editing strategies (such as subsumption and predicate evaluation). We take P to be the differevee between M and Gl and attach P :to the
node. s
Later, in attempting to compute a successor to this node with incomplete
proof P attached, we first must select a relevant operator. The quest for
relevant operators proceeds in two steps. In the first step an ordered list of
candidate operators is created. The selection of candidate operators is based
on a simple comparison of the predicates in the difference clauses with those
on the add lists of the operator descriptions. For example, if the difference
contained a clause having in it the negation of a position predicate AT, then
the operator push would be considered as a candidate for this difference.
The second step in finding an operator relevant to a given difference involves employing the theorem prover to determine if clauses on the add list of
a candidate operator can be used to "resolve away" clauses in the difference
(i.e., to see if tire proof can be continued based on the effects of the operator).
If the theorem prover can in fact produce new resolvents that are descendants of the add list clauses, then the candidate operator (properly instantiated) is considered to be a reievant operator for the difference set.
Note that the consideration of one candid~.te operator schema may produce several relevant operator instances. For example, if the difference set
contains the unit clauses ~ ATR(a) and ~ ATR(b), then there are two relevant instances of goto(m, n), namely goto(m, a) and goto(m, b). Each new
resolvent that is a descendant of the operator's add list clauses is used to
form a relevant instance of the operator by applying to the operator's parameters the same substitutions that were made during the production of the
resolvent.
Artific~l Intelligence 2
(1971), 189-208
200
J. NILSSON
world, which are true in all models. The only wffs that might be changed in
this robet environment are the ones that describe the status of the robot and
any objects which it manipulates.
Given this assumption, we have implemented th~ following scheme for
handling multiple world models. All the wffs for all world models are stored
in a common memory structure. Associated with each wfl"(i.e., clause) is a
visibility flag, and QA3.5 has been modified to consider only clauses from the
memory structure that are marked as visible. Hence, we can "define" a particular world model for QA3.5 by marking that model's clauses visible and
all other clauses invisible. When clauses are entered into the initial world
model, they are all marked as visible. Clauses that are not changed remain
visible throughout STRIPS' search for a solution.
Each world model produced by STRIPS is defined by two clause lists. The
first list, DELETIONS, names all those clauses from the initial world model
that are no longer present in the model being defined. The second list,
ADDITIONS, names all those clauses in the model being defined that are
not also in the initial model. These lists represent the changes in the initial
model needed to form the model being defined, and our assumption implies
they will contain only a small number of clauses.
To specify a given world model to QA3.5, STRIPS marks visible the clauses
on the model's ADDITIONS list and marks invisible the clauses on the
model's DELETIONS list. When the call to QA3.5 is completed, the visibility markings of these clauses are returned to their previous settings.
When an operator is applied to a world model, the DELETIONS list of the
new world model is a c.)py of the DELETIONS list of the old model plus
any clauses from the initial model that ere deleted by the operator. The
ADDITIONS list of the new model consists of the clauses from the old
model's ADDITIONS list, as transformed by the operator, plus the clauses
from the operator's add list.
3.5. An Example
Tracing through the main points of a simple example helps to illustrate the
various mechanisms in STRIPS. Suppose we want a robot to gather together
three objects and that the initial world model is given by:
Mo.
AT(BOX , b)
AT(BOX2, c)
ATtBOX3, d)
The goal wff describing this task= is
s'rtn, s
201
AT(BOXI, c) v ~ AT(BOX3. c ) ~
,,, AT(BOX2, b) v
AT(BOX3, b)
~
'
]
v
202
Suppose OPI is selected and used to create a successor node. (Later in the
search process another successor using one of the otLer relevant instances of
push might be computed if our original selection did not lead to a solution.)
Selecting OPI leads to the computation of the successor node (Mo, (GI, Go)).
STRIPS next attempts to find a contradiction for {Mo tJ ~ G l}. The uncompleted proof (difference) attached to the node contains:
~ AT(BOX2. m ) v ~ ATR(m)
AT(BOX2, e) ~
~ ATR(c)
~ A T ( B O X 2 , a)
When this node is later selected to have a successor computed, one of the
candidate operators is g o t o ( m , n). The relevant instance is determined to be
OP2: goto(m, c)
with (negated) precondition
~ Gz:
ATR(m).
This relevant operator results in the successor node (Mo, (6;2, G~, Go)).
Nest STRIPS determines that (Mo t3 ,-- G2) is contradictory with m = a.
Thus, STRIPS applies the operator goto(a, c) to Mo to yield
M,-
ATR(c)
/
AT(BOXI, b) .
AT(BOX2, c)
AT(BOX3, d)
The successor node is (M~, (G~, Go)). Immediately, STRIPS determines that
(M~ U ~ Go) is contradictory with m - c. Thus, STRIPS applies the operator push(BOX2, c, b) to yield
Mz:
ATR(b)
AT(BOX1, b)
AT(BOX2, b)
AT(BOX3, d)
"
The resulting successor node is (M2, (Go)), and thus STRIPS reconsiders the
original problem but now beginning with world model Mz. The rest of the
solution proceeds in similar fashion.
Our implementation of STRIPS easily produces the solution {goto(a, c),
push(BOX2, c, b), goto(b, d), push(BOX3, d, b)}. (Incidentally, Green's
theorem-proving problem-solver [4] has not been able to obtain a solution
to this version of the 3-Boxes problem. It did solve a simpler version of the
problem designed to require only two operator applications.)
Artificial Intelligence 2 (1971), 189-208
s1~n,s
203
4. Example Problems Selved by STRIPS
i I " I1~
!
i
|l
~ll
c~
:j
"
i
"
N
-
N
i
iii
tt
Ii
Artificial Intelh'gence 2 (1971), 189-208
204
describes its performance on three different tasks. The initial world model for
all three tasks consists of a corridor with four rooms and doorways (see
Fig. 3) and is described by the list of axioms in Table 1. Initially, the robot
TABLE 1. Formulation for STRIPS Tasks.
Initial World Model
(VxVyVz)[CONNECTS(x,y,z)=~ CC N N E CTS(x,z,y)]
CONNE~RI,ROOMI,ROOMS)
CONNE~R2,
ROOM2, ROOM 5)
CONNECTS(DOOR3,ROOM3,ROOMS)
CONNECTS(DOOR4,ROOM4,ROOMS)
LOCINROOM(f, ROOM4)
INROOM(BOXI,ROOMD
AT(BOXl,a)
INROOM(BOX2,ROOMI)
AT(BOX2,b)
INROOM(BOX3,ROOMI)
AT(BOX3,c)
INROOM(ROBOT, ROOM 1)
AT(LIGHTSWlTCH l,d)
INROOM(LIGHTSWITCHI,ROOM 1)
ATROBOT(e)
PUSHABLF.(BOXI)
TYPE(BOXI,BOX)
PUSHABLE(BOX2)
TYPE(BOX2,BOX)
PUSHABLE(BOX3)
TYPE(BOX3,BOX)
ONFLOOR
TYPE(IM,DOOR)
STATUS(LIGHTSWITCHI,OFF)
TYPE(D3,DOOR)
TYPE(LIGHTSWITCHI,LIGHTSWITCH)
TYPE(D2,DOOR)
TYPE(DI,DOOR)
Operators
gotol(m): Robot goes to coordinate location m.
Preconditions:
(ONFLOOR) A (3x)[INROOM(ROBOT,x) A LOCINROOM(m,x)]
Delete list: ATROBOT($),NEXTTO(ROBOT,$)
Add list: ATROBOT(m)
g6,o2(m): Robot goes next to item m.
Preconditions:
(ONFLOOR) ^ {(3x)[INROOM(ROBOT,x) A INROOM(m,x)] V (3x)(3y)
[INROOM(ROBOT,x) A CONNECTS(m,x,y)]}
Delete list: ATROBOT($),NEXTrO(ROBOT,$)
Add list: NEXTTO(ROBOT, m)
pushto(m,n): robot pushes object m next[to item n
Precondition:
PUSHABLE(m) ^ ONFLOOR A NEXTTO(ROBOT,m) ^ {(~lx)[INROOM(m,x)
^ INROOM(n,x)] v Ox3y)[INROOM(m,x) A CONNECTS(n,x,y)]}
Delete list: AT ROBOT ($) NEXTrO (ROBOT $) NEXTI'O ($,m)
AT ( m S )
NEXTTO fm$)
Add list: NEXTTO(m,n)
NEXTTO(n,m)
NEXTFO(ROBOT,m)
STRIPS
205
206
mCnAaD
E. ~
AND
NItS
J. Ng,SSON
three-box problem used as an example in the last section.) The third task is for
the robot to go to a designated location, f, in ROOM4.
The operators that are given to STRIPS to solve these problems are
described in Table 1. For convenience we define two "goto" operators, gotol
and goto2. The operator gotol(m) takes the robot to any coordinate location
m in the same room as the robot. The operator goto2(m) takes the robot next
to any item m (e.g., ~ightswitch, door, or box) in the same room as the robot.
The operator pushto(m, n) pushes any pushable object m next to any item n
(e.g., lightswitch, door or box) in the same room as the robot. Additionally,
we have operators for turning on lightswitches, going through doorways, and
climbing on and off boxes. The precise formulation of the preconditions and
the effects of these operat3rs is contained in Table 1.
TASLE 2. Performance of STRIPS on "Ihree Tasks.
Number of operator
Time taken
Number of n o d e s
applications
(in seconds)
On solution In search On solution In search
Tota! Theorem-proving
tyath
tree
path
tree
Turn on the
iightswitch
113.1
Push three
boxes together
66.0
Go to a locat",n
in another room 123.0
83.0
13
21
49.6
104.9
11
12
We also list in Table 1 the goal wffs for the three tasks and the solutions
obtained by STRIPS. Some performance figures for these solutions are
shown in Table 2. In Table 2, the figures in the "Time Taken" column represent the CPU time (excluding garbage collection) used by STRIPS in finding
a solution. Although some parts of our program are compiled, most of the
time is spent running interpretive code; hence, we do not attach much
importance to these times. We note that in all cases most of the time is spent
doing theorem proving (in QA3.5).
The next columns of Table 2 indicate the number of nodes generated and
the number of operator applications both in the search tree and along the
solution path. (Recall from Fig. 2 that some successor nodes do not correspond to operator applications.) We see from these figures that the general
search heuristics built into STRIPS provide a highly directed search toward
the goal. These heuristics presently give the search a large "depth-first"
component, and for this reason STRIPS obtains an interesting but nonoptimal solution to the "turn on the light-switch" problem.
Artbqcial Intelligence 2 (1971), 189--208
207
slmn,s
208
Clearly one must not give such a system a problem too far away from the
boundary of known abilities, because the combinatorics of search will then
make a solution unlikely. However, a truly "intelligent" system ought
always to be able to solve slightly more difficult problems than any it has
solved before.
ACKNOWLEDGEMENT
The development of the ideas embodied in STRIPS has been the result of the combined
efforts of the present authors, Bertrmn Raphael, Thomas Garvey, John Mtmson, a:~d
Richard Waldinger, all members of the Artificial Intelligence Group at SRL
The research reported herein was sponsored by the Advanced Research Projects Agency
andthe National Aeronautics and Space Administration under Contract NAS12-2221.
REFERENCES