Things That Change by Themselves

Things T h a t Change by Themselves
V l a d i m i r Lifschitz
Arkady Rabinov
Computer Science Department
Stanford University
Stanford, California 94305
Abstract
One of the proposed solutions [Lifschitz, 1987] describes the effects of actions using the predicate causes.
For instance, the effect of m o v i n g a block b to a location
/ can be expressed by the a x i o m
Some fluents (for instance, time) change even
after events t h a t are not assumed to affect them
(such as the action wait). We propose a f o r m a l ization of the "commonsense law of i n e r t i a " in
the situation calculus t h a t allows us to describe
such fluents.
1
The commonsense law of i n e r t i a can be postulated then
in the following f o r m :
Introduction
The frame problem in A r t i f i c i a l Intelligence is the problem of specifying formally "what doesn't change when an
event occurs" in such a way t h a t the formal system "be
ready to accept descriptions of new kinds of events and
new kinds of fluents whose values are in general not affected by events whose descriptions d o n ' t mention t h e m "
[McCarthy, 1987].p The assertion t h a t the value of a fluent / does not change when an action a is performed in
a situation s can be expressed by the equation
(1)
The question is how to express t h a t this is true " i n general," w i t h the exceptions corresponding to the cases
when other axioms postulate a new value for /. The
default principle according to which the values of fluents
are presumed to remain unchanged is sometimes called
the "commonsense law of i n e r t i a . " Formalizing this p r i n ciple is considered one of the central problems in formal
nonmonotonic reasoning.
The proposal of [ M c C a r t h y , 1986] was to restrict (1) to
the t r i p l e s t h a t d o not satisfy a n " a b n o r m a l i t y "
predicate
Circumscription is used to ensure t h a t the extent of ab
is m i n i m a l . Some difficulties were uncovered in [Hanks
and M c D e r m o t t , 1986], Section 3, and [McCarthy, 1986],
Section 12. Several modifications t h a t fix these problems
have been f o u n d ; for references and a critical discussion,
see [Hanks and M c D e r m o t t , 1987].
*This research was partially supported by DARPA under
Contract NOO039-84-C-O211.
We use the terminology and notation of the situation
calculus [McCarthy and Hayes, 1969].
864
Planning, Scheduling, Reasoning About Actions
The predicate causes is circumscribed; as a result, the
antecedent of (3) is "generally t r u e , " and (3) can serve
as the desired weakening of (1).
A x i o m (3) asserts t h a t the value of a fluent does not
change after an action is p e r f o r m e d t h a t action
causes the fluent to take on some
In this paper we argue t h a t , in many domains, this interpretation of "commonsense i n t e r i a " is inappropriate. There
are fluents t h a t may change no m a t t e r what action is
performed. The simplest example is the integer-valued
fluent time, characterized by the equation
The value of time in the situation result (wait, s) is different f r o m its value in the s i t u a t i o n s in spite of the fact
t h a t wait is not assumed to cause any changes whatsoever. We call fluents t h a t can change even after an action
like wait " d y n a m i c . "
We discuss here an alternative, more flexible description of commonsense i n e r t i a , t h a t allows us to formalize
reasoning about dynamic fluents. This description uses
a new binary
predicate
noninertial("the
fluent
/
is noninertial relative to the action
). We w i l l write
the commonsense law of i n e r t i a as follows:
The predicate noninertial w i l l be circumscribed, like ab
i
n
<
2
) -
It is clear t h a t (4) is quite close to (2); the only difference (other t h a n the more suggestive name of the
predicate) is t h a t in (4) the antecedent loses its situation argument. By changing the original f o r m u l a t i o n of
The formulation proposed in [Haugh, 1987] is based essentially on the same assumption.
the H a n k s - M c D e r m o t t c o u n t e r e x a m p l e i n t h i s way, w i t h
few a d d i t i o n a l m o d i f i c a t i o n s , we get a p a r t i c u l a r l y simple
t h e o r y t h a t eliminates all u n w a n t e d models. ( I n fact, i t
is strange t h a t t h i s m e t h o d was n o t proposed a m o n g the
first responses to the " Y a l e s h o o t i n g " challenge.) T h e
o r i g i n a l f o r m (2) can be t h o u g h t of as a f o r m a l i z a t i o n of
the assertion:
Normally,
value ( / , result(a,
s))
F o r m u l a (4) says s o m e t h i n g s l i g h t l y different:
Normally,
In other w o r d s , the existence of a situation in w h i c h t h e
execution of a changes the value of / is considered exceptional.
I t s h o u l d b e p o i n t e d o u t , however, t h a t the new
m e t h o d , like the causality-based f o r m a l i s m s , does n o t
address the p r o b l e m of " r a m i f i c a t i o n s , " or i n d i r e c t effects of an a c t i o n . 3
F i r s t we discuss the use of noninertial in the s h o o t i n g
example (Sections 2, 3), and t h e n a p p l y the m e t h o d to
some examples of d y n a m i c fluents (Sections 4, 5).
2
separately w h a t happens when the p r e c o n d i t i o n is n o t
satisfied. T h i s is done in a x i o m (12).
We also have the usual i n i t i a l c o n d i t i o n s :
holds (loaded , 5 0 ) ,
(13)
holds (alive , 5 0 ) .
(14)
( A c t u a l l y , a d d i n g these p a r t i c u l a r i n i t i a l c o n d i t i o n s
makes a x i o m (7) r e d u n d a n t : It follows f r o m axioms ( 5 ) ,
(6) and (13).)
Formulas ( 5 ) - ( 1 4 ) are all the axioms we need, if we
restrict a t t e n t i o n to term models, i.e., to the models in
w h i c h every element of the universe is represented by
exactly one g r o u n d t e r m of the corresponding sort. Such
a m o d e l is d e t e r m i n e d , up to an i s o m o r p h i s m , by the set
o f g r o u n d atoms t h a t are true i n i t .
Let A\ be the a x i o m set (5)—(14).
By a minimal
m o d e l we understand a model in w h i c h the predicate
noninertial is circumscribed, w i t h holds varied.
P r o p o s i t i o n 1.
The axiom set A\ has a unique minimal
term model.
This model satisfies the condition
The Hanks-McDermott Example
We assume t h a t the reader is f a m i l i a r w i t h [Hanks a n d
M c D e r m o t t , 1986] or w i t h another e x p o s i t i o n of t h a t
c o u n t e r e x a m p l e . T h e language we use is essentially the
same as in the original f o r m u l a t i o n , except t h a t the
t e r n a r y predicate ab is replaced by the b i n a r y predicate
noninertial. T h e fluent constants are loaded and alive;
the action constants are load) wait a n d shoot; the only
s i t u a t i o n c o n s t a n t is 5 0 .
Since all fluents in this example are p r o p o s i t i o n a l , it
is convenient to use the predicate holds instead of the
f u n c t i o n value. A c c o r d i n g l y , a x i o m (4) takes the f o r m
P r o o f . Consider the s t r u c t u r e M whose universe consists of the ground terms of the language, in w h i c h holds
has its intended meaning, and noninertial is defined by
(15). It is clear t h a t M is a m o d e l of A\. A x i o m s ( 7 ) ,
(9) and (11) show, first, t h a t M is m i n i m a l , a n d , second,
t h a t any m i n i m a l model satisfies (15) also. F u r t h e r m o r e ,
it is easy to check by i n d u c t i o n t h a t f o r m u l a s (5), ( 6 ) ,
(8), (10), ( 1 2 ) - ( 1 5 ) completely determine the e x t e n t of
holds in any t e r m m o d e l . Consequently, no t e r m m o d e l
other t h a n M is m i n i m a l .
3
The Qualification Problem
T h e f o r m a l i z a t i o n given above does not address the q u a l i f i c a t i o n p r o b l e m — t h e p r o b l e m of leaving the lists of preconditions " o p e n , " so t h a t it w o u l d be possible to incorporate new preconditions by a d d i n g new axioms. According to a x i o m (6), for example, l o a d i n g has no prec o n d i t i o n s ; it always gives the desired effect. We m a y
wish to make the a x i o m a t i z a t i o n slightly more realistic,
and formalize the fact t h a t one cannot load the gun if it
is locked in a safe, or if bullets are unavailable. It is i m possible to do t h a t by s i m p l y a d d i n g a x i o m s ; we w o u l d
have to replace (6) by a weaker a x i o m , w i t h the preconditions listed in the antecedent. S i m i l a r l y , loaded is t h e
only p r e c o n d i t i o n included in (10); should we decide to
i n c o r p o r a t e other preconditions, it w i l l be necessary to
change t h a t a x i o m .
An action can be unsuccessful in t w o different ways:
It can be physically impossible, or it can merely fail to
produce a p a r t i c u l a r effect [Pednault, 1988], [Gelfond
et a/., 1989]. In this paper, we assume for s i m p l i c i t y
t h a t any action is physically possible in any s i t u a t i o n , 4
Important ideas related to the ramification problem are
proposed in the forthcoming paper [Baker, 1989].
4
Formalizing actions that can be physically impossible is
discussed in [Gelfond et a/., 1989].
Lifschitz and Rabinov
865
and restrict our a t t e n t i o n to "weak" preconditions—
preconditions for particular effects. In Section 2, for i n stance, loaded is treated as a precondition for the success
of shoot in the weak sense; if the gun is not loaded in
a situation s, then the expression result(shoot, s) represents a physically meaningful situation, b u t , according
to (12), the value of alive in t h a t situation is the same
as its value in the situation s.
In this section we describe an enhancement of Al t h a t
provides an improved treatment of weak preconditions.
The assumption t h a t loaded should hold in order for
shoot to affect alive w i l l be represented by the a x i o m
precond(loaded , shoot, alive ),
(16)
where precond is a new predicate constant. 5 T h i s predicate w i l l be circumscribed along w i t h noninertial. Its
m a i n property is expressed by the a x i o m :
T h i s observation shows that (17) is complementary to
such axioms as (18)-(20): It shows how to determine
the new value of a fluent when the succeeds condition is
violated.
The new f o r m u l a t i o n of the shooting example includes
the following postulates. General axioms: (5), (17). Effects of actions: (18)-(20), (7), (9), (11). Preconditions:
(16). I n i t i a l conditions: (13), (14). We denote this axiom set by A2. By a minimal model we understand now
a model in which noninertial and precond are circumscribed in parallel, w i t h holds varied.
P r o p o s i t i o n 2. Tiie axiom set A2 has a unique minimal
term model This model satisfies (15) and
The proof is completely analogous to the proof of
Proposition 1.
4
where p is a variable for propositional fluents. If / ranges
over propositional fluents also, then we can write instead:
Notice that when the shooting example is reformulated in this way, axiom (12) w i l l no longer be necessary,
because it follows f r o m (16) and (17). A x i o m (17) has
the same consequent as the commonsense law of i n e r t i a
(5). It can be viewed as the formalization of an aspect
of inertia not captured in (5).
An action a succeeds in affecting the value of / if all
preconditions for that are satisfied; accordingly, we i n troduce the following abbreviation:
Dynamic Fluents
Recall t h a t a " d y n a m i c " fluent is, i n t u i t i v e l y , a fluent
t h a t may change its value even after an action t h a t is
not assumed to have any causal effects, like wait The
example given in the i n t r o d u c t i o n is time.
Here is a more interesting example. Consider the process of filling a pool w i t h water, regulated by opening
and closing a valve [Hendrix, 1973]. The state of the
system can be described by two numeric (for simplicity,
integer-valued) fluents: volume (the volume of water in
the pool, in cubic meters) and inflow (the current inflow
of water, in cubic meters per m i n u t e ) . The following
actions are available:
1. setvolume n: B r i n g the volume of water in the pool
to
and close the valve.
2.
The qualification problem can be solved by i n c l u d i n g
a succeeds assumption in the antecedent of each axiom
describing the effect of an action. For instance, axioms
(6), (8) and (10) w i l l be replaced by:
(18)
succeeds (shoot, loaded , s)
holds (loaded , result (shoot, s)),
(19)
succeeds (shoot, alive , s)
holds (alive , result(shoot , 5 ) ) .
(20)
A x i o m (17) can be r e w r i t t e n as
3. wait:
T u r n the valve to bring the inflow of
Do nothing.
We assume t h a t every action other than setvolume is
practically instantaneous and is followed by a 1 m i n u t e
wait period.
In particular, wait means "wait for 1
m i n u t e . " T h e n the relation between volume and
can be expressed by the axiom
T h e fluent volume is dynamic: Its value may change
even if the action being performed is wait.
T h e effects of setinflow and setvolume can be described by the axioms:
succeeds (setinflow
inflow, s)
value (inflow, result (setinflow n,
or
This is similar to the treatment of preconditions in [Lifschitz, 1987], except that precond had only two arguments
there. The idea of enhancing precond in this way was suggested to us by Michael Gelfond and Michael Georgeff.
866
setinflow
water to
Planning, Scheduling, Reasoning About Actions
s))
succeeds (setvolume
volume, s)
value (volume , result (setvolume n,s))
succeeds (setvolume n, inflow, s)
D value (inflow, result (setvolume n,s))
— 0.
References
Consider now a situation s such t h a t
value ( i n f l o w , s)
0.
W h a t can we say about the values of inflow and volume
in the situation r e s u l t ( w a i t , s)? A x i o m (21) implies t h a t
at least one of these fluents w i l l have a value different
from its value in the situation s. It follows t h a t there
is tension between m i n i m i z i n g n o n i n e r i i a l ( i n f l o w , w a i t )
on the one hand, and n o n i n e r i i a l ( v o l u m e , w a i t ) on the
other. The axioms given above have unintended m i n i m a l
models.
We can eliminate these models by adding an axiom
which says t h a t the fluent volume is dynamic. T h e general concept of a dynamic fluent is defined as follows:
dynamic
nonineriial
Then the additional axiom needed in the flowing water
example can be w r i t t e n as
dynamic volume.
5
M o m e n t a r y Fluents
In this section we discuss a special case of dynamic
fluents—the propositional fluents t h a t have the tendency
to become false. Consider the following example.
Striking one object against another produces noise:
succeeds (strike , noise , s)
holds (noise , result (strike , s)).
In the absence of preconditions for strike , the antecedent
of this axiom is identically true, and we get:
holds (noise , result (strike , 5 ) ) .
B u t the law of inertia implies then t h a t the noise w i l l
continue for a long time:
holds (noise , r e s u l t ( w a i t , result(strike , 5))),
(22)
holds (noise , result ( w a i t ,
result ( w a i t , result (strike , s ) ) ) ) ,
(23)
etc. We need to postulate t h a t the noise is momentary,
rather than continuous, t h a t it comes to an end by itself.
The basic property of " m o m e n t a r y " propositional fluents is t h a t , by default, they take on the value false:
momentary f
-^holds
Moreover, momentary fluents are dynamic:
momentary
[Baker, 1989] Andrew Baker. A simple solution to the
Yale Shooting problem. In Proc. K R ' 8 9 , 1989. To
appear.
[Gelfond et a i , 1989] Michael Gelfond, V l a d i m i r Lifschitz, and A r k a d y Rabinov. A theory of concurrent
actions. In preparation, 1989.
[Hanks and M c D e r m o t t , 1986] Steve Hanks and Drew
M c D e r m o t t . Default reasoning, nonmonotonic logics,
and the frame problem. In Proc. A A A I - 8 6 , pages 328333, 1986.
[Hanks and M c D e r m o t t , 1987] Steve Hanks and Drew
M c D e r m o t t . Nonmonotonic logic and temporal proj e c t i o n . A r t i f i c i a l Intelligence, 33(3):379-412, 1987.
[Haugh, 1987] B r i a n Haugh. Simple casual minimization for temporal persistence and projection. In Proc.
A A A L 8 7 , pages 218-223, 1987.
Hendrix, 1973] Gary Hendrix. Modeling simultaneous
actions and continuous processes. A r t i f i c i a l I n t e l l i gence, 4:145-180, 1973.
[Lifschitz, 1987] V l a d i m i r Lifschitz. Formal theories of
action. In The Frame Problem, Proc. of the 1987
Workshop, pages 35-37, 1987.
M c C a r t h y and Hayes, 1969] John
McCarthy
and
Patrick Hayes. Some philosophical problems f r o m the
standpoint of artificial intelligence. In B. Meltzer and
D. Michie, editors, Machine Intelligence, pages 463502, E d i n b u r g h , 1969. Edinburgh University Press.
[McCarthy, 1986] J ohn M c C a r t h y . Applications of circumscription to formalizing common-sense knowledge.
A r t i f i c i a l Intelligence, 26(3):89-118, 1986.
[McCarthy, 1987] J ohn M c C a r t h y . The frame problem
today.
In The Frame Problem, Proc. of the 1987
Workshop, page 3, 1987.
[Pednault, 1988] Ed w i n Pednault. Extending conventional planning techniques to handle actions w i t h
context-dependent effects. In Proc. A A A I - 8 8 , pages
55-59, 1988.
dynamic
B o t h momentary and the a b n o r m a l i t y predicate ab are
circumscribed. 6
The additional postulate needed in the noise example
can be w r i t t e n as
momentary noise.
These axioms allow us to prove the negations of (22) and
(23).
Acknowledgements
We are grateful to A n d r e w Baker, Michael Gelfond,
M a t t h e w Ginsberg, John M c C a r t h y , Paul M o r r i s , Karen
Myers and Yoav Shoham for valuable comments and criticisms.
The predicate ab should be circumscribed at a lower priority than the predicates that have no situation arguments
(nonineriial, precond, momentary).
Lifschitz and Rabinov
867