Discrete Event Calculus with Branching Time
Total Page:16
File Type:pdf, Size:1020Kb
Discrete Event Calculus with Branching Time Erik T. Mueller IBM Thomas J. Watson Research Center P.O. Box 704 Yorktown Heights, NY 10598 USA Abstract every situation must have a unique successor, and (2) adding an argument for successor situation to Happens, Initiates, We add branching time to the linear discrete event calculus, Terminates, and Releases. We show how BDEC can be used which yields a formalism for commonsense reasoning that combines the benefits of the situation calculus and the event to solve commonsense reasoning problems involving hypo- calculus. We show how the branching discrete event calcu- thetical events, concurrent events, and triggered events. We lus can be used to solve commonsense reasoning problems extend BDEC to distinguish between hypothetical and ac- involving hypothetical events, concurrent events with cumu- tual situations and events. In an extended version of this lative and canceling effects, and triggered events. paper (Mueller in submission), we characterize the precise relationship between LDEC and BDEC, and prove that a re- stricted version of BDEC is equivalent to a version of the Introduction situation calculus. The classical logic event calculus (Miller & Shanahan 2002; The discrete event calculus was developed to facilitate au- Shanahan 1997) can serve as a foundation for common- tomated event calculus reasoning. It simplifies the classical sense reasoning. It can be used to reason about im- logic event calculus axioms, reducing the number of axioms portant areas of the commonsense world including action from 17 to 12 and eliminating triply quantified time from and change (Shanahan 1999a), space (Morgenstern 2001; most axioms. The discrete event calculus is the basis for the Shanahan 1996; 2004), and mental states (Mueller 2006a). Discrete Event Calculus Reasoner program for automated An important aspect of commonsense reasoning is reason- commonsense reasoning (Mueller 2004b).1 We have imple- ing about hypothetical events. Unlike the situation calculus mented BDEC within this program, extending it with the (McCarthy & Hayes 1969), the classical logic event calcu- ability to reason about hypothetical events. lus typically uses a linear time structure (Miller & Shana- han 2002, p. 453) and does not handle hypothetical events Linear Discrete Event Calculus (Shanahan 1997, p. 364). In this paper, we show how a version of the classical logic We use many-sorted languages with equality. The linear dis- event calculus can be modified to yield a new formalism that crete event calculus has sorts for events, fluents, and situa- combines the benefits of the situation calculus and the event tions. We use a version of the linear discrete event calcu- calculus. Like the situation calculus, the new formalism sup- lus without gradual change, and with an axiomatization of ports reasoning about hypothetical events. Like the classical the nonnegative integers. The language has the constant S0 logic event calculus, the new formalism supports reasoning denoting the initial situation, the function SL(s), which de- about the commonsense law of inertia, release from the com- notes the unique successor of situation s, and the following monsense law of inertia, concurrent events with cumulative predicates: and canceling effects, context-sensitive effects, indirect ef- • HappensL(e, s): Event e occurs at situation s. fects, nondeterministic effects, preconditions, and triggered • HoldsAt(f, s): Fluent f is true at situation s. events. • ReleasedAt(f, s): Fluent f is released from the commonsense We start with the linear discrete event calculus (LDEC) law of inertia at situation s. (Mueller 2004a; 2006a), a discrete version of the classi- • InitiatesL(e, f, s): If event e occurs at situation s, then fluent f cal logic event calculus. LDEC has been proved logically will be true and not released from the commonsense law of inertia equivalent to the continuous event calculus for integer time at the successor of s. (Mueller 2004a), and to temporal action logics (Doherty et • TerminatesL(e, f, s): If event e occurs at situation s, then fluent al. 1998) for inertial fluents and single-step actions (Mueller f will be false and not released from the commonsense law of in- 2006b). We modify LDEC to obtain the branching discrete ertia at the successor of s. event calculus (BDEC) by (1) removing the requirement that • ReleasesL(e, f, s): If event e occurs at situation s, then fluent f Copyright c 2007, Association for the Advancement of Artificial 1This program is available for download at http:// Intelligence (www.aaai.org). All rights reserved. decreasoner.sourceforge.net/. will be released from the commonsense law of inertia at the suc- the commonsense law of inertia at s2. cessor of s. • Releases(e, f, s1, s2): If event e occurs between situation s1 and The commonsense law of inertia (Shanahan 1997) states that situation s2, then fluent f will be released from the commonsense a fluent’s truth value persists unless the fluent is affected by law of inertia at s2. an event. When a fluent is released from this law, its truth Let BDEC be the conjunction of the following axioms: value can fluctuate. Fluents that are released from the com- BDEC1. ¬S(s, S0) monsense law of inertia can be used to model nondetermin- BDEC2. S(s1, s) ∧ S(s2, s) → s1 = s2 istic effects (Shanahan 1999a) and indirect effects (Shana- BDEC3. ∀P ((P (S0) ∧ ∀s1, s2 (S(s1, s2) ∧ P (s1) → P (s2))) → han 1999b). ∀s P (s)) Let LDEC be the conjunction of the following axioms: BDEC4. S(s1, s2) ∧ HoldsAt(f, s1) ∧ ¬ReleasedAt(f, s2) ∧ ¬∃e ( (e, s , s ) ∧ (e, f, s , s )) → LDEC1. SL(s) 6= S0 Happens 1 2 Terminates 1 2 HoldsAt(f, s2) LDEC2. SL(s1) = SL(s2) → s1 = s2 (s , s ) ∧ ¬ (f, s ) ∧ ¬ (f, s ) ∧ LDEC3. ∀P ((P(S0) ∧ ∀s (P(s) → P(SL(s)))) → ∀s P(s)) BDEC5. S 1 2 HoldsAt 1 ReleasedAt 2 ¬∃e (Happens(e, s1, s2) ∧ Initiates(e, f, s1, s2)) → LDEC4. HoldsAt(f, s) ∧ ¬ReleasedAt(f, SL(s)) ∧ ¬HoldsAt(f, s2) ¬∃e (HappensL(e, s) ∧ TerminatesL(e, f, s)) → HoldsAt(f, SL(s)) BDEC6. S(s1, s2) ∧ ReleasedAt(f, s1) ∧ ¬∃e (Happens(e, s , s ) ∧ LDEC5. ¬HoldsAt(f, s) ∧ ¬ReleasedAt(f, SL(s)) ∧ 1 2 (Initiates(e, f, s , s ) ∨ Terminates(e, f, s , s ))) → ¬∃e (Happens (e, s) ∧ InitiatesL(e, f, s)) → 1 2 1 2 L ReleasedAt(f, s ) ¬HoldsAt(f, SL(s)) 2 LDEC6. ReleasedAt(f, s) ∧ BDEC7. S(s1, s2) ∧ ¬ReleasedAt(f, s1) ∧ ¬∃e ( (e, s , s ) ∧ (e, f, s , s )) → ¬∃e (Happens (e, s) ∧ (InitiatesL(e, f, s) ∨ Happens 1 2 Releases 1 2 L ¬ (f, s ) TerminatesL(e, f, s))) → ReleasedAt(f, SL(s)) ReleasedAt 2 LDEC7. ¬ReleasedAt(f, s) ∧ BDEC8. Happens(e, s1, s2) ∧ Initiates(e, f, s1, s2) → HoldsAt(f, s2) ¬∃e (HappensL(e, s) ∧ ReleasesL(e, f, s)) → ¬ReleasedAt(f, SL(s)) BDEC9. Happens(e, s1, s2) ∧ Terminates(e, f, s1, s2) → ¬HoldsAt(f, s2) LDEC8. HappensL(e, s) ∧ InitiatesL(e, f, s) → HoldsAt(f, SL(s)) BDEC10. Happens(e, s1, s2) ∧ Releases(e, f, s1, s2) → ReleasedAt(f, s2) LDEC9. HappensL(e, s) ∧ TerminatesL(e, f, s) → ¬HoldsAt(f, SL(s)) BDEC11. Happens(e, s1, s2) ∧ (Initiates(e, f, s1, s2) ∨ Terminates(e, f, s1, s2)) → LDEC10. HappensL(e, s) ∧ ReleasesL(e, f, s) → ReleasedAt(f, SL(s)) ¬ReleasedAt(f, s2) BDEC12. Happens(e, s , s ) → S(s , s ) LDEC11. HappensL(e, s) ∧ 1 2 1 2 (InitiatesL(e, f, s) ∨ TerminatesL(e, f, s)) → Axioms BDEC1 through BDEC3 are generalized Peano ¬ReleasedAt(f, SL(s)) axioms along the lines of Schmidt (1960), which do not re- Axioms LDEC1 through LDEC3 are the Peano axioms quire each situation to have exactly one successor. BDEC3 for the nonnegative integers. Axiom LDEC3 is a second- is a second-order induction axiom similar to the one used order axiom of induction. by Reiter (1993) for the situation calculus. In any model of 2 these axioms, situations form a tree whose root is S0. Branching Discrete Event Calculus We extend LDEC to branching time as follows. We re- Commonsense Reasoning Problems place the function SL with a relation S, and allow a situa- BDEC can be used to reason about (1) hypothetical events tion to have zero or more successors. We add an argument as in the situation calculus, and (2) phenomena of action to Happens, Initiates, Terminates, and Releases specifying and change as in the event calculus. In this section, we the successor situation. It is important to add the succes- show how BDEC can be used to perform commonsense sor situation to Initiates, Terminates, and Releases to treat reasoning about three scenarios: the hypothetical Yale concurrent events with cumulative and canceling effects (see shooting scenario, the soup bowl scenario, and the reactive below). cat scenario. The language has the constant S0 denoting the initial sit- uation, and the following predicates: Hypothetical Yale Shooting Scenario Van Belleghem, De- • S(s1, s2): Situation s2 is a successor of situation s1. necker, and De Schreye (1997) describe the following prob- • Happens(e, s1, s2): Event e occurs between situation s1 and sit- lem of hypothetical reasoning, which is based on the Yale uation s2. shooting scenario (Hanks & McDermott 1987). A turkey, • HoldsAt(f, s): Fluent f is true at situation s. which was initially alive, was shot by a person. It is not • ReleasedAt(f, s): Fluent f is released from the commonsense known whether the gun was loaded. But it is known that, law of inertia at situation s. if the person had waited instead of shooting, then the gun • Initiates(e, f, s1, s2): If event e occurs between situation s1 and would have been loaded afterward. The problem is to infer situation s2, then fluent f will be true and not released from the that the gun was initially loaded, and that the turkey died.