DECKT has been shown to derive sound and complete infer- ences with respect to possible worlds-based theories [Patkos and Plexousakis, 2009], based on a correspondence estab- lished to an epistemic extension of Mueller’s branching Event Calculus (BDEC) [Mueller, 2007]. Exploiting the existing machinery we arrived to the same result about our extension with HCDs, proving that the (KT6) axioms constitute a com- plete and sufficient set:
Corollary 1 After any ground sequence of actions with deter-
ministic effects but with potentially unknown preconditions, a fluent formula φ is known whether it holds in DECKT if and only if it is known whether it holds in BDECKT, under the bridging set of axioms L and M.
Proof sketch3: The branching discrete Event Calculus
(BDEC) devised by Mueller is a modified version of the lin- ear discrete Event Calculus (LDEC) (see Figure 1). It re- places the timepoint sort with the sort of situations, lifting the requirement that every situation must have a unique succes- sor state. The Branching Discrete Event Calculus Knowledge Theory (BDECKT) that we have developed follows on from Moore’s [1985] formalization of possible world semantics in action theories, where the number of K-accessible worlds re- mains unchanged upon ordinary event occurrences and re- duces as appropriate when sense actions occur. Similar to Scherl and Levesque’s [2003] approach for the Situation Cal- culus , BDECKT generalizes BDEC in that there is no single initial situation in the tree of alternative situations, rather a forest of trees each with its own initial situation.
The DECKT axiomatization is based on the linear Event Calculus that treats knowledge as a fluent and uses a set of axioms to determine the way this epistemic fluent changes its truth value as a result of event occurrences and the knowledge already obtained about relevant context. BDECKT on the other hand is based on a branching time version of the Event Calculus where knowledge is understood as reasoning about the accessibility relation over possible situations (Figure 1). Mueller has established a set L of mapping rules between the underlying linear and branching versions of the Event Calcu-
3
The full proof is available at:
http://www.csd.uoc.gr/∼patkos/Proof.pdf
lus and proved that these two versions can be logically equiv- alent [Mueller, 2007]. The L axioms restrict -among others- BDEC to a linear past. Based on this corollary established by Mueller, we have shown that the two knowledge theories manipulate knowledge change the same way, i.e., the set of known formulae is the same after a sequence of actions (in contrast to the underlying theories, our equivalence result is not an one-to-one mapping of all the axioms). We define a set M that serves as a bridge between DECKT and BDECKT and construct each individual effect axiom of one theory from the axioms of the other and the bridging rules (and vice versa). This way, the conjunction of DECKT, BDEC, LDEC, L and M can provide all BDECKT epistemic derivations leading to completeness with respect to the possible worlds seman- tics and respectively, the conjunction of BDECKT, BDEC, LDEC, L and M can provide all DECKT epistemic deriva-
tions resulting in soundness of DECKT inferences.
In what follows, we additionally show that reasoning with HCDs is computationally more efficient. It is an important conclusion as it paves the way for practical applications of knowledge representation without substantial sacrifice in ex- pressiveness. The objective is to study the complexity of checking whether a fluent formula holds after the occurrence of an event sequence in total chronological order, given a do- main theory comprising a fixed set of context-dependent ef- fect axioms and a set of implication rules (either in the form of state constraints or in the form of HCDs).
5.1
Classic Event Calculus Without Knowledge
For n domain fluents there are potentially2ndistinct knowl-
edge bases (KBs) (when all n fluents are released) that need to be progressed according to occurring events and at most n HoldsAt() and n ReleasedAt() predicates to search through for each KB. All predicates are stored as facts:
Algorithm: For each event eioccurring at tiand each KB
1. Retrieve all effect axioms of ei:V j
[HoldsAt(fj, t)] ⇒
θ(ei, f′, t)?, for θ = Initiates, T erminates, Releases
This information is already known at design time. Therefore, it requires constant time, regardless of the type of action, the number of effect axioms or the size of the domain (number of fluents).
2. Query the KB for the truth value of the precondition flu-
ents of ei:V j
[HoldsAt(fj, ti)]?
The intention is to determine which of the previously retrieved axioms will be triggered, i.e., which effect flu- ents will change their truth value. The problem of query answering on (untyped) ground facts (without rules) re- duces to the problem of unifying the query with the facts, which is O(n), where n is the size of the KB.
3. Determine which fluents are inertial:¬Released(f, t)? Inertial fluents that have not been affected by eiin step
2, i.e., are neither released nor the event releases them, need to maintain their truth value in the successor time- point. As before, the cost of the query is O(n).
4. Assert in the KB the new truth values of fluents.
As the new truth values refer to the successor timepoint, this step does not involve any update of existing facts,
rather an assertion of facts to an empty KB. We assume constant time, regardless of the number of assertions. 5. Use state constraints to infer all indirect effects.
The truth value of those fluents that are released from inertia, yet ruled by state constraints, is determined. In order to perform all derivations from the set of rules, one may apply standard techniques from classical logic inference, such as resolution. To preserve generality of results, by a minor abuse of notation we denote this com- plexity as O(IN FSC) or O(IN FHCD) in the sequel,
based on whether the rules involve only the state con- straints or both state constraints and HCDs. We revert to this complexity at the end of this section. Also, in this step multiple models may be produced and added to the set of KBs, owed to the unconstrained released fluents, i.e., non-inertial fluents subject to no state constraint. Summarizing, the complexity of reasoning with the Event Calculus given a sequence of e actions is characterized by O(e∗2n∗(2∗n+IN FSC))4
. The steps of the algorithm fol- low on from previous complexity analysis of simpler formu- lations of the classic Event Calculus, as in [Paschke, 2006].
5.2
Possible Worlds Approach
The number of possible worlds depends on the number of unknown fluents, i.e., in a domain of n fluents, u of which being unknown, we need to store at most2upossible worlds,
where (u≤ n). One reasoning task needs to be performed for each of these worlds, since the same effect axioms of a given domain theory may give rise to diverse conclusions in each world. As such, the size of the KB of fluents that is main- tained at each timepoint is O(2u−1) (a fluent may hold only
in half of the total2u
worlds). Moreover, it is easy to verify that, according to the definition of knowledge, answering if a conjunctive (resp. disjunctive) query of m fluents is known requires at most2u−m (resp. 2u− 2u−m) worlds to check
truth in (plus one, if the formula turns out to be unknown). The algorithm and its logical inferences need to be per- formed for each possible world, given as input the domain fluents and the fixed set of effect axioms and state constraints. Given a sequence of e actions, the complexity for conjunctive queries is O(e ∗ 2u∗ (2 ∗ n + IN FSC) + 2u−m∗ n) (resp.
O(e∗2u∗(2∗n+IN FSC)+(2u−2u−m)∗n) for disjunctive
queries), as we first need to progress all possible worlds and then issue a query concerning the desirable fluent formula to a subset of them, with cost O(n).
It should be noted that each fluent that becomes released from the law of inertia causes the number of possible worlds to double, i.e., u increases by one. As a result, both the size of the KB and the reasoning effort increase significantly. Un- settlingly, one should also expect that u ≃ n even for the real-world case, as we argue below.
5.3
DECKT Approach
DECKT performs a single reasoning task with each action using the new axiomatization’s meta axioms and substitutes
4
Although constants could be eliminated, we include them for emphasis, so that the reader can follow each step of the algorithm.
each atomic domain fluent with the corresponding KP and Knows epistemic fluents. KP is always subject to iner- tia, whereas Knows is always released, therefore step 3 can be disregarded altogether, along with the need to pre- serve multiple versions of KBs for unconstrained fluents (the Knows fluents never fluctuate). Furthermore, disjunctive epistemic expressions are preserved in this single KB without the need to be broken apart, since all appropriate derivations are reached by means of HCDs. The size of the input for step 2 is equal to that of reasoning without knowledge, as we only search through those Knows fluents that refer to atomic domain ones. The difference now is that each domain effect axiom is replaced by 5 new: 2 due to (KT3), 1 due to (KT5) and 2 due to (KT6.1). Nevertheless, as with the non-epistemic theory, all we need to query in order to progress the KB after any action are the precondition fluents (plus the effect fluent for some of the axioms). Therefore, as before, the complexity of this step is O(n), since one predefined query to a domain of n fluents suffices to provide the necessary knowledge about all DECKT effect axioms mentioned above.
Apart from the epistemic effect axioms, we also intro- duced axioms for handling HCDs (KT6.2-4). Since HCDs are treated as ordinary inertial fluents (they are modeled in terms of the KP fluent), they fall under the influence of tradi- tional Event Calculus inference (steps 1,2). For these axioms the necessary knowledge that needs to be obtained is whether some HCD that incorporates the effect fluent is among the HCDs stored in the KB. Their number increases as the agent performs actions with unknown preconditions. Let d denote the number of KP fluents that represent HCDs, then the com- plexity of querying the KB is O(d), where d ≤ 2n.
Following the algorithm, we can see that the complexity of reasoning with DECKT is O(e ∗ (n + d + IN FHCD) + n),
where O(IN FHCD) is the complexity of logical inference
with state constraints and HCDs. The input is the atomic in- ertial fluents, as usual, reified in the Knows fluent. The last addition refers to querying n atomic epistemic fluents, i.e., the query formula, after the narrative of actions.
In fact, even when the underlying domain axiomatization is non-deterministic, its epistemic meta-program introduces no additional complexity: the KP fluent is always subject to inertia and whenever a domain fluent is released due to uncer- tainty, its corresponding KP fluents become false according to (KT5). As such, reasoning with DECKT requires only a reduced version of the Event Calculus, where the Releases predicate is removed from the foundational axioms.
5.4
Discussion on Complexity Results
We see that the dominant factor in the complexity of reason- ing with possible worlds is the number u of unknown world aspects. In the worst case, u = n resulting in exponential complexity to the size of the domain; yet, even in real-world problems u ≃ n, as we expect that in large-scale dynamic domains many more world aspects would be unknown to the agent than known ones at any given time instant. Further- more, since in practice the query formula that needs to be evaluated is often orders of magnitude smaller in size than the domain itself, i.e., (n≫ m), query answering of either con- junctive or disjunctive formulae spirals quickly out of control.
With DECKT, on the other hand, it is the number of ex- tra fluents capturing HCDs that predominates the complex- ity. In fact, although in the worst case it can be that d = 2n
this is a less likely contingency to meet in practice: it would mean that the agent has interacted with all world aspects hav- ing no knowledge about any precondition or that state con- straints that capture interrelated fluents embody the entire do- main (so called dominos domains which lead to chaotic envi- ronments are not commonly met in commonsense reasoning). Moreover, HCDs fall under the agent’s control; even for long- lived agents that execute hundreds of actions, HCDs provide a guide as to which aspects to sense in order to obtain knowl- edge about the largest set of interrelated fluents, thus enabling the agent to manage their number according to resources.
Apparently, the number and length of HCDs also affect the inference task. Still, the transition from O(IN FSC) to
O(IN FHCD) has polynomial cost; the complexity of most
inference procedures, such as resolution, is linearly affected when increasing the number of implication rules, given that the size of the domain is constant. Finally, one should no- tice that even in the worst case one reasoning task needs to be performed for each action. Specifically, the factor d does not influence the entire process, as is the case of2u
for possible worlds, significantly reducing the overall complexity.