From: AAAI-86 Proceedings. Copyright ©1986, AAAI (www.aaai.org). All rights reserved. Representing Actions with an Assumption-Based Truth Maintenance Paul H. Morris and Robert IntelliCorp El Camino Real 1975 Mountain View, ABSTRACT A. the 94040 following The Assumption-based modeling Truth Maintenance System, introduced by is a powerful new tool for organizing a search through a However, the ATMS is oriented towards alternatives. problem solving, and provides no special mechanisms for We describe an approach to actions or state changes. the ATMS to the task of representing the effects of actions. context extends traditional tree-structured approach The mechanisms to allow context merges. It also takes advantage of the underlying ATMS to detect inconsistent contexts and to maintain Some results are presented concerning possible derived results. questionable merges in treatment of approaches to the sections, we give a functional overview of the We then describe the underlying representation in terms of the ATMS. Special attention is given to the situation where a world has multiple parents. This is followed by a discussion of non-monotonic reasoning about actions in a more KEEworlds de Kleer, space of inferential Nado West California In System facility. general TMS setting, suggested by the worlds with some remarks about related systems. mechanism. We close applying Finally, circumstances. the analysis of actions in terms of a truth 2. Worlds The basic world together ordered the need for a more elaborate maintenance system suggests treatment of contradiction in such systems than exists at present. Assumption-Based efficient Truth Maintenance System (ATMS), new tool for organizing an [2], is a powerful By explicitly through a space of alternatives. by de Kleer search recording the dependence choices, a truth maintenance across different of branches the system of the reasoning steps is able to share search on individual partial results In effect, knowledge gleaned in one context is automatically transfered to other contexts where it is relevant. The ATMS permits simultaneous reasoning about multiple, possibly conflicting contexts, avoiding the cost of context switching. The ATMS purely as presently inferential. constraint temporal This satisfaction changes constituted problems. or actions de Kleer [5] points out, world, and this cannot views is an appropriate problem stance solving for a broad for modeling actions its ancestors in the graph Each successor represents conflicting, thus action be regarded networks. as representing Each partially require ‘I... problem be modeled This KEEworldsTM of the by application somewhat operators the action. of an operator, not Since an action corresponds to an operator itself, this assumption less restrictive than that of STRIPS to have fixed add and delete lists. [8], which and underlying contexts, has been KEETM ATMS and to -on(c,d) implemented (Knowledge This research was (DARPA) reported the official here are position supported in part under contract those of the or policy +on(c, to allow maintain in Engineering Environment by the No. F30602 authors of DARPA and Defense Advanced 85 C 0065. The trademarks should or the U.S. not Research views be construed government. and w3 W2 Engineering are tab) the IntelliCorp. Agency requires Wl Figure Figure Knowledge an is of system.* KEE action a.s class * KEEworlds, The world multiple, ordered solvers [may] act, changing the in a pure ATMS in which there approach facility EnvironmentTM) graph associated However, problems involving some additional mechanism. h advantage of an and QA4 [l]), taking context merges, to detect inconsistent results. in the a hypothetical extension of the world’s to include a new subsequent action. may as A a partially of a world is no way to prevent the inheritance of a fact into a daughter context.” In this paper we explore one approach to using the ATMS to support the modeling of actions. The basic idea is to extend a traditional tree-structured context mechanism (as in CONNIVER derived is a directed network resembles a procedural net of NOAH [9], or NONLIN [lo], where the actions are fully specified. We assume that the effects of a fully specified action can be represented by additions and deletions of base facts, so each world has a set of additions and deletions associated with it that represent the actual primitive changes determined space. provided of actions. as a whole possibly 1. Introduction The with network then represents action network graph introduced structure acyclic graph of worlds. Each world may be regarded representing an individual, fully specified action or state change. Projects conclusions as representing of 2-l The additions and addition table. Those block These 2-l: A Worlds Graph from shows an example worlds graph at Wl produce at W2 represent at W3 correspond c to the table. are W2 and recorded assumed Blocks from World the Notice that preconditions are not to have been tested parent W3 were constructed. in the worlds. blocks world. the initial state, while the deletion the effect of moving block a to the to an alternative action of moving Only in the the AUTOMATED effects of the represented. world before actions REASONING are / 13 To simplify graph the discussion is a tree, parent and we will as in figure 2-1, assume i.e., for the moment each world has a branch of the tree corresponds to a linear Later, we will consider the consequences actions. that at most the double one world sequence of of multiple parents. Observe that we may associate each world with the state that results from applying the changes encoded by the world and all of its ancestors (in figure 2-l the states are depicted inside the worlds). Hence, a world plays a double role, representing both a state change and a world role: assumption may action. also be thought The world the state, and the world given assumption corresponds of as the environment, actually choice the world’s by the or decision all of its ancestors. action environment. encoded that hand, of the set of world ATMS itself to compute the accomplished by having a special world. This node may be thought that action on the other consists and a world and to the The world, led to the corresponds assumptions It is convenient to from to use the world environment. This is world node associated with each of as representing the statement occurs. and a state. The facts in the state will in general be augmented with deductions using general knowledge of the domain. Thus, the facts that are true at a world fall into the following three categories: 1. facts inherited 2. direct additions 3. deductions In from keeping at this from with ancestor world facts the worlds in 1 and 2 view that additions actual changes, they are only recorded that is, an addition only occurs where hold. and a deletion where it did hold. The inherited facts follow and deletions where they the fact did a principle of represent are effective, not previously inertia (essentially STRIPS assumption [ll]): a fact that is added at a world to be true in succeeding worlds, up until (but not including) where it is deleted. The deduced representing is the continues a world marked as reasoning useful facts may include a contradiction. in The inconsistent. such worlds to do meta-level the A world system (however, reasoning distinguished where it about fact FALSE node’ FALSE, can be deduced generally avoids is possible and inconsistent Figure further sometimes The world worlds). Before the in ATMS discussing how underlying ATMS, the worlds we graph give a mechanisms that are used, primarily reader is urged to consult de Kleer the ATMS. is implemented brief sketch in terms of the of nodes ATMS to establish terminology. [3, 4, 51 for a full description The of The basic elements used as an propositional nodes, of the ATMS in the ATMS By nodes. An tracing be justified back ultimate justification support for a it may also have multiple environments. The set of Computing environments for a node is called its label. of nodes is one of the major activities of the ATMS. primary transaction This causes justification. recomputed. contradiction, justifications. called nogoods Environments the ATMS labels of There is a special which is similar The environments and that of nogoods, are not that the constitute are discovered used for further is adding nodes to a be element called FALSE, denoting may have and to a node, that would be in its label are minimal are removed supports affected inconsistent to be inconsistent, from the labels environments. i.e., of nodes that are so that world has two ATMS 1-i / SCIENCE world node a single Node justification of the environment, adding a fact a justification for the parent, and Thus, of the form A, is the world described. F at a world can now in terms of the world possibility is included. of later a nondeletion deletion, the justification be accomplished node. However, by to assumption has the form NwAA,w - F where A,, is the world (to subsequent A, allow world A A,, is supplied Wl. - This the assumption. each separate A distinct addition If F where Awl resulting scheme justifications is the from for addition supplied world and deleted at a at a assumption by the for of this form is shown system to represent the facts, which a fact deletion deletions, and justifications for world installed by the user to represent primitive is justifications additions and be justifications as the presence determination, nondeletion of FALSE ATMS, call nogoods deletion nogoods. figure 3-2. from for independent deletion). WI, the justification to the We will Apart nondeletion is required in nodes, there will deductions from These deductions need be performed only once of the justifications in the ATMS allows the efficient via label propagation, of which derived facts hold in worlds. reasoning. Derivations Each for World a single of the given world. This is depicted graphically in It is not difficult to see that this results in all world assumption it they the the of other of a node as a set of assumptions. Such a set is called an Since a node may have multiple for the node. supersets determine through in terms structure, The to may derivation environment derivations, (minimal) the labels is possible and to a decision or choice, and is Nodes correspond to descriptor. Justification is given NW is the having Directly supplying corresponds elementary context facts or data, which or assumptions. are assumptions N, assumption figure 3-1. allow assumption 3-l: N,, N,&AW+ where 3. Worlds node, entities associated with it, reflecting its determine of FALSE inconsistent arising worlds, from user representing justifications dead ends are used in the to search. non-deletion assumption -on(c,d) +on(c,tab) assumptqon Figure 3-2: Addition The nogoods determined nondeletion assumptions However, only the wish these to take further in section a feedback loop 5). Thus, that the by the ATMS in addition to latter represent all the “blame” To in test with the feedback only are, ensures left contain that nondeletion assumptions is necessarily one nondeletion then checked unique of applied, assumption). as true environment When as are consistent in the world. at extended, the of the fact W2 includes with changes examples environment example, the world also contains in figure on in an ambiguous of such merges. the the order merge. In in cases, branches in which In figure both two arises 4-2, the all that the they are we show state at W5 Thus, on(c,d) is true assumption for the the the Figure depends definition now consider the multiple parents: we perform merges allows more call components, As recombined. Thus, are the to the table. a simple union which before, combined. state to the be where a world The ability decomposed into has to nearly and the In is a figure in 4-1, the to W4 will to stress facts a merge. can be worked on separately the changes represented by corresponding We wish of situation a world a problem independent worlds complex such the that a merge parent +P -P -P +P for 4. Merges as depend along a difficulty from the nondeletion There moved changes changes 2-1, assumption world have W4 both is not worlds, blocks the same but rather 4-2: Ambiguous on the order of the preceding are basically two is to forbid merge. the of the If so, addition of on(a,b) at Wl cannot be consistently added to environment at W2 because it shares a deletion nogood with world assumption for W2. Hence on(a,b) fails to be true at W2. ancestor 4-1, a union generally, may resulting from it (the environment. For assumption for the addition of on(c,d) at Wl. at W2. Note, however, that the nondeletion later More since each nogood contains at most The extended world environment is to see if it is a superset is regarded world We of figure A Merge of procedure ones effect two minimality nogoods example independent. a fact holds in a world, we can compare each The in the node label with the world environment. is done as follows (in principle; the actual algorithm is The world environment is extended but more efficient). extension Wl. the nogoods with the are subsets of the Deletion In the are incorporates resulting whether equivalent, with as many the fact reduced nogoods accordance removed. the process; are system 4-l: assumptions. environment comparison the worlds are course, exempt from this that the deletion nogoods nondeletion the multiple so, produces the state the ancestor worlds. choices in the search, and we for dead ends (we discuss this in the ATMS These removed. latter Figure Justifications may, however, contain the world assumptions. installs nondeletion assumptions and original ones, requirement, and Deletion the merge of the merge ways possible to adopt an intermediate and further specifying others. changes. of dealing in ambiguous so that Merges cases. the ambiguity position, We now with this The other difficulty. is removed. forbidding consider One is to refine the It is also some examples merges of each approach. We have already deletions at worlds from of actions fully required introduced be effective in ancestor specified worlds. actions, to be effective the requirement that with respect to the However, the additions even with respect from additions and state resulting a strict standpoint and deletions to possible states AUTOMATED REASONING could be resulting / 15 from actions merge in sibling linearization then subgraph in which prove Theorem Thus, next result or deletion is ineffective. 1: A merge forbid possesses a any One can that is not assists in the identification that of such additions 2: A graph of worlds an addition is ineffective at two that neither result worlds in which is an ancestor holds 4-2 would It is of interest the forbidden merges effective with addition occurs With this approach, and a the above restriction deletions that merge constraints is the necessity would to be a high that led of quickly produce The a the world, operation. as to schemes determining a consistent frequency allow the merge to be computed environments. The other constraint of unambiguous cases where there the merge. resembles that be whether since schemes simple that is described union of ATMS is the existence of a large core is only one reasonable value for has some for the merge. ancestor in every addition that every valid to show Thus, one might appeal, but arises subgraph but does not as follows. Let of a proposed and deletion linearization define any such In figure W5 in the left example, intuitive implementation, of the value (if there is forbidden otherwise). required that merge being effective. gives the same the merge to be this It is result common linearization; the merge could 4-2, this would lead to P holding not be at in the right. 5. Actions is definiteness, and for contrast, this will be cast in terms of a Doylestyle truth maintenance system [S]. The general approach we follow is to use a form of nonmonotonic inference to reason about the If excessive: one with it forbids does not respect to sufficient condition unambiguous guarantees type an efficient are mandatory are, in effect, the separate branches of the because each branch deletes a effective weaker merge to admit valid if it results nets [lOI . . where actions that violate each not be unordered relative to each other. above restriction unambiguous. somewhat necessary) a potential possible the merges of the other. additions overriding One US call a linearization such be disallowed. that the are two here. appear of the other. Indeed, additions and deletions that preconditions. From this perspective, networks of figure 4-2 are in conflict In a sense, merges that are described A further admits a linearization if and only if there are the for deletions. for conflict-free procedural others’ preconditions may precondition by are always Theorem A similar There worlds). in which least forbidden is unambiguous. to ancestor actions, might expected we are assuming in figure one merge an addition criterion (remember respect worlds. of the proposed the following. above The or cousin if the ancestor many require that non-ancestor (but still merges effects of actions. contradiction not as can be obtained, and NonMonotonicity It is instructive to consider how actions might be represented more general TMS setting, as suggested by the worlds system. truth However, the is somewhat behavior different maintenance systems. will a we require from the in a For in response to approach in system, as standard follows. Theorem 3: A sufficient unambiguous is that contain two worlds, other of which adds the other. This criterion We now and adopt for ancestor a merge subgraph We to be may the examples of figure Besides which then fact, and the absence ignorance, the not original merge, fact when Notice the holds, that merge irrespective of the order in Otherwise, we are ignorant of the from the merge simply denotes such of the fact falsity. the fact the are performed. this definition is unambiguous. is consistent With the dual to the pessimistic true in the merge consistent with optimistic merge, at W5 in both examples of figure 4-2. A merge is the optimistic merge where a fact is if it is true the in some original for P is present the linearization. Again, unambiguous at W5 in both case. this With the examples. deletions is unchanged. The different merge, the descendant effective with merge tends defensible One 16 / deletions additions. respect to be on semantic might imagine SCIENCE are effective For the to easier with implement are obtained deletions case, additions affect, the to the only i.e.. pessimistic all except deletions (the efficiently, are optimistic although less grounds). a wide variety of possible For merge algorithms. state about facts context b”. of an of the to a particular in the records Note that of past in time. “present” past actions there may such like as A3: be several same description; we giving them unique the identifiers is not so far - the relative can action occurrence point be actions represented by to present facts. u was not we justify moved P5 as example, A3 A I% + block a is on block (05) Here, - “(D5)” it a nonmonotonic justification of the form F5 indicates that a subsequent b. condition of the form “block In order to allow deletion, A3.” off block b after an assumption by giving statement of merge For respect optimistic ancestor to kinds additions the are entered. current of individual between the effects The positive justifications linking the is We now discuss the effect of merges on the ATMS representation. When a world has multiple parents, the justification for the world node must be expanded to include each of the parent world nodes among the justifiers. The justification scheme for additions and by different selections of which which justifications for FALSE assertions P5 is a preservation P is absent or of a situation actions with the occurrences by The numbering of identifiers such as A3. Thus intended to imply temporal order. timing of past actions has not been represented. with pessimistic context, evolution containing occurrences distinguish 4-2. other approach to removing criteria for defining the be assured the actions the a is on block b,” the a was placed on block “block “block the ambiguity, merge. In the pessimistic merge, an individual fact belongs to the merge if it survives in every linearization of the actions. The rationale is that we may regard describing not one of which deletes a fact and the it, such that neither is an ancestor of also prohibits follow the additional condition the that “some D5 is an OUT-justifier, action action, say where D5 is the after A3 moves block u off block 6”. the block off, we supply A4, moves If a justification A4-+05 causing the OUT-justifier to come IN, thereby undercutting t,he derivation of “block a is on block b.” Note that the information about the these A difficulty solving the relative timing of actions is now implicitly represented by justifications. with process search space. this generates We representation contradictions do not wish arises that the when represent preservation the dead problem ends assumptions in to be implicated in these; rather, we wish the assumptions representing choices of actions to be the ones considered for revision. Choosing a as culprit during backtracking would preservation assumption amount to postulating the deletes one of the facts make the maintenance the TMS, has ensure that have separation between by de Kleer, only informed the like directly, Incidentally, identification but a then exist Some handles an unknown contradiction. problem that it about. TMS something refuted actions of to the suggested the solver existence leading this solving from are the “sheltered” that One not indirectly in response of problem is required to to a contradiction. the need for a more discriminating is not confined to the difficulty system suggests a schemes The approach KEEworlds possibility is to which could be assumption, TMS maintenance shortcoming handle efficient tool KEEworlds existing described facility for is to consequence defeat his assumption standard break in of waking a window. However, the occupants, purpose. Let if they us suppose the this may are home, burglar have which makes the “contradiction” of waking the occupants, might elect to revise the assumption that the occupants are home, even though that is not subject to the burglar’s control, instead of the real culprit, breaking the window. The system would in effect regard the undesired of waking the occupants However, it is only when there occupants being absent that this This example of “wishful thinking” systems in general need as evidence for their refined treatment outlined here could PI frame-based existing implemented the exploration during either to as provide multiple multiple representation truth of system provides the and The situations. worlds system, part a useful with an a graphical of worlds and allows rule-based forward or backward chaining. discussion of the K.EEworlds of its use, may be found in [8]. Bobrow, facility, G. and B. Raphael. New Programming Languages for Artificial Intelligence Research. Surveys Computer PI PI absence. is independent evidence for the possibility is worth considering. suggests that truth maintenance a more way References default that the occupants are home. The difficulty is that a truth maintenance system, in attempting to resolve the consequence the appears about integrates An application-oriented together with an example would the been and reasoning facility browser for manual generation of worlds process of culprit with preservation has of I(EE assumptions. As another example, consider a situation where a burglar is planning to break into a house late at night. To accomplish his purpose, he must choose some method of entry. One method in contradictions. truth of view the mechanism correctly. that if we and point those new action However, 141 de Kleer, J. Choices Without In Proceedings, 1974. Backtracking. Austin, AAAI-84. Texas, de Kleer, J. An Assumption-Based Truth Maintenance Artificial 28(l), 1986. 28(l), 198G. de Kleer, Intelligence 1984. System. J. Extending Artificial of contradiction 6(3):153-174, the ATMS. IntelEigence handling. i51 Although the approach ATMS more directly for modeling actions, for a user to have to input the justifications and deletions by hand. provides a framework that an action modeling be adapted to using The worlds facility described earlier presents a more convenient interface to PI which graphs items with are recorded in data the same apparent different results for a merge. apparently have no notion mentioned McDermott’s justifiers. by McDermott approach However, Boolean equations, pools. external This means that structure may Another difference of contradiction in the is that this requires rather than paper). One justifications that the labels simple PI two have is that data pools (at least none is be computed PI of illI ViewpointsTM appears quite described comparisons here.* since the underlying facility similar of Inference in behavior However, it little information mechanisms is changes. terms of System. A realization an An underlying examination * Viewpoints and difficult has been to made ARTTM facility make detailed available about of ART. LVe have described an approach mechanism that represents a partially state Corporation’s to the worlds to constructing ordered network of the mechanism Assumption of a similar ART are trademarks of Inference Based has been Truth representation a context of actions or described 1986. System. Intelligence 12(3), 1979. Dependencies: Nardi, B. and A. Paulson. Multiple Worlds With Truth ECAI-86. A Synthesis. Publishing Sacerdoti, and Maintenance Brighton, Nilsson, N. J. Principles of Artificial England, Machine In AI Applications. 1986. Intelligence. Company, Palo Alto, Ca., 1980. E.D. A Structure Elsevier the ATMS. The system Maintenance McDermott, D. Contexts and Data Tioga ilO1 by solving procedure 28(l), J. In Proc. attractive aspect of may have OUT- propagation the ATMS. IEEE Transactions on Pattern Analysis Intelligence 5(3):237-246, May, 1983. of data pool order in with Intelligence Artificial Remarks pools Doyle, A Truth system. The worlds considered here resemble the data h?cDermott [7]. H owever, the result of a merge in the approach is determined by the arbitrary chronological J. Solving Artificial it would be cumbersome representing additions PI 6. Closing de Kleer, Problem the for Plans North-Holland, Tate, A. Generating Project Tn I.1C,-U-77, and Behavior. 1977. Networks. pages 888-893. Cambridge, Massachusetts, 1977. [12] lj’aldinger, Achieving In Elcock, pages R. J. Several Goals Simultaneously. E. and Michie, D. (editor), Muchi?ze Intelligence 94-136. Ellis Hoi-wood, Chichester, 8, 1977. in Maintenance in a classical Corporation. AUTOMATED REASONING / 17