Deductive actions via operational semantics instead of possible worlds Sam Steel Dept Computer Science, University of Essex Colchester CO4 3SQ, United Kingdom
[email protected]
Abstract
In cross-level plans, some of the actions are in fact steps of making later parts of the plan. Trying to formalize such plans using modal logic ran into familiar but serious problems. Representing beliefs as abstract objects is a standard alternative, but there is then no semantics to explain the interaction of knowledge and action. Let intentions too be abstract objects; let the agent alter its own state; describe what the agent can do by an operational semantics. Then the possible traces of the agent's behaviour allow well-motivated formalization of both cross-level planning and other deductive actions.
1 Introduction Consider this plan. It involves action to change the world ( ), to alter the agent's knowledge ( ), to change the agent's plan ( ), and to change the world in a way not determined when execution starts ( ). All these steps are part of one rational plan, which is quite dierent from an agent time-sharing between two processes, one that develops a plan, another that executes it. How can we reason about such plans? We want to reason about such plans because of (at least) their intrinsic interest, given that they exist; because they allow agents to delay planning when uncertainty or time pressure say they must; and because they unify planning and execution. The paper rst reviews an attempt to formalize this by describing the agent using modal logic, but discards it: the standard objections seem too severe. It suggests instead that one should take the point of view of an observer watching an agent manipulating beliefs and intentions which are like terms in a language: a familiar move. The observer thinks the agent will act according to its beliefs and intentions, and describes how that will happen by ascribing an operational semantics to the agent. The observer, quite dierent from the agent, is then able to use epistemic and dynamic logic to reason about its own beliefs and the changes that the agent will make in the world. I will go to the greengrocer's, see what is in season, decide what to buy,
and buy it.
I will go to the greengrocer's
see what is in season
buy
decide what to buy it
1
The paper is about formalization, but its novelty lies entirely in the way that standard formal devices are employed. The reader likely to be interested in the paper will be familiar with these: epistemic and dynamic modal logics, higher-order logic, operational semantics. For that reason, the paper is intentionally long on motivation and short on formalism.
2 Cross-level planning actions with denotations Familiarity with epistemic and dynamic logic is assumed. Here is my account of cross-level planning actions in a possible worlds framework. It builds on ideas introduced by Moore, who told a beautiful and compelling story about the interaction of belief and action. Think of histories, which are possible courses of events, sequences of world states, or functions from times to states. When one is uncertain, one is uncertain not just about the state, but about the history. Histories that agree about the present can still dier about the future and the past. Moore's standard example is the litmus. There is a bowl of clear liquid, either alkaline or acid, but he does not know which. If he dips a piece of litmus in it, it will go red or blue, but he cannot tell which. He dips it. The litmus goes red (say). Suddenly the set of histories compatible with what he believes has shrunk. Only the histories where the liquid is acid remain credible. Because the status of the liquid has not changed, he has information about the past as well. It is possible to de ne a language combining dynamic and epistemic logic and give it a possible world semantics based on Moore's insight: see [19]. One can characterize actions that preserve information very sharply (they obey (BEL [A]S ) ([A]BEL S ) and those that preserve ignorance, and so characterize actions that gain information as those that preserve information but not ignorance. One can also de ne an action of deducing, then deploy it to deduce that some action meets some speci cation, and then one can carry out that action. De ne an action nd that S which occurs over any period during which the truth of S is not altered, but the set of credible histories is shrunk until the remaining credible ones all agree that S is true: something that one would expect to happen while deducing that S was true. If Action is the set of all relations on possible worlds that are correspond to actions, one de nes
[
[ nd that S ] def = fX 2 Action jBel ; X ; [ S ?] X ; Bel g That de nition can be shown to validate these sentences [ nd that S ]BEL S [( nd that S ) + ( nd that : S )]((BEL S ) _(BEL : S )) [X:( nd that P (X ))]9X:BEL P (X ) The last one uses rst-order non-deterministic choice, de ned as
[
[ X:A(X )] def = f[ A] (d)jd 2 Domain g It says that, after one has successfully done the action, there is some X such that one believes it has property P . Now suppose that P is the property \. . . is an action that achieves GOAL": 2
that is, X : Action :[X ]GOAL. So after doing it, there is an action X which one understands to be an action that achieves one's goal. One has made a plan. One can then formalize \with an X such that P (X ), do action A(X )" as X:(P (X )?; A(X )) In particular one can do \with an X such that X achieves GOAL, do an action X ". Then (X: nd that ([X ]GOAL)); (with X such that (BEL[X ]GOAL) do X ) can be read as \make a plan to achieve Goal ; execute a plan to achieve Goal ". Of course, it may not terminate. There is a lot more that one could say, for instance about how to represent planning steps that improve the plan but do not nish it, but I shall not, because I believe the whole approach is defective. These were some problems that kept coming back. They are none of them original. Logical omniscience. Accounts of belief based on possible worlds are very prone to logical omniscience. If one is interested in ideal reasoners, this does not matter; but if one wants to describe deductive actions, it is intolerable. If the agent is omniscient, why should it ever do any deduction? Operational semantics. Think of the action term A; B . Possible world semantics is denotational semantics, which is good for saying what change will occur when that term is executed, but bad for saying how it can be executed. Re ection. We seem able to be able to \re ect" on what we are doing. We can contemplate our opportunities for action just like any other objects around us. These objects of thought are not easily expressed in terms of world states. Commitment. Suppose I try to make a plan. I re ne a partial plan (something I can describe to others) until I persuade myself it works. Then I take that object of thought as (part of) what I am going to do. This is more naturally described as a change of status of a mental object, not a relation on states.
3 So what instead? One response is that denotational semantics accounts are right, but denotations using possible worlds alone do not model what esh or silicon actually does nely enough. I think this lies behind the many xes for logical omniscience in the epistemic logic literature. My view is that none are as attractive as the plain Hintikka account. Instead, I came to believe that denotational semantics accounts (typically using possible worlds) were doomed because they were doing things upside down. The argument was supposed to run: \Here is an action term deduce (S ) which denotes this relation on possible worlds. That xes which changes in the agent show it has been executed correctly | that is, how an agent should execute it." In fact, the argument should be \Here is an action term deduce (S ). The agent will execute it like this, which will make these changes in the agent, so any axioms about the action must be descriptions of those changes." So 3
Separate the agent, who appears to be executing a plan, from the observer, who reasons about the execution of the plan. The observer is an ideal reasoner, but may not know everything. Make the observer be a behaviourist about the agent. Let the observer say \it is as if the agent has these beliefs and as if it intends this program." Then it is as if its beliefs and programs are any old bits of syntax, but without having to say that agents believe sentences. Such sentences and programs have no denotation, and so are not constrained by any ideas of \correct execution" or \sound inference". All the same, the observer does suppose the agent executes his programs according to rules: arbitrary rules, but followed once xed. Since the observer is a ideal (but ignorant) reasoner, he can predict with partial accuracy which internal states the agent will go through and which actions it will attempt. Those will aect the environment that the observer and agent share. If the observer knows what the environment will be, he can predict the eects of the agent's actions. Epistemic dynamic logic remains a good logic for the observer to use to reason about his own uncertainty and the changes causes by the agent's actions. In particular, the observer can say \the agent is in this state (which I call `the agent intending G'), and it will go through this sequence of internal states (which I call `the agent planning') and then its program will change (`the agent adopting a plan') which will lead to this sequence of actions (`the agent executing its plan') which will have this eect on the world: in which the agent thinks that G is true." Thus the observer can legitimately discuss cross-level planning. Much of this is not the discovery of wonderful new ideas, but recognition of the truth of old ones, in particular those of Konolige [10] and Haas [7].
4 The agent's beliefs and program The proposal is that the objects of the agent's propositional attitudes (beliefs, intentions, fears etc) and the objects that it executes are not constructed from possible worlds, but are rst-class abstract objects, like but dierent from pieces of syntax. This can be represented in several ways. Here it is done by supposing the observer has a \logical framework" in which to express the agent's deductive powers. This is an idea that arose several times when groups, usually interested in theorem proving, realized that the idea of a deductive system was independent of the language and inference rules it was used on. This paper applies ideas from the Edinburgh Logical Framework [9] and the related Isabelle proof assistant [17]. All languages are coded in higher-order logic. Categories of phrases in the grammar of a language are imitated by types of terms of the lambda calculus. The observer and the agent may use dierent languages. Terms of the agent's language (indicated as table ) and the observer's language (indicated as chair) can be embedded in each other. If one assigns types thus loves : name name ) proposition john; jill ; mary : name believes : agent proposition ) truth value fred : agent 4
then believes(fred; loves (john; mary )) : truth value is something the observer can assert or deny. Since the language is higher-order, quanti ers and other binding constructions are available too. Where propositions are involved, the observer's and the agent's languages are in a perfectly conventional meta-language/object-language relationship. The observer may claim that believes(agent; P ) and believes(agent; Q) imply believes(agent; and (P; Q)), but he does not have to unless he thinks it is true. Thus logical omniscience is avoided unless desired, in a standard way. The observer can distinguish what the agent thinks currently true and what he takes as axiomatic and true everywhere using dierent predicates. The set of judgements | predicates over agent language terms, such as true, believes, valid | is not xed. The same can be done with intentions ascribed to the agent. These are terms of type action. One might have sequence of type action action ) action and sing and dance of type action so that sequence (sing ; dance ) : action. Such terms have no denotations. There are only facts about which term the agent is executing, such as intends(sequence (A; B )). These terms are an abstract syntax. One can use (for instance) A; B for sequence (A; B ). The observer needs a theory both about how the agent's actions aect the real environment, and about how the real environment aects the agent, in particular his beliefs: but that will be ignored here.
5 The rules the agent is said to follow The observer ascribes a program and an operational semantics to the agent. The rules say how the agent may rewrite the program, an essentially syntactic activity. Sometimes the rewriting is allowed only if the agent executes a primitive action at the same time. Rewritings where an action must be performed, and less is left to be done, are often written in the notation of Milner's process calculus CCS [13] as
P ?A! Q For the observer, this is just a fancy notation for a perfectly ordinary relation that could have been written can-occur(P; A; Q), which can be true or false in dierent states, or true in every state, like any other sentence. Rewritings where no action is done can be written
P? !Q This may make no important dierence, so that it is reversible,
P ; (Q; R) ? ! (P ; Q); R
(P ; Q); R ? ! P ; (Q; R)
or it can restrict what the program can do, by choice eat sandwich ? ! eat ham sandwich
5
or circumstance
true(C ) if C then P else Q ? !P
These rules are absolutely arbitrary. It would be odd to say an agent followed a rule fry-egg boil-egg ; drink-tea ?????! eat-toast ; eat-toast
but perfectly possible.
6 \may happen" and \does happen"
The observer's claim that P ?A! Q is quite dierent from a claim that the agent actually intends P , will do A and will then intend Q. If that does actually happen over an interval between times i to j , I suggest that the intervals during which the agent intends P or Q, or A happens, or the agent is \thinking about what to do" (going through unmodelled state change), are related like this. i
intends(P)
j
"thinking"
k
intends(Q) does(A)
l
The intervals associated with P ? ! Q are the same except without A. Note that the program is P or Q, and the action is A, all in the agent's language, but the interval labels are intends(P ) and does(A), in the observer's language. To say that that interval actually occurred, the observer could assert the dynamic logic sentence
truth The single-step \trace" P =A) Q is a not a sentence like P ?A! Q, but a state transition, a relation on possible worlds. Similarly, the observer says that if S then A; B else C ; D will be executed by nding that S is true and then going down the A; B branch, by asserting
truth
The syntax of traces is given by the grammar
Trace (P ) ::= P =A ) Trace (Q) j P ) = Trace (Q) j P where A is a primitive action and P is a program. The category of a trace is indexed by its rst term. A possible world semantics for traces is straightforward. Leaving out bulky but routine details, and assuming a temporal order on the states of a single history, it is roughly ik 2 [ P ] i if 8j:i < j < k then j j= intends(P ) ik 2 [ P ) = Trace (Q )] i 9j:ij 2 [ P ] and jk 2 [ Trace (Q)] ik 2 [ P =A) Trace (Q )] i 9j:ij 2 [ P ] and jk 2 [ Trace (Q)] and 9l:jl 2 [ A]
6
Those de nitions validate these axioms (among others) [P ) = Trace (Q )]S [P ][Trace (Q )]S [P ) = Trace (Q )]S [P =A) Trace (Q )]S
S
S If something ever happens, it must be something that is then allowed to happen. This is the link between how the observer thinks the agent can evolve and what the observer thinks can happen in the world. (truth) P ?A! Q (
truth) P ? !Q
7 Non-determinism At this point, the observer seems to have two dierent ways of looking at the way the world changes over time: programs on trees to describe the agent, and states on histories to describe the environment. Program states form a tree The agent's original program and a set of operational semantics rules de nes a tree, a derivation tree, in the obvious way: its nodes are labelled with states of the program and its edges with primitive actions. A node labelled with P reaches a node label with Q by an arc labelled A i P ?A! Q at the starting node. It branches because some programs can evolve in many ways. However, there is no easy way of asserting what is true in the the world at the nodes. So what happens at a node which is labelled with a program such as if S then A else B ? Whether the next node is labelled A or B presumably depends on whether S is true at the current node, which is not de ned. World states form a bundle of histories Think of a bundle of bead necklaces. Each necklace is a possible history, distance along the bundle corresponds to time, each bead is a state. At dierent times, only certain histories are credible. Gain of information decreases that set, loss of information increases it. The credible worlds at a given time are those beads one exposed if one slices the credible histories at that time. The occurrences of actions are segments of necklaces. This is the bundle-of-histories metaphysics described above when talking about Moore's model. The proposal here is to take bundles of histories as more basic than derivation trees. But the most interesting thing about trees is that they fork. To make that t with the bundle of histories of world states, one must see derivation trees as bundles of histories quotiented by the belief relation. Here is an example. The agent has a martini in its hand, and its \Program" is \if teetotal then refuse else drink", but the observer is uncertain about whether the agent is teetotal or not. The observer may be uncertain about other things too, so there is more than one history on which the same actions occur. The credible histories are like this: 7
does(drink) intends(agent,Program) -teetotal(agent)
does(refuse) intends(agent,Program) teetotal(agent)
The envelopes suggest which states are mutually credible. (Taking the epistemic accessibility relation as an equivalence relation is not necessary, it just allows especially simple diagrams.) The quotient of those histories by the belief relation creates a tree. Its nodes are the partitions of the belief relation. The nodes are labelled with the agent's program. They are connected by the quotient of the action relation. We then have does(drink)
intends(agent,Program)
does(refuse)
Again, providing formal statements of all of this is a technical exercise. The intuition is the entire interest of the example. On the account given here, non-determinism is observer uncertainty. In any state there may be many ways a program can evolve, but each history is linear, and it in fact evolves in exactly one way. Non-determinism is only possible if there are many credible histories. Claims about what can happen or must happen depending on how the program evolves, or what is true on some or all branches of the derivation tree, become claims about what it is credible may happen or what is believed will happen. The dierence between \internal" and \external" non-determinism is then in what the observer can in principle predict. Suppose that there are two epistemic accessibility relations, one \in fact distinguished by the agent", one \in principle distinguishable by the agent". A program that evolves dierently on histories not in principle distinguishable is internally nondeterministic. A program that only evolves dierently on histories not in fact distinguished shows external non-determinism. There is no need for nor possibility of separate program constructs for internal and external non-determinism.
7.1 Explicit choice
Re ection involves explicit choice between alternative actions taken as objects of thought. For instance, SOAR [16] can make choosing between tasks into an explicit task, with subtasks of collecting and ranking options. Such explicit choice is possible in a rewriting system too. The point of this section is not to replicate what SOAR can do | too hard |, but to 8
illustrate how the options can be made available for (for instance) ranking, so that SOAR (for instance) could be replicated. The approach distinguishes between the agent \intending" a program and \intendingone-of" a set of programs. That diers from standard process calculi, where the agent is in the same relation to all the programs on a path of a derivation tree. The agent collects some of the dierent ways the program can evolve, but intends none of them until it again selects one of them. This can be shown as intends(P) collecting options
intends-one-of(Options)
intends(Q)
selecting option
The \collecting" and \selecting" transitions are like but dierent from the transition P ? ! Q, and could be written as P ? collect ! Options and Options ? select ! P . They would satisfy the axioms (8Q:Q 2 Set P ? ! Q) (P ? collect ! Set ) (Set ? select ! P ) (P 2 Set ) Describing what the agent does with the options once it has them, or how one of them is selected, is a very important topic, but separate. It is not touched on here. Intervals counting as occurrences of these transitions could be written P = collect ) Options Options = select ) P with a semantics similar to that for P ) = Q earlier. The observer could then say enter-kitchen ; eat-sandwich; drink =enter-kitchen =========) eat-sandwich; drink = collect ) feat-ham-sandwich; drink ; eat-tomato-sandwich; drink g = select ) eat-ham-sandwich eat-ham-sandwich; drink ============== ) drink
Again, there are a dozen dozen exact formalizations. The intuitions are what matters.
8 Deductive action An observer may ascribe deductive actions to an agent. He thinks the agent has an arbitrary set of beliefs and so forth, (with no constraints of completeness or even of consistency), and does things that alter them. The general idea is that sentences and sequents turn into terms that the agent accepts or believes, and inference rules turn into actions that the agent executes. For instance, perhaps one action the observer thinks the agent can do is, conjoin(S; T ), which applies the inference rule and-introduction to two sentences S and T . The observer might suppose that believes(Agent ; S ) ^ believes(Agent ; T ) [does(conjoin(S; T ))]believes(Agent ; and (S; T )) 9
That axiom is not an inference rule. Rather, it describes what the observer thinks the agent will infer if that rule is used in particular circumstances. The observer should ascribe an inference rule from S1; : : : ; Sn infer S by rule rule to an agent exactly when he is prepared to accept an axiom schema something like accepts(Agent ; S1 ) ^ : : : ^ accepts(Agent ; Sn ) [does(apply (rule ; fS1; : : : ; Sng; S ))]accepts(Agent ; S )
In fact, the approach in the example above is almost certainly too simple. For instance, representing inference rules that discharge assumptions may require the agent to make claims that \this is a valid sequent"; quanti er rules may require abstractions over such sequences; but this is all known technology.
8.1 Multi-step inference
Usually proving something will take several steps. The agent has to choose how to prove it, and to do that. The \doing it" appears as executing deductive actions such as the apply above. The \choosing how" appears as the agent's intention being specialized. These steps can be interleaved. The agent's original intention is not to apply some deductive action, but to prove something. Presumably an intention to do a prove action will usually be specialized into an intention to prove some relevant subgoals, and then to combine those subgoals by performing a deductive action. Exactly which specializations of prove actions an agent can perform is part of the observer's theory of how it behaves: though which specialization will be used will often be unknown. Suppose that the observer thinks that the agent can do backward chaining. That is, if the observer thinks that the agent accepts the inference rule rule above, then the intention can be rewritten as prove(S ) ? ! prove(S1); : : : ; prove(Sn); apply(rule ; fS1; : : : ; Sng; S )
or as the same thing with the prove subtasks in a dierent order. It is similarly possible to describe an agent with a preference for forward chaining, or indeed for drawing completely futile unsound inferences. Note that the fact that the observer supposes that the agent accepts an inference rule has been used to motivate two quite separate things: an axiom about what the agent will accept if it uses that rule, and an axiom about how the agent's program can evolve. In both cases the rule is merely suggestive: neither axiom was enforced. Suppose that the observer can decide which of the agent's claims are true. One might hope that the agent's proofs would only succeed when they they should: that is, that (truth) true(S ) However, that is a soundness and completeness result that the observer would have to prove about the agent. 10
8.2 A cross-level planning example
Here is a small example of how the machinery of this paper can be used for cross-level planning, which is where it began. Remember that there is absolutely no claim that any particular language of programs or logic of beliefs or set of axioms used by the observer is especially appropriate. Many details are only sketched. The framework is what matters. Suppose that the the agent is to make a classic blocks-world plan to stack block-a on block-b, when both are clear to start with. Perhaps the program that the observer initially ascribes to the agent is achieve (on(block-a; block-b)) Perhaps the ascribed beliefs about the current state, and about the conditional eects of actions (true at every state, and expressed in a sort of agent-level dynamic logic), are believes(agent; clear (block-a)) 8X : name:8Y : name:valid(agent; implies (clear (X ); after (stack (X; Y ); on(X; Y )))) Suppose the agent always deals with achieve steps by rewriting them as the task \prove there is a suitable plan", followed by \execute any suitable plan". If SPEC (A) abbreviates after (A; on(block-a; block-b)), the program becomes (A : action:prove (SPEC (A))); (with B : action such that SPEC (B ) do B ) It should be able to rewrite prove (S ) ? ! prove (implies (R; S )); prove (R); apply (modus-ponens ; R; implies (R; S ); S ) The current prove action is embedded and a non-deterministic choice, but it turns out one can allow nested rewrites, even if one demands that they re ect sound inference. The agent should spot it can use its axiom about the stack action to deal with its prove (SPEC (A)) goal, just as a standard non-linear planner would spot that a stacking action should be inserted into the plan to achieve the currently interesting goal. The agent's program can be rewritten to (A : action:R : proposition: prove (implies (R; SPEC (A))); prove (R); apply (modus-ponens ; R; implies (R; SPEC (A)); SPEC (A))); with B : action such that SPEC (B ) do B . . . and so on. Following this simple proof is not exciting, so let us skip to where the rewriting and execution of the deductive actions is over and the plan (without abbreviations) has become with B : action such that after (B; on(block-a; block-b)) do B Very likely, the ways that such a rst-order non-deterministic choice may evolve are given by the terms that the agent believes meet the condition. 8X : Type:(believes(agent; S (X )) with Y : Type such that S (Y ) do A(Y ) ? ! A(X )) 11
Fortunately, all that earlier proving has just established that the action term stack (block-a; block-b) does indeed satisfy the condition. How does the observer know that? By reasoning about what will be true after a trace (as distinct from reasoning about which traces are possible). He will be able to show that [achieve (on(block-a; block-b)) ) = ) = with B : action such that SPEC (B ) do B ] believes(agent; SPEC (stack (block-a; block-b))) so he can show that the program can then be rewritten to stack (block-a; block-b) which is executed, leaving only stop behind. If the observer argues like this, he has perfectly justi ably ascribed a cross-level plan to the agent.
9 Related work This paper builds on many pieces earlier work. Unfortunately space requires that they are discussed only brie y. Cross-level planning The rst suggestion of cross-level planning was apparently by Munson [15], followed long after by Bartle's PhD thesis [1], which unfortunately led to no publication. The idea of interleaving planning and execution is now widely accepted but treating both as actions of the same sort is still not common. One group that has attempted it is the MRG group at IRST in Italy: they have had a particular interest in re ection [2]. The impressive SOAR [16] project also attempts to see all actions, mental and physical, as controlled in the same way: though it has turned its attention more to cognitive issues than to formalism. Using possible worlds Moore's work [14] on the interaction of action and knowledge seem exactly what is needed to describe the observer, an ideal reasoner whose views are taken to describe what is \really" going on. There is a clear connection with the tradition stemming from Cohen and Levesque [3] on representing intention, and with the BDI approach associated with Bratman and George and Rao. A fairly recent reference is [5] which points back to the entire programme. This paper does not seek to controvert the BDI programme about the propositional attitudes of agents, merely to describe it dierently. The BDI account takes the possible sequences of agent states as basic, and then derives the rules of agent change as axioms. This paper takes the rules of agent change as basic and derives the sequences of agent states. Halpern and Vardi give a very clear account of a relation of knowledge and histories similar to that in this paper in [8]. I am unaware of earlier descriptions of derivation trees as quotients of histories by a belief relation. Propositional attitudes without possible worlds Despite the success of possible worlds, there is a continuing strand of work combining syntactic and possible world accounts. Haas, and Konolige's earlier work, have been mentioned. To take a few recent examples: Konolige and Pollack [11] work with a standard epistemic logic of belief, but add \conceptual structures" to a possible worlds model to model intentions. 12
A group at Utrecht [20] deal with the problem of \committing to" an action by adding an \agenda" to agents. This is \a function that yields for a given agent in a state of a model the actions that the agent is committed to". When an agent commits itself to an action, the agenda is updated accordingly. How an agent acts at a certain point (possible world) is de ned not just by reference to relations on points, but also by the agenda as it stands at those points. Wooldridge [21] characterizes agents by sets of propositions (representing what it knows of the past) and by general rules (its commitments, expressed as axioms of temporal logic, describing what sequences of states and events the agent will try to realize). That has obvious analogies with the operational semantics proposed in this paper. The propositions in the agent are not arbitrary, but their meaning is in what they make the agent do, not in what they denote at a possible world. Fagin, Halpern, Moses and Vardi [4] suggest a solution to logical omniscience while retaining epistemic logic. They introduce a separate \aware of" construct that governs a sentence and indicates whether the agent has in some sense actively considered the sentence. Only sentences that the agent both ideally knows and is aware of count as eectively known. The truth criterion of awareness involves lists of sentences at indices. The logic this supports is attractively regular. All the same, my bet is that semantics that are even more realist about the syntactic aspect of beliefs and intentions will ultimately be needed. Operational semantics and rewriting There seems to be a big dierence in intellectual style between thinking about change in terms of events (as operational semantics and process calculi do) and in terms of state transitions (as automaton theory and the situation calculus tradition do). The second has been dominant in arti cial intelligence, but the gap is narrowing. One group doing so is the Cognitive Robotics group at Toronto, with GOLOG and CONGOLOG. The reader interested in this paper should compare it with [6]. They de ne a relation over (program ; world ? state ) pairs by recursion over the syntax of a program, and so nd the sequences of world states that executing the program can drive the world through. The relation is not arbitrary, as advocated here, but justi ed by the state transition semantics of the programs. Where they build up from states, this paper builds down from programs; and where they are concerned with world states during and after execution, this paper is concerned with agent states: but I believe many of the intuitions are shared. The standard view in operational semantics seems to be that the basic event was a program doing a primitive action and so turning into another program. As a special case a program could turn into another program by a \silent action": for instance, in CCS, a action. However, Pitts and Ross [18] take the rewriting of the program as more basic. As a special (if common) case, if the program has been rewritten into the form A:P , where A is primitive, A will be done at the same time as the program is rewritten to P . McDermott [12] proposed the idea of an agent's program being made by a process that rewrites it arbitrarily. Once an agent has a goal, an unmodelled process looks up a best plan | perhaps good, perhaps less good | and starts executing it. The plan is then improved asynchronously with its execution. The rewriting is probably good because the rewriting mechanism is the product of either design or evolution. This is realized in the XFRM system. 13
I gratefully acknowledge many discussions with Martin Henson and Ray Turner.
References [1] Richard Bartle. Cross-level planning. PhD thesis, University of Essex, Department of Computer Science, 1988. [2] A Cimatti and P Traverso. Computational re ection via mechanized logical deduction. International Journal of Intelligent Systems, 11(5):279{293, December 1996. IRSTTechnical Report 9312-02. [3] Philip R Cohen and Hector J Levesque. Intention is choice with commitment. Arti cial Intelligence, 42:213{261, 1990. [4] R Fagin, JY Halpern, Y Moses, and MY Vardi. Reasoning about knowledge. MIT Press, 1996. [5] MP George and AS Rao. The semantics of intention maintenance for rational agents. In IJCAI-95, pages 704{710, 1995. [6] GG De Giacomo, Y Lesperance, and HL Levesque. Reasoning about concurrent action, prioritized interrupts, and exogenous actions in the situation calculus. In Proceedings of IJCAI-97, pages 1221{1226, 1997. [7] Andrew R Haas. A syntactic theory of belief and action. Arti cial Intelligence, 28:245{ 292, 1986. [8] JY Halpern and MY Vardi. The complexity of reasoning about knowledge and time, i: lower bounds. Journal of Computer and System Sciences, 38(1):195{237, 1989. [9] Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for de ning logics. JACM, 40(1):143{184, 1993. [10] K. Konolige. A Deduction Model of Belief. Pitman/Morgan Kaufmann, 1986. [11] K Konolige and ME Pollack. A representationalist theory of intention. In IJCAI-93, pages 390{395, 1993. [12] Drew McDermott. Transformational planning of reactive behaviour. Research report YALEU/DCS/RR-941, Yale, 1992. [13] Robin Milner. Communication and concurrency. Prentice Hall, 1989. [14] Robert Moore. A formal theory of knowledge and action. In JR Hobbs and RC Moore, editors, Formal theories of the commonsense world. Ablex Publishing corp., 1985. [15] JH Munson. Robot planning, execution and monitoring in an uncertain environment. In Proceedings of Second IJCAI, page 338:349, 1971. 14
[16] Allen Newell. Uni ed theories of cognition. Harvard University Press, 1990. [17] Lawrence C. Paulson. Isabelle: A Generic Theorem Prover, volume 828 of Lecture Notes in Computer Science. Springer-Verlag, 1994. [18] Andrew Pitts and Joshua Ross. Process calculus based upon evaluation to committed form. In U Montanari and V Sassone, editors, Concur '96: Concurrency theory: Seventh International Conference, Lecture Notes in Computer Science 1119. Springer-Verlag, 1996. [19] SWD Steel. Actions on belief. Journal of applied non-classical logic, 4(1):29{71, 1994. [20] B van Linder, W van der Hoek, and J-J.Ch. Meyer. Formalizing motivational attitudes of agents. In M Wooldridge, JP Muller, and M Tambe, editors, Intelligent Agents II: Proceedings of the 1995 Workshop on Agent Theories, Architectures, and Languages (ATAL-95), Lecture Notes in AI 1037. Springer-Verlag, 1996. [21] Michael Wooldridge. A knowledge-theoretic semantics for concurrent MetateM. In J Muller, MJ Wooldridge, and NR Jennings, editors, Intelligent agents III: Agent theories, architectures and languages: ECAI '96 Workshop (ATAL), Lecture Notes in AI 1193, pages 357{374. Springer-Verlag, August 1996.
15