STRIPS
STRIPS
NILSSON
Recommended by B. Raphael
Presented at the 2nd IJCAI, Imperial College, London, England, September 1-3, 1971.
ABSTRACT
We describe a new problem solver called STRIPS that attempts to find a sequence of operators in a space
of 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 model as an arbitrary collection of first-order predicate
calculus formulas and is designed to work with models consisting of large numbers of formulas. It
employs a resolution theorem prover to answer questions of particular models and uses means-ends
analysis to guide it to the desired goal-satisfying model.
DESCRIPTIVE TERMS
Problem solving, theorem proving, robot planning, heuristic search.
CONTENT
1. INTRODUCTION.......................................................................................................................................................................1
2. THE OPERATION OF STRIPS..................................................................................................................................................2
2.1. The Problem Space...............................................................................................................................................................2
2.2. The Search Strategy..............................................................................................................................................................4
3. IMPLEMENTATION..................................................................................................................................................................8
3.1. Theorem-Proving with Parameters.......................................................................................................................................8
3.2. Operator Descriptions and Applications...............................................................................................................................8
3.3. Computing Differences and Relevant Operators................................................................................................................10
3.4. Efficient Representation of World Models.........................................................................................................................10
3.5. An Example........................................................................................................................................................................11
4. EXAMPLE PROBLEMS SOLVED BY STRIPS.....................................................................................................................13
5. FUTURE PLANS AND PROBLEMS......................................................................................................................................16
ACKNOWLEDGEMENT.............................................................................................................................................................17
REFERENCES..............................................................................................................................................................................18
1. INTRODUCTION
operators that transforms a given initial world model into one that satisfies some stated
goal condition.
This framework for problem solving has been central to much of the research in
artificial intelligence [1]. Our primary interest here is in the class of problems faced by a
robot in re-arranging objects and in navigating, i.e., problems that require quite complex
and general world models compared to those needed in the solution of puzzles and games.
In puzzles and games, a simple matrix or list structure is usually adequate to represent a
state of the problem. The world model for a robot problem solver, however, must include a
large number of facts and relations dealing with the position of the robot and the positions
and attributes of various objects, open spaces, and boundaries. In STRIPS, a world model
is represented by a set of well-formed formulas (wffs) of the first-order predicate calculus.
Operators are the basic elements from which a solution is built. For robot problems,
each operator corresponds to an action routine2 whose execution causes a robot to take
certain actions. For example, we might have a routine that causes it to go through a
doorway, a routine that causes it to push a box, and perhaps dozens of others.
Green [4] implemented a problem-solving system that depended exclusively on
formal theorem-proving methods to search for the appropriate sequence of operators.
While Green's formulation represented a significant step in the development of problem-
solvers, it suffered some serious disadvantages connected with the “frame problem” 3 that
prevented it from solving nontrivial problems.
In STRIPS, we surmount these difficulties by separating entirely the processes of
theorem proving from those of searching through a space of world models. This separation
allows us to employ separate strategies for these two activities and thereby improve the
overall performance of the system. Theorem-proving methods are used only within a given
world model to answer questions about it concerning which operators are applicable and
whether or not goals have been satisfied. For searching through the space of world models,
STRIPS uses a GPS-like means-end analysis strategy [6]. This combination of means-ends
analysis and formal theorem-proving methods allows objects (world models) much more
complex and general than any of those used in GPS and provides more powerful search
heuristics than those found in theorem-proving programs.
We proceed by describing the operation of STRIPS in terms of the conventions used
to represent the search space for a problem and the search methods used to find a solution.
We then discuss the details of implementation and present some examples.
formulas (wffs). For example, to describe a world model in which the robot is at location
LOC_A and boxes B and C are at locations LOC_B and LOC_C we would include the
following wffs:
atr(LOC_A), at(B, LOC_B), at(C, LOC_C).
We might also include the wff:
(uxy){[at(u,x) (x y)] at(u,y)}
to state the general rule that an object in one place is not in a different place. Using
first-order predicate calculus wffs, we can represent quite complex world models and can
use existing theorem-proving programs to answer questions about a model.
The available operators are grouped into families called schemata. Consider for
example the operator goto for moving the robot from one point on the floor to another.
Here there is really a distinct operator for each different pair of points, but it is convenient
to group all of these into a family goto (m,n) parameterized by the initial position4 m and
the final position n. We say that goto (m,n) is an operator schema whose members are
obtained by substituting specific constants for the parameters m and n. In STRIPS, when
an operator is applied to a world model, specific constants will already have been chosen
for the operator parameters.
Each operator is defined by an operator description consisting of two main 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 a
wff schema. 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, LOC_B) to a world model containing the wff atr(LOC_A), where LOC_A and
LOC_B are constants. If the precondition wff schema of goto (m,n) is atr(m), then we find
that the instance atr(LOC_A) can be proved from the world model. Thus, an applicable
instance of goto(m, LOC_B) is goto(LOC_A, LOC_B).
It is important to distinguish between the parameters appearing in wff schemata and
ordinary existentially and 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.
Goal statements are also represented by wffs. For example, the task Get Boxes B
and C to Location LOC_A might be stated as the wff:
at(B, LOC_A) at(C, LOC_A)
To summarize, the problem space for STRIPS is defined by three entities:
4
The parameters m and n are each really vector-valued, but we avoid vector notation here for simplicity. In general, we denote
constants by capital letters near the beginning of the alphabet (A, B, C, …), parameters by letters in the middle of the alphabet
(m, n, …), and quantified variables by letters near the end of the alphabet (x, y, z).
3 Artificial Intelligence 2 (1971), 189-208
Copyright © 1971 by North-Holland Publishing Company
STRIPS RICHARD E. FIKES AND NILS J. NILSSON
(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 condition stated as a wff.
The problem is solved when STRIPS produces a world model that satisfies the goal
wff.
corresponding operator instance is used to transform M0 into a new world model M1. In our
previous simple example, the subgoal wff schema G was atr(m). If the initial model
contains the wff atr(LOC_A), then an instance of G – namely atr(LOC_A) – can be proved
from M0. In this case, the corresponding operator instance goto(LOC_A, LOC_B) is
applied to M0 to produce the new model M1. STRIPS then continues by attempting to
prove G0 from M1. In our example, G0 trivially follows from M1 and we are through.
However, if no proof could be found, subgoals for this problem would be set up and the
process would continue.
The hierarchy of goal, subgoals, and models generated by the search process is
represented by a search tree. Each node of the search tree has the form (<world model>,
<goal list>), and represents the problem of trying to achieve the sub-goals on the goal list
(in order) from the indicated world model.
An example of such a search tree is shown in Fig.1. The top node (M0, (G0))
represents the main task of achieving goal G0 from world model M0.
In this case, two alternative 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 (M0, (Ga, G0)), goal Ga is satisfied in M0; the corresponding operator, say
OPa, is then applied to M0 to yield M1. Thus, along this branch, the problem is now to
satisfy goal G0 from M1, and this problem is represented by the node (M1, (G0)). Along the
other path, suppose Gc is set up as a subgoal for achieving Gb and thus the node (M0, (Gc,
Gb, G0)) is created. Suppose Gc is satisfied in M0 and thus OPc is applied to M0 yielding M2.
Now STRIPS must still solve the subproblem Gb before attempting the main goal G0.
Thus, the result of applying OPc is to replace M0 by M2 and to remove Gc from the goal list
to produce the node (M2, (Gb, G0)).
This process continues until STRIPS produces the node (M4, (G0)). Here suppose G0
can be proved directly from M4 so that this node is terminal. The solution sequence of
operators is thus (OPc, 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).
3. IMPLEMENTATION
C.
3.2. Operator Descriptions and Applications
We have already mentioned that to define an operator, we must state the
preconditions under which it is applicable and its effects on a world model schema.
Preconditions are stated as wff schemata. For example, suppose G(p) is the operator
precondition schema of an operator O(p), p is a set of parameters, and M is a world model.
Then if p' is a constant instance of p for which {M ~G(p')} is contradictory, then
STRIPS can apply operator O(p') to world model M.
We next need a way to state the effects of operator application on world models.
These effects are simply described by two lists. On the delete list we specify those clauses
in the original model that might no longer be true in the new model. On the add list are
those clauses that might not have been true in the original model but are true in the new
model.
For example, consider an operator push(k, m, n) for pushing object k from m to n.
Such an operator might be described as follows:
push(k, m, n)
precondition = atr(m) at(k, m)
delete list = {atr(m), at(k, m)}
add list = {atr(n), at(k, n)}.
The parameters of an operator schema are instantiated by constants at the time of
operator application. Some instantiations are made while deciding what instances of an
operator schema are relevant to reducing a difference, and the rest are made while
deciding what instances of an operator are applicable in a given world model. Thus, when
the add and delete lists are used to create new world models, all parameters occurring in
them will have been replaced by constants.
(We can make certain modifications to STRIPS to allow it to apply operators with
uninstantiated parameters. These applications will produce world model schemata. This
generalization complicates somewhat the simple add and delete-list rules for computing
new world models and needs further study.)
For certain operators it is convenient to be able merely to specify the form of clauses
to be deleted. For example, one of the effects of a robot goto-operator must be to delete
information about the direction that the robot was originally facing even though such
information might not have been represented by one of the parameters of the operator. In
this case we would include the atom facing($) on the delete list of goto with the
convention that any atom of the form facing($), regardless of the value of $, would be
deleted.
When an operator description is written, it may not be possible to name explicitly all
the atoms that should appear on the delete list. For example, it may be the case that a
world model contains clauses that are derived from other clauses in the model. Thus, from
at(B1, a) and from at(B2, a+), we might derive nextto(B1, B2) and insert it into the
model. Now, if one of the clauses on which the derived clause depends is deleted, then the
derived clause must also be deleted.
8 Artificial Intelligence 2 (1971), 189-208
Copyright © 1971 by North-Holland Publishing Company
STRIPS RICHARD E. FIKES AND NILS J. NILSSON
We deal with this problem by defining a set of primitive predicates (e.g., at, atr) and
relating all other predicates to this primitive set. In particular, we require the delete list of
an operator description to indicate all the atoms containing primitive predicates that should
be deleted when the operator is applied. Also, we require that any nonprimitive clause in
the world model have associated with it those primitive clauses on which its validity
depends. (A primitive clause is one which contains only primitive predicates.) For
example, the clause nextto(B1, B2) would have associated with it the clauses at(B1, a) and
at(B2, a+).
By using these conventions, we can be assured that primitive clauses will be
correctly deleted during operator applications, and that the validity of nonprimitive clauses
can be determined whenever they are used in a deduction by checking to see if all of the
primitive clauses on which the non-primitive clause depends are still in the world model.
~atr(LOC_A) and ~atr(LOC_B), then there are two relevant instances of goto(m, n),
namely goto(m,LOC_A) and goto(m,LOC_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.
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:
M0 = {atr(LOC_A), at(BOX1, LOC_B), at(BOX2,LOC_C), at(BOX3,LOC_D)}
The goal wff describing this task is
G0 = (x) [at(BOX1,x) (at(BOX2,x) at(BOX3,x)]
Its negated form is,
~G0 = ~at(BOX1, x) ~at(BOX2, x) ~at(BOX3, x)
(In ~G0, the term x is a universally quantified variable.)
(Futher, we shall denote: precondition as pre, delete list as del, add list as add.)
We admit the following operators:
push (k, m, n) – robot pushes object k from place m to place n.
pre = at(k, m) atr(m), ~ at(k, m) ~ atr(m)
del = atr(m), at(k, m)
add = at(k, n), atr(n)
goto(m, n) – robot goes from place m to place n.
pre = atr(m) ~ atr(m)
del = atr(m)
add = atr(n).
Following the flow chart of Fig. 2, STRIPS first creates the initial node (M0 , (G0))
and attempts to find a contradiction to {M ~G0}. This attempt is unsuccessful; suppose
the incomplete proof is:
We attach this incomplete proof to the node and then select the node to have a
successor computed.
The only candidate operator is push(k, m, n). Using the add list clause at(k, n), we
can continue the uncompleted proof in one of several ways depending on the substitutions
made for k and n. Each of these substitutions produces a relevant instance of push. One of
these is:
OP1 = push(BOX2, m, LOC_B)
given by the substitutions BOX2 for k and LOC_B for n. Its associated precondition
11 Artificial Intelligence 2 (1971), 189-208
Copyright © 1971 by North-Holland Publishing Company
STRIPS RICHARD E. FIKES AND NILS J. NILSSON
When this node is later selected to have a successor computed, one of the candidate
operators is goto(m, n). The relevant instance is determined to be:
OP2 = goto(m, c) with (negated) precondition ~G2 = atr(m).
This relevant operator results in the successor node (M0, (G2, G1, G0)).
Next STRIPS determines that {M0 ~G2} is contradictory with m = LOC_A. Thus,
STRIPS applies the operator goto(LOC_A, LOC_C) to M0 to yield:
M1={atr(LOC_C), at(BOX1,LOC_B), at(BOX2,LOC_C), at(BOX3,LOC_D)}.
The successor node is (M1,(G1,G0)). Immediately, STRIPS determines that {M1
~G0} is contradictory with m = LOC_C. Thus, STRIPS applies the operator push(BOX2,
LOC_C, LOC_B) to yield:
M1={atr(LOC_B), at(BOX1,LOC_B), at(BOX2,LOC_B), at(BOX3,LOC_D)}.
The resulting successor node is (M2, (G0)), and thus STRIPS reconsiders the
original problem but now beginning with world model M2. The rest of the solution
proceeds in similar fashion.
Our implementation of STRIPS easily produces the solution:
(goto(LOC_A,LOC_C), push(BOX2,LOC_C,LOC_B), goto(LOC_B,LOC_D),
push(BOX3, LOC_D, LOC_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.)
STRIPS has been designed to be a general-purpose problem solver for robot tasks,
and thus must be able to work with a variety of operators and with a world model
containing a large number of facts and relations. This section describes its performance on
12 Artificial Intelligence 2 (1971), 189-208
Copyright © 1971 by North-Holland Publishing Company
STRIPS RICHARD E. FIKES AND NILS J. NILSSON
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 operators:
goto1(m) – robot goes to coordinate location m
pre = (onfloor) (x)[inroom(ROBOT,x) locinroom(m,x)]
del = {atrobot($), nextto(ROBOT,$)}
add = {atrobot(m)}
goto2(m) – robot goes next to item m.
pre = (onfloor) [(x)[inroom(ROBOT,x) inroom(m,x)]
(x)( y) [inroom(ROBOT,x) connects(m,x,y)] ]
del = {atrobot($), nextto(ROBOT,$)}
add = {nextto(ROBOT,m)}
pushto(m,n) – robot pushes object m next to item n
pre = pushable(m) onfloor nextto(ROBOT,m)
((x)[inroom(m,x) inroom(n,x)] (x,y)[inroom(m,x) connects(n,x,y)] )
del = {atrobot($), nextto(ROBOT,$), nextto($,m), at(m$), nextto (m$)}
add = {nextto(m,n), nextto(n,m), nextto(ROBOT,m)}
turnonlight(m) – robot turns on lightswitch m.
pre = ((n)[type(n,BOX) on(ROBOT,n) nexto(n,m)]) type(m,LIGHTSWITCH)
del = {status(m,OFF)}
add = {status(m,ON)}
climbonbox(m) – robot climbs up on box m.
pre = onfloor type(m,BOX) nextto(ROBOT,m)
del = {atrobot($), onfloor}
add = {on(ROBOT,m)}
climboffbox(m) – robot climbs off box m.
pre = type(m,BOX) on(ROBOT,m)
del = {on(ROBOT,m)}
add = {onfloor}
gothrudoor (k,l,m) – robot goes through door k from room l into room m.
pre = nextto(ROBOT,k) connects(k,l,m) inroom(ROBOT,l) onfloor
del = {atrobot($), nextto(ROBOT,$), inroom(ROBOT,$)}
add = {inroom(ROBOT,m)}
The first robot task is to turn on the lightswitch. The robot can solve this problem by
going to one of the three boxes, pushing it to the lightswitch, climbing on the box 6 and
6
This task is a robot version of the so-called “Monkey and Bananas” problem. STRIPS can solve the problem even
though the current SRI robot is incapable of climbing boxes and turning on lightswitches.
In Table, 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 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 non-optimal solution to
the “turn on the light-switch” problem.
15 Artificial Intelligence 2 (1971), 189-208
Copyright © 1971 by North-Holland Publishing Company
STRIPS RICHARD E. FIKES AND NILS J. NILSSON
ACKNOWLEDGEMENT
The development of the ideas embodied in STRIPS has been the result of the
combined efforts of the present authors, Bertram Raphael, Thomas Garvey, John Munson,
and Richard Waldinger, all members of the Artificial Intelligence Group at SRI.
The research reported herein was sponsored by the Advanced Research Projects
Agency and the National Aeronautics and Space Administration under Contract NAS12-
2221.
REFERENCES