Forming beliefs about a changing world

Fahiem Bacchus Adam J. Grove Joseph Y. Halpern Daphne Koller Department of Computer Science NEC Research Institute IBM Almaden Research Center Computer Science Division University of Waterloo 4 Independence Way 650 Harry Road University of California, Berkeley Waterloo, Ontario Princeton, NJ 08540 San Jose, CA 95120±6099 Berkeley, CA 94720 Canada, N2L 3G1 [email protected] [email protected] [email protected] [email protected]

Abstract been much work extending the basic situation calculus us- ing various nonmonotonic theories. Although interesting, The situation calculus is a popular technique for reasoning these theories address only a certain limited type of uncer- about action and change. However, its restriction to a ®rst- tainty; in particular, they do not allow us to represent actions order syntax and pure deductive reasoning makes it unsuitable in many contexts. In particular, we often face uncertainty, due whose effects are probabilistic. This latter issue seems to be either to lack of knowledge or to some probabilistic aspects of addressed almost entirely in a non-logical fashion. In partic- the world. While attempts have been made to address aspects ular, we are not aware of any work extending the situation of this problem, most notably using nonmonotonic reasoning calculus to deal with probabilistic information. This is per- formalisms, the general problem of uncertainty in reasoning haps understandable: until recently, it was quite common to about action has not been fully dealt with in a logical frame- regard approaches to reasoning based on as being irrec- work. In this paper we present a theory of action that extends oncilably distinct from those using probability. Recent work the situation calculus to deal with uncertainty. Our frame- has shown that such pessimism is unjusti®ed. In this paper work is based on applying the random-worlds approach of we use a new theory of probabilistic reasoning called the [BGHK94] to a situation calculus ontology, enriched to allow random-worlds method [BGHK94] which naturally extends the expression of probabilistic action effects. Our approach is able to solve many of the problems imposed by incomplete ®rst-order logic. We show that this method can be success- and probabilistic knowledge within a uni®ed framework. In fully applied to temporal reasoning, yielding a natural and particular, we obtain a default Markov property for chains of powerful extension of the situation calculus. actions, a derivation of conditional independence from irrele- The outline of this paper is as follows. First, we brie¯y vance, and a simple solution to the . describe the situation calculus, discussing in more detail some of its problems, and some of the related work address- ing these problems. We then describe our own approach. Introduction We begin by summarizing the random-worlds method. Al- The situation calculus is a well-known logical technique for though the application of this method to temporal reasoning reasoning about action and change [MH69]. Calculi of this is not complicated, an appropriate representation of tempo- sort provide a useful mechanism for dealing with simple ral events turns out to be crucial. The solution, based on temporal phenomena, and serve as a foundation for work counterfactuals, seems to be central to many disciplines in in planning. Nevertheless, the many restrictions inherent which time and uncertainty are linked. in the situation calculus have inspired continuing work on After these preliminaries, we turn to some of the results extending its scope. obtained from our approach. As we said, our goal is to go An important source of these restrictions is that the situa- beyond deductive conclusions. Hence, our reasoning proce- tion calculus is simply a ®rst-order theory. Hence, it is only dure assigns degrees of belief (probabilities) to the various able to represent ªknown factsº and can make only valid possible scenarios. We show that the probabilities derived deductions from those facts. It is unable to represent prob- using our approach satisfy certain important desiderata. In abilistic knowledge; it is also ill-suited for reasoning with particular, we reason correctly with both probabilistic and incomplete information. These restrictions make it imprac- nondeterministic actions (the distinction between the two tical in a world where little is de®nite, yet where intelligent, being clearly and naturally expressed in our language). Fur- reasoned decisions must nevertheless be made. There has thermore, we obtain a default Markov property for reasoning

¡ about sequences of actions. That is, unless we know other- Some of this research was performed while Daphne Koller was at Stanford University and at the IBM Almaden Research Center. wise, the outcome of an action at a state is independent of Work supported in part by the Canadian Government through their previous states. We note that the Markov property is not an NSERC and IRIS programs, by the Air Force Of®ce of Scienti®c externally imposed assumption, but rather is a naturally de- Research (AFSC) under Contract F49620-91-C-0080, and by a rived consequence of the semantics of our approach. More- University of California President's Postdoctoral Fellowship. over, it can be overridden by information in the knowledge base. The Markov property facilitates a natural mechanism other ways as well. For example, of temporal projection, and is a natural generalization of an  we may not know the truth value of every ¯uent in the intuitive mechanism of projection in deterministic domains initial situation. in which we consider action effects sequentially. In general, when actions have deterministic effects (whether in fact, or  we may know the situation after some sequence of ac- only by default, which is another easily made distinction) tions has been performed, but not know precisely which then our approach achieves most standard desiderata. actions were taken. (This leads to one type of explanation Finally, we turn to examining one of the most famous problem.) issues that arise when reasoning about action: the Frame  we may not know precisely what effects an action has. Problem and the associated Yale Shooting Problem (YSP) This may be due to a simple lack of information, or to [MH69, HM87]. We show that our approach can solve the the fact that the action's effects are probabilistic (e.g., former problem, without suffering from the latter, almost we might believe that there is a small chance that Fred automatically. Writing down a very natural expression of a could survive being shot). Note that even if we know the frame axiom almost immediately gives the desired behavior. probabilities of the various action outcomes, the situation We state a theorem, based on the criterion of Kartha [Kar93], calculus's ®rst-order language is too weak to express them. showing the general correctness of our approach's solution In all such cases, it is unlikely that deductive reasoning will to the frame problem. We also compare our solution to one reach any interesting conclusions. For instance, if we leave given by Baker [Bak91]. open the logical possibility that the gun becomes unloaded while we wait, then there is nothingwe can say with certainty Preliminaries about whether Fred lives. Our strategy for investigating these issues is to exam- The situation calculus ine a generalized notion of inference that not only re- We assume some familiarity with the situation calculus and ports certain conclusions (in those rare cases where our associated issues. In brief, by situationcalculus we refer to a knowledge supports them), but also assigns degrees of method of reasoning about temporal phenomena using ®rst- belief (i.e., probabilities) to other conclusions. For in- order logic and a sorted ontology consisting of actions and stance, suppose KB is some knowledge base stating what situations. A situation is a ªsnapshotº of the world; its prop- we know about actions' effects, the initial situation, and

so on, and we are interested in a query such as 

erties are given by predicates called ¯uents. For example,

¡ ¡  ¡  ¡ 

consider a simple version of the well-known Yale Shooting Alive Result Shoot Result Wait Result Load 0 ¢¢¢¢ . The

¡ 

next section shows how we de®ne Pr KB ¢ , the degree of problem. To represent an initial situation 0 where Fred is

alive and there is an unloaded gun we can use the formula belief in  (which is a number between 0 and 1) given our

knowledge KB. It is entirely possible for KB to be such that

¡ ¡ ¢

Alive 0 ¢¤£¦¥ Loaded 0 . The effects actions have on situ-

¡    ation can be encoded using a Result function. For instance, Pr KB ¢ 0 1, which would mean we should have high

but not complete con®dence that Fred would be dead after

§©¨ ¡ ¡ ¨ ¡ ¡ ¨ ¢¢¢ we can write Loaded ¢ ¥ Alive Result Shoot , to assert that if a loaded gun is ®red it will kill Fred.1 this sequence of actions. To a large extent, it is the freedom to assign intermediate probabilities (other than 0 or 1) that We can then ask what would happen if, starting in 0, we load the gun, wait for a moment, and then shoot: relieves us of traditional situation calculus' demand for com-

plete knowledge. A related important feature is our ability to

¡ ¡  ¡  ¡ 

Alive Result Shoot Result Wait Result Load 0 ¢¢¢¢ ? The most obvious approach for deciding whether this is make use of statistical knowledge (for instance, an assertion true is to use ®rst-order deduction. However, for this to that shooting only succeeds 90% of the time). Of course, the work, we must provide many other facts in addition to the real success of our approach depends crucially on the details two above. In fact, to answer questions using deduction we and behavior of the particular method we have for comput- would in general have to provide a complete theory of the ing probabilities. Examining this method, and justifying its domain, including a full speci®cation of the initial situation successes, is the goal of the rest of this paper. and explicit formulas describing which ¯uents do and do Before continuing, we remark that the importance of the not change whenever any action is taken. For instance, we issues we have raised is well known. There have been numer- would need to say that after a Wait action, a loaded gun ous attempts to augment deductive reasoning with the abil- continues to be loaded, if Fred was alive before he will be ity to ªjump to conclusionsº, i.e., nonmonotonic reasoning alive afterwards, and so on. The issue of stating the non- (e.g., [HM87, Kau86, Lif87]), often in an attempt to solve effects of actions is known as the frame problem [MH69]: the frame problem. The idea of reasoning to ªplausibleº how do we avoid having to represent the numerous axioms conclusions, rather than only the deductively certain ones, required to describe non-effects? We would like to omit or clearly shares some motivation with our decision to evalu- abbreviate these axioms somehow. ate numeric probabilities. The connection is in fact quite The frame problem is only one aspect of the problem of deep; see [BGHK94]. However, the application of pure non- completeness; generally our knowledge will be de®cient in monotonic to reasoning about actions has proven to be surprisingly dif®cult and, in any event, these approaches 1In general, we use upper case for constants and lower case for are not capable of dealing with probabilistic actions or with variables. the quantitative assessment of probabilities.

There has also been work addressing the issue of probabil- interpretation of approximate comparisons, and that the spe-  ities in the context of actions. The propositional approaches cial case of ¤ 1 is related to the well-known -semantics to the problem (e.g., [Han90, DK89]) do not incorporate the [Pea89]. full expressive power of the situation calculus. Furthermore, The second aspect of the method is, of course, the spe- even those that are able to deal with abductive queries typ- ci®c way in which degrees of belief are computed. Before ically cannot handle explanation problems (since they do reviewing these, we remark that for the purposes of most of not place a prior probability distribution over the space of this paper, the random-worlds method can be regarded as a

actions). [Ten91] achieves a ®rst-order ontology by apply- black box which, given any knowledge base KB and a query

  ¡  ing the reference-class approach of [Kyb74] to this problem.  , assesses a degree of belief (i.e., a probability)Pr KB ¢ . His approach, however, has a somewhat ªproceduralº rather Very brie¯y, and ignoring the subtlety of approximate than a purely logical (semantic) character. Hence, althoughit equality, the method is as follows. For any domain size

speci®es how to do forward projectionÐassessing probabil-  , we consider all the worlds (®rst-order structures) of size

 ¡ ities for outcomes given knowledge of an initial situationÐit 

consistent with KB. Let #worlds KB ¢ be the number of does not support arbitrary queries from arbitrary knowledge size  worlds that satisfy KB. Appealing to the principle bases. This ¯exibility is important, particularly for explana- of indifference, we regard all such worlds as being equally

tion and diagnosis. Finally, none of these works subsume all plausible. It then follows that, given a domain size  , we

  "! #

the issues addressed by advocates of nonmonotonic reason- #  KB

¡  

 

should de®ne Pr KB ¢ . Typically, all

&%' # # $ KB ing. Our approach provides a framework for dealing with 

these issues in a uniform fashion. that is known about is that it is ªlargeº. Thus, the degree



 '(  ¡   of belief in given KB is taken to be lim Pr KB ¢ . Applying random-worlds in a temporal context is mostly a Random-worlds problem of choosing an appropriate representation scheme. Here we are guided mostly by the standard ontology of sit- We now turn to a summary of the random-worlds method; uation calculus, and reason about situations and actions. see [BGHK94] and the references therein for full details. Indeed, since our language includes that of ®rst-order logic, We emphasize that this is a general technique for comput- it would be possible to use the language of standard situation ing probabilities, given arbitrary knowledge expressed in a calculus without change. However, we want to do more than very rich language; it was not developed speci®cally for the this. In particular, we want to allow probabilistic actions and problem of reasoning about action and change. As a general statistical knowledge. To do this, we need to allow for ac- reasoning method, random-worlds has been shown to possess tions that can have several effects (even relative to the same many attractive features [BGHK94], including a preference preconditions). For this purpose, it is useful to conceptually for more speci®c information and the ability to ignore ir- divide a situation into two components: the state and the relevant information. In a precise sense, it generalizes both environment. The state is the visible part of the situation; the powerful theory of default reasoning of [GMP90] and it corresponds to the truth values of the ¯uents. The envi- (as shown in [GHK92]) the principle of maximum entropy ronment is intended to stand for all aspects of the situation [Jay78]; it can also be used to do reference class reasoning not determined by the ¯uents (such as the time, or other from statistics in the spirit of [Kyb74]. properties of the situation that we might not wish to express The two basic ideas underlying the random-worlds method explicitly within our language). are the provisionof a general language for expressing statisti- So what is a world in this context? Our worlds have a cal information, and a mechanism for probabilisticreasoning three-sorted domain, consisting of states, environments, and from such information. actions. Situations are simply state-environment pairs. Each The language we use extends full ®rst-order logic with sta- world provides an interpretation of the symbols in our lan- tistical information, as in [Bac90]), by allowing proportion

¢ guage over this domain, in the standard manner. For the

¡ ¡

   ¡  ¡   £ ¢ expressions of the form ¢ . This is interpreted purposes of this paper, ¯uents are taken to be unary predi- as denoting the proportion of domain elements satisfying 3

¢ cates over the set of states. Actions map situations to new 2  , among those satisfying . (Actually, an arbitrary set situations via a Result function; hence, each world also pro- of variables is allowed in the subscript.) A simple propor-

¢ vides, via the denotation of Result, a complete speci®cation

¡ ¡

   ¡  ¡   

£¥¤ ¤ ¢ tion formula has the form ¢ 0 6 where ª º of the effect of an action on every situation. stands for ªapproximately equal.º Approximate equality is Each state in the world's domain can be viewed as a truth required since, if we make a statement like ª90% of birds can assignment to the ¯uents. If we have ) ¯uents in the lan-

¯yº, we almost certainly do not intend this to mean that ex-

   *,+ guage, say * 1 , we require that there be at most one actly 90% of birds ¯y. Among other things, this would imply state for each of the 2 + possible truth values of the ¯uents.4 that the number of birds is a multiple of ten! Approximate equality is also important because it allows us to capture 3We observe that we can easily extend our ontology to allow

defaults. For example, we can express ªBirds typically ¯yº complex ¯uents (e.g., On(A,B) in the blocks world), and/or rei®ed

¡ ¡

  ¡  ¡  

£¦¤ ¢ as Fly ¢ Bird 1. We omit a description of the ¯uents. formal semantics, noting that the main subtlety concerns the 4This restriction was also used by Baker [Bak91] in his solution to the frame problem. It does not postulate the existence of a state 2

If §©¨ is identically true, we generally omit it. for all possible assignments of truth values, and hence allows a

We do this by adding the following formula to the KB: Counterfactuals

£ £ £ £

¥ ¥

* *©+ ¡¦   §¡ ¢ ¡¡ * ¡¤ ¡¦ *©+ ¡¤

¢¢ ¢ ¢ £¨§©§ § £ ¢ 1 ¢ 1 While our basic ontology seems natural, there are other pos- Because the set of states is bounded, when we take the sible representations. However, it turns out that the use of domain size to in®nity (as is required by random worlds), it a Result function is crucial. Although the use of Result is is the set of actions and the set of possible environments that quite standard in situation calculus, it is important to real- grow unboundedly. ize that its denotation in each world tells us the outcome of As stated above, action effects are represented using a each action in all situations, including those situations that Result function that maps an action and a situation to a situ- never actually occur. That is, in each world Result provides ation. In order to formally de®ne, within ®rst-order logic, a counterfactual information. function whose range consists of pairs of domain elements, This can best be understood using an example. Consider we actually de®ne two functionsÐResult1 and Result2Ð the YSP example, where for simplicity we ignore environ- that map actions and situations to states and environments ments and consider only a single actionÐShootÐwhich is respectively. We occasionally abuse notation and use Result always taken at the initial state. We know that Fred is alive directly in our formulas. Note that the mapping from an at the initial state, but nothing about the state of the gunÐit action and a situation to a situation is still a deterministic could be loaded or not. Assume that, rather than having a one. However, Result is not necessarily deterministic when Result function, we choose to have each world simple denote we only look at states. Two situations can agree completely a single run (history) for this experiment. In this new ontol- in terms of what we say about them (their state), and never- ogy, we could use a constant 0 denoting the initial state and theless an action may have different outcomes. another constant 1 denoting the second state; each of these As promised, this new ontology allows us to express non- will necessarily be equal to one of the four states described deterministic and probabilistic actions, as well as the deter-

above. In order to assert that shooting a loaded gun kills

ministic actions of the standard situationcalculus. For exam-

¡ ¡ ¢ Fred, we would state that Loaded 0 ¢ ¥ Alive 1 . Fur- ple, consider a simple variant of the Yale Shooting Problem thermore, assume that after being shot the gun is no longer (YSP), where we have only two ¯uents, Loaded and Alive, loaded. It is easy to see that there are essentially three possi-

and three actions, Wait, Load, and Shoot. Each world will ¡

ble worlds (up to renaming of states): if Loaded 0 ¢ (so that





therefore have (at most) four states, corresponding to the four

  ¡ ¢

0 ), then necessarily 1 Å Å , and if ¥ Loaded 0

 

possible truth assignments to Loaded and Alive. We assume,  then either  or Å . The random-worlds

for simplicity, that we have constants denoting these states: 1 Å Å 1

 

 



method, used with this new ontology, would give a degree

  Å  Å Å Å . Each world will also have domain ele- of belief of 1 to the gun being loaded at , simply because ments corresponding to the three named actions,and possibly 3 0 Shoot has more possible outcomes if the gun is unloaded. to other (unnamed) actions. The remaining domain elements Yet intuitively, since we know nothing about the initial sta-

correspond to different possible environments. The ¯uents ¡

tus of the gun, the correct degree of belief for Loaded ¢ are unary predicates over the states, and Result is a function 0 1 is 1 . This is the answer we get by using the ontology of that takes a tripleÐan action, a state, and an environmentÐ 2 situation calculus with the Result function. In this case, the and returns a new state.5 In the KB we can specify different different worlds correspond to the different denotations of constraints on Result1. For example,

Result and 0. Assuming that no action can revive Fred

§¡ ¡ ¡¤   ¡ ¡       

¤

¢ ¥ ¢¢

Loaded Alive Result1 Shoot 0 9 ¢ once he dies, there are only two possible denotations for

 



(1)

¡ 

Result: Result Shoot Å ¢ is either Å Å or Å , while



 

asserts that the Shoot action has probabilistic effects; it says ¡   

Result Shoot ¢ Å Å if Å . Furthermore, 0 is

 

 that 90% of shootings (in a state where the gun is loaded) either or Å . Hence, there are four possible worlds.

result in a state in which Fred is dead. On the other hand, ¡

In exactly two of these, we have that Loaded 0 ¢ . The key

  ¡ ¡¤ ¡ ¡   

§ idea here is that, because our language includes Result, each

¥ ¢¢¢ Loaded ¢ Alive Result1 Shoot (2) worldmust specify not onlythe outcome of shootinga loaded asserts that Shoot has the deterministic effect of killing Fred gun, but also the outcome of shooting had the gun been un- when executed in any state where the gun is loaded. loaded. Once this counterfactual information is taken into We might not know what happens is the gun is not loaded: account, we get the answers we expect. Fred might still die of the shock. In such cases, we can simply leave this unspeci®ed. Later in the paper, we discuss We stress that the KB does not need to include any special the different ways in which our language allows us to specify information because of our use of counterfactuals. As is the effects of actions, and the conclusions these entail. standard in the situation calculus, we put into the KB exactly what we know about the Result function (for example, that correct treatment of rami®cations. Baker then uses shooting a loaded gun necessarily kills Fred). The KB ad- to ensure that there is exactly one state for each assignment of truth mits a set of satisfying worlds, and in each of these worlds values consistent with the KB. In our framework, the combinatorial Result will have some counterfactual behavior. The random properties of random-worlds guarantee that this latter fact will hold in almost all worlds. worlds method takes care of the rest by counting among these 5 alternate behaviors. Similarly, the Result 2 function returns a new environment, but there is usually no need for the user to provide information about The example above and the results below show that ran- this function. dom worlds works well with an ontology that has implicit counterfactual information (like the situation calculus and its transition probabilities. One general scheme uses assertions

Result function). On the other hand, with other ontologies of the form

§¡ ¡  ¡ ¡¤   

(such as the language used above that simply records what Result 1 ¢¢¢ (3) actually happens and nothing more) the combinatorics lead where  is a Boolean combination of ¯uents. Assertion (3)

to unintuitiveanswers. Hence, it might seem that counterfac-

says that  is true of all states that can result from taking at tual ontologies are simply a technical requirement of random state . In general, when KB entails such a statement, then worlds. However, the issue of counterfactuals seems to arise Proposition 1 can be used to show that our degree of belief in

over and over again in attempts to understand temporal and

 ¡ ¡¤  ¥¢ 

Result1 ¢¢ 1. For example, if KB consists of (2) 

causal information. They have been used in both philoso-

¡ ¡ ¡  £¢  

  ¢¢ only, then Pr Alive Result1 Shoot KB ¢ 0, as phy and statistics to give semantics to causal rules [Rub74]. expected (here,  is Alive). In game theory [Sta94] the importance of counterfactuals Assertion (2) describes a deterministic effect. However, (or strategies) has long been recognized. Baker's approach even for nonprobabilistic statements such as (3), our ap- [Bak91] to the frame problem is, in fact, also based on the proach can go far beyond deductive reasoning. For instance, use of counterfactuals. we might not always know the full outcome of every action We have already mentioned that random-worlds subsumes in every state. A Load action might result in, say, between the principle of maximum entropy. It has been argued one and six bullets being placed in the gun. If we have no [Pea88] that maximum entropy (and hence random-worlds) other information, our approach would assign a degree of cannot deal appropriate with causal information. In fact, our 1 belief of 6 to each of the possibilities. In general, we can example above is closely related, in a technical sense, to the formalize and prove the following result (where, as in our problematic examples described by Pearl. But once again, remaining results, ¢ is a constant over environments not an appropriate representation of causal rules using counter- appearing anywhere in KB): factuals solves the problem [Hun89]. In fact, counterfactuals Proposition 2: Suppose KB contains (3), but no addi- have been used recently to provide a formulation of Bayesian

tional information about the effects of in . Then,

£

networks based on deterministic functions[Pea93]. All these 1

  ¡ ¡¤  ¥¢    §

¦ ¢

Pr Result1 ¢ KB , where is the £ applications of counterfactuals turn out to be closely linked to our own, even though none consider the random-worlds number of states satisfying  , and is one of these states. method. The ontology of this paper is, in some sense, the We note that we can prove a similar result in the case convergence of these technically diverse, but philosophically where our ignorance is due to incomplete information about linked, frameworks. As our results suggest, the generality the initial state (as illustrated in the previous section). of the random-worlds approach may allow us to draw these As we discussed, our language can also express infor- lines of research together, and so expose the common core. mation about probabilistic actions (where we have statis- tical knowledge about the action's outcomes). Our the- Results ory also derives many of the conclusions we would expect.

For example, if KB contains (1), then we would conclude

  ¡ ¡ ¡  £¢  ¡ 

¢¢ £ ¢¢ As a minimal requirement, we would like our approach to be Pr ¥ Alive Result1 Shoot KB Loaded compatible with standard deductive reasoning, whenever the 0  9. In general, the direct inference property exhibited by latter is appropriate. As shown in [BGHK94], this desidera- random worlds allows us to prove the following:

tum is automatically satis®ed by random worlds:



   ¡ ¡¤    

¤©¨

Proposition 3: If KB entails Result ¢¢ ,

  ¡  ¡ ¡¤  £¢  

¨

 ¢

Proposition 1: If is a logical consequence of a knowledge then Pr Result ¢¢ KB .

  ¡   base KB, then Pr KB ¢ 1. Nondeterminism due to ignorance on the one hand, and prob- Hence, our approach supports all the conclusions that can be abilistic actions on the other, are similar in that they both lead derived using ordinary situation calculus. However, as we to intermediate degrees of belief between 0 and 1. Never- now show, it can deal with much more. theless, there is an important conceptual difference between An important concept in reasoning about change is the the two cases, and we consider it a signi®cant feature of our idea of a state transition. In our context, a state transition approach that it can capture and reason about both. takes us from one situation to the next via the Result func- Given our statistical interpretation of defaults, the abil- tion. Since we can only observe the state component of ity to make statistical statements about the outcomes

a situation, we are particularly interested in the probabil- of actions also allows us to express a default assump-

¡  §¡ ¡ ¡¦

¢ ¢

ity that an action takes us from a situation § to another tion of determinism. For instance, Loaded

£



¡    ¡ ¡    

¤

¢ ¥ ¢¢ ¢ § (where the speci®c identityof the environment is irrel- Alive Result1 Shoot 1 states that shooting

evant). We are in fact interested in the transition probability a loaded gun almost surely kills Fred. Even though a default

£

 ¦¡ ¡¡  £¢   ¢ Pr Result ¢ KB . As we show later on in resembles a deterministic rule in many ways, the distinction this section, these transition probabilities can often be used can be important. We would prefer to explain an unusual to compute the cumulative effects of sequences of actions. occurrence by ®nding a violated default, rather than by pos- We can use the properties of random worlds to derive tran- tulating the invalidity of a law of nature (which would result

sition probabilities from our action descriptions. Consider in inconsistent beliefs). For example, if, after the shooting,

a particular state and action . There are many ways we observe Fred walking away, then our approach would in which we can express knowledge relevant to associated conclude that Fred survived the shooting, rather than that he is a zombie. This distinction between certain outcomes and The Frame Problem default outcomes is also easily made in our framework. In general, we may have many pieces of information de- Perhaps the best single illustration of the power of our ap- scribing the behavior of a given action at a given state. For proach in the context of the situation-calculus is its ability example, consider the YSP with an additional ¯uent Noisy, to deal simply and naturally with the frame problem. Many where our KB contains (1) and people have an intuition about the frame problem which is, roughly speaking, that ª¯uents tend not to change value very

oftenº. This suggests that if we could formalize this general

§¡ ¡ ¡¤   ¡ ¡       

¤

¢¢ ¢ Loaded ¢ Noisy Result1 Shoot 0 8 principle (that change is unusual), it could serve as a substi- Given all this information, we would like to compute tute for the many explicit frame axioms that would otherwise

the probability that shooting the gun in a state where be needed. However, as shown in [HM87], the most obvious

 

¡ ¡

 formulations of this idea in standard nonmonotonic logics

£ ¢ Alive ¢ Loaded results in the state (where stands for Noisy). Unless we know otherwise, it seems intu- often fail. Suppose we use a formalism that, in some way, itive to assume that Fred's health in the resulting state should tries to minimize the number of changes in the world. In the

be independent of the noise produced; that is, the answer YSP, after waiting and then shooting we expect there to be

   should be 0  1 0 8 0 08. This is, in fact, the answer some change: we expect Fred to die. But there is another produced by our approach. This is an instance of a gen- model which seems to have the ªsame amountº of change: eral result, asserting that transition probabilities can often be the gun miraculously becomes unloaded as we wait, and thus computed using maximum entropy. While, we do not have Fred does not die. This seems to be the wrong model, but it the space to fully describe the general result, we note that it turns out to be dif®cult capture this intuition formally. Sub- entails a default assumption of independence. That is, unless sequent to Hanks and McDermott's paper, there was much we have reason to believe that Alive and Noisy are correlated, research in this area before adequate solutions were found. our approach will assume that they are not. We stress that How does our approach fare? It turns out that we can this is only a default. We might know that Alive and Noisy use our statistical language to directly translate the intuition are negatively correlated (perhaps because lack of noise is we have about frame axioms, and the result gives us ex-

sometimes caused by a mis®ring gun). In this case we can actly the answers we expect in such cases as the YSP. We

*

¡ ¡ ¡¤

§ formalize the statement of minimal change for a ¯uent

easily add to the KB, for example, that Loaded ¢

  ¡ ¡   ¡ ¡      ¢¢

Noisy Result1 Shoot ¢¢¤£ Alive Result1 Shoot by asserting that it changes in very few circumstances; that

  ¤

0 05 ¢ The resulting KB is not inconsistent; the default as- is, any action applied in any situation is unlikely to change



¥

*   * ¡ ¡¢¡ ¢ ¢ * ¡¤   

¤



¢¢ ¢

¤£¦¥ §¨¥ # sumption of independence is dropped automatically. : Result1  0 Of course, the We now turn to the problem of reasoning about the effects statistical chance of such frame violations cannot be exactly of a sequence of actions. The Markov assumption, which is zero, because some actions do cause change in the world. built into most systems that reason about probabilistic actions However, the ªapproximately equalsº connective allows for [Han90, DK89], asserts that the effects of an action depend this. Roughly speaking, the above axiom, an instance of only on the state in which it is taken. As the following result which can be added for each ¯uent * for which we think demonstrates, our approach derives this principle from the the frame assumption applies, will cause us to have degree basic semantics. We note that the Markov assumption is only of belief 0 in a ¯uent changing value unless we have explicit a default assumption in our framework; it fails if the KB con- knowledge to the contrary.6 tains assertions implying otherwise. Formally, it requires There is one minor subtlety. Recall that in the random- that our information about Result be expressed solely in worlds approach, we consider the limit as the domain tends

terms of transition proportions, i.e., proportion expressions to in®nite size. As we observed, since the number of states

  ¡ ¡¡        is bounded, this means that the number of environments and of the form Result1 ¢¢ , where is a Boolean

combination of ¯uents. Hence, if our KB contains infor- actions must grow without bound. This does not necessarily



 ¡¡  ¡¤      mean that the number of actions grows without bound. How- mation about Result 1 Result 2 ¢¢ , the Markov property might no longer hold. ever, in the presence of the frame axioms (as given above), we need this stronger assumption. This need is quite easy

Proposition 4: Suppose that the only occurrence of Result to explain. If the only action is Shoot, then half the triples

¢

©¡  

in KB is in the context of transition proportions, and that ¡ ¢

£ (those where Loaded is true in ) would lead to a

and ¢ do not appear in KB. Then change in the ¯uent Alive. In this framework, it would be

£ £

inconsistent to simultaneously suppose that there is only one

  ¡ ¡¤  ¥¢  ¡ £¢ ¢£

Pr Result 1 ¢

£ £ £ £

way of changing the world (i.e., Shoot) and also that every

¡¡  £¢    ¢

Result1 2 ¢ KB

£

¯uent (and in particular, Alive) hardly ever changes. Making

  ¡ ¡¤  £¢   ¢

Pr Result1 1 ¢ KB

£ £ £ £

the quite reasonable assumption that there are many other

  ¡ ¡¡  £¢    ¢ Pr Result1 2 ¢ KB ways of effecting change in the world (i.e., many other ac-

Of course, it follows from the proposition that to compute 6

£ £

Note that having degree of belief 0 does not mean that we



¦¡ ¡¡  ¡¤  £¢  Pr Result 2 Result 1 ¢¢ , we just sum over believe something to be impossible, but only extremely unlikely. all intermediate states. This result generalizes to arbitrary Hence, this representation does allow for unexpected change, a sequences of actions in the obvious way. useful feature in explanation problems. tions in the domain), even though we may say nothing about Some solutions to the YSP work by augmenting a prin- them, removes the contradiction. ciple of minimal change with a requirement that we should Given this, if we add frame axioms as given above we get prefer models in which change occurs as late as possible precisely the results we want. If we try to predict forward (e.g., [Kau86, Sho88]). This solves the original YSP be- from one state to the next, we conclude (with degree of belief cause the model in which Fred dies violates the frame axiom 1) that nothing changes except those ¯uents that the action is (that Fred should remain alive) later than the model in which known to affect. If we consider a sequence of actions, we can the gun miraculously becomes unloaded. However, it has predict the outcome by applying this rule for the ®rst action been observed that such theories fail on certain explanation with respect to the initial state, then applying the second problems, such as Kautz's [Kau86] stolen car example. Our action to the state just obtained, and so on. This is essentially approach deals well with explanation problems. In Kautz's a consequence of Proposition 4, combined with the properties example, we park our car in the morning only to ®nd when of our frame axiom. In the YSP, for example, the Load action we return in the evening that it has been stolen. Theories that will cause the gun to be loaded, but will change nothing else. delay change lead to the conclusion that the car was stolen Wait will then leave the state completely unchanged. Finally, just prior to our return. A more reasonable answer is to be because the gun will still be loaded, performing Shoot will indifferent about exactly when the car was stolen. Our ap- kill Fred as expected. proach assigns equal probability to the car being stolen over The idea of a formal theory being faithful to this intuitive each time period of our absence. That is, if KB axiomatizes semantics (essentially, that in which we consider actions one the domain in the natural way, and the only action that makes at a time, assuming minimal change at each step) has recently a car disappear from the parking lot is the StealCar action,

been formalized by Kartha [Kar93]. Roughly speaking, he then we would conclude that:

 ¦¡¡ ¢¡   ¡ ¡¡ ¤£  ¡

§©§ § ¥ showed that a simple procedural language [GL92] can be Pr StealCar KB £ Parked Result1 Result

1

¤  ¡  ¥¢  

embedded into three approaches for dealing with the frame ¡

¢¢§ §©§ ¢¢¢¢ Result 1 Result ParkCar 0 £

problem [Bak91, Ped89, Rei91], so that the answers pre- scribed by 's semantics (which are the intuitively ªrightº Conclusion answers) are also obtained by these formalisms. The follow- ing result shows that we also pass Kartha's test. Speci®cally: As shown in [BGHK94], the random-worlds approach pro- Proposition 5: There is a sound and complete embedding of vides a general framework for probabilistic and default ®rst- into our language in which the frame axioms appear in order reasoning. The key to adapting random worlds to the the above form. domain of causal and temporal reasoning lies in the use of counterfactual ontologies to represent causal information. Thus, the random-worlds approach succeeds in solving the Our results show that the combination of random worlds and frame problem as well as the above approaches, at least counterfactuals can be used to address many of the impor- in this respect. However, as we mentioned above, our ap- tant issues in this domain. The ease with which the general proach is signi®cantly more expressive, in that it can deal random-worlds technique can be applied to yet another im- with quantitative information in a way that none of these portant domain, and its success in dealing with the core other approaches can. Furthermore, our approach does not problems encountered by other approaches, shows its ver- have dif®culty with state constraints (i.e., rami®cations), a satility and broad applicability as a general framework for problem encountered by a number of other solutions to the inductive reasoning. frame problem (e.g., those of Reiter and Pednault). There is, however, one important issue which this ap- Why does the random-worlds method work so easily? proach fails to handle appropriately: the quali®cation prob- There are two reasons. First, the ability to say that propor- lem. The reasons for this failure are subtle, and cannot be tions are very small lets us express, in a natural way within explained within the space limitations. However, as we dis- our language, the belief that frame violations are rare. Al- cuss in the full paper, the problem is closely related to the fact ternative approaches to the problem tend to use powerful that random worlds does not learn statistics from samples. minimization techniques, such as circumscription, to encode This aspect of random-worlds was discussed in [BGHK92], this. But much more important is our use of an ontology where we also presented an alternative method to comput- that includes counterfactuals. This turns out to be crucial ing degrees of belief, the random-propensities approach, that in avoiding the YSP. Even if the gun does in fact become does support learning. In future work, we hope to apply this unloaded somehow, we do not escape the fact that shoot- alternative approach to the ontology described in this frame- ing with a loaded gun would have killed Fred. Baker and work. We have reason to hope that this approach will main- Ginsberg's [BG89] solution to the frame problem (based on tain the desirable properties described in this framework, and circumscription) relies on a similar notion of counterfactual will also deal with the quali®cation problem. situations. But while the solutions are related, they are not identical: for instance, we do not suffer from the problem concerning extraneous ¯uents that Baker [Bak89] mentions.7 References

7 [Bac90] F. Bacchus. Representing and Reasoning with We also note that Baker and Ginsberg's solution was con- Probabilistic Knowledge. MIT Press, 1990. structed especially to deal with the problem of minimizing frame violations. Our solution to the frame problem and the YSP arises naturally and almost directly from our general approach. [Bak89] A. Baker. A simple solution to the Yale shoot- [Kau86] H. Kautz. A logic of persistence. In Proc. Na- ing problem. In Proc. First International Con- tional Conference on Arti®cial Intelligence ference on Principles of Knowledge Represen- (AAAI '86), pages 401±405, 1986. tation and Reasoning (KR '89), pages 11±20. [Kyb74] H. E. Kyburg, Jr. The Logical Foundations of Morgan Kaufman, 1989. Statistical Inference. Reidel, 1974. [Bak91] A. Baker. Nonmonotonic reasoning in the [Lif87] V. Lifschitz. Formal theories of action: Prelim- framework of the situation calculus. Arti®cial inary report. In The Frame Problem in Arti®- Intelligence, 49:5±23, 1991. cial Intelligence, pages 121±127. Morgan Kauf- [BG89] A. Baker and M. Ginsberg. Temporal projection mann, 1987. and explanation. In Proc. Eleventh International [MH69] J. M. McCarthy and P. J. Hayes. Some philo- Joint Conference on Arti®cial Intelligence (IJ- sophical problems from the standpoint of ar- CAI '89), pages 906±911, 1989. ti®cial intelligence. In Machine Intelligence [BGHK92] F. Bacchus, A. J. Grove, J. Y. Halpern, and 4, pages 463±502. Edinburgh University Press, D. Koller. From statistics to belief. In 1969. Proc. National Conference on Arti®cial Intel- [Pea88] J. Pearl. Probabilistic Reasoning in Intelligent ligence (AAAI '92), pages 602±608, 1992. Systems. Morgan Kaufmann, 1988. [BGHK94] F. Bacchus, A. J. Grove, J. Y. Halpern, and [Pea89] J. Pearl. Probabilistic semantics for nonmono- D. Koller. Generating degrees of belief from tonic reasoning: A survey. In Proc. First In- statistical information. Technical report, 1994. ternational Conference on Principles of Knowl- Preliminary version in Proc. Thirteenth Interna- edge Representation and Reasoning (KR '89), tional Joint Conference on Arti®cial Intelligence pages 505±516, 1989. (IJCAI '93), 1993, pages 906±911. [Pea93] J. Pearl. Aspects of graphical models connected [DK89] T. Dean and K. Kanazawa. Persistence and with causality. In 49th Session of the Interna- probabilisticprojection. IEEE Tran. on Systems, tional Statistics Institute, 1993. Man and Cybernetics, 19(2):574±85, 1989. [Ped89] E. Pednault. ADL: Exploring the middle ground [GHK92] A. J. Grove, J. Y. Halpern, and D. Koller. Ran- between STRIPS and the situation calculus. In dom worlds and maximum entropy. In Proc. 7th Proc. First International Conference on Prin- IEEE Symp. on Logic in Computer Science, ciples of Knowledge Representation and Rea- pages 22±33, 1992. soning (KR '89), pages 324±332. Morgan Kauf- [GL92] M. Gelfond and V. Lifschitz. Representing ac- mann, 1989. tions in extended . In Logic [Rei91] R. Reiter. The frame problem in the situation Programming: Proc. Tenth Conference, pages calculus: A simple solution (sometimes) and a 559±573, 1992. completeness result for goal regression. In Arti- [GMP90] M. Goldszmidt, P. Morris, and J. Pearl. A max- ®cial Intelligence and Mathematical Theory of imum entropy approach to nonmonotonic rea- Computation, pages 359±380. Academic Press, soning. In Proc. National Conference on Arti- 1991. ®cial Intelligence (AAAI '90), pages 646±652, [Rub74] D. B. Rubin. Estimating causal effects of 1990. treatments in randomized and nonrandomized [Han90] S. J. Hanks. Projecting Plans for Uncertain studies. Journal of Educational Psychology, Worlds. PhD thesis, Yale University, 1990. 66:688±701, 1974. [HM87] S. Hanks and S. McDermott. Nonmonotonic [Sho88] Y. Shoham. Chronological ingorance: experi- logic and temporal projection. Arti®cial Intelli- ments in nonmonotonic temporal reasoning. Ar- gence, 33(3):379±412, 1987. ti®cial Intelligence, 36:271±331, 1988. [Hun89] D. Hunter. Causality and maximum entropy [Sta94] R. C. Stalnaker. Knowledge, belief and coun- updating. International Journal of Approximate terfactual reasoning in games. In Proc. Second Reasoning, 3(1):379±406, 1989. CastiglioncelloConference. Cambridge Univer- [Jay78] E. T. Jaynes. Where do we stand on maximum sity Press, 1994. To appear. entropy? In The Maximum Entropy Formalism, [Ten91] J. D. Tenenberg. Abandoning the completeness pages 15±118. MIT Press, 1978. assumptions: A statistical approach to the frame [Kar93] G. Kartha. Soundness and completeness the- problem. International Journal of Expert Sys- orems for three formalizations of action. In tems, 3(4):383±408, 1991. Proc. Thirteenth InternationalJoint Conference on Arti®cial Intelligence (IJCAI '93), pages 724±729, 1993.