<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Causal Analysis of Events Occurring in Tra jectories of Dynamic Domains?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Michael Gelfond</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Evgenii Balai</string-name>
          <email>evgbalaig@ttu.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Texas Tech University</institution>
          ,
          <addr-line>Lubbock, Texas 79409</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we de ne the notion of causes of events in trajectories of dynamic domains from the standpoint of an agent acting in this domain. We assume that the agent's knowledge about the domain is axiomatized in P-log with consistency restoring rules { a powerful knowledge representation language combining various forms of logical and probabilistic reasoning. The proposed model of causality is tested on a number of examples of causal domains frequently used in the literature.</p>
      </abstract>
      <kwd-group>
        <kwd>causality</kwd>
        <kwd>answer set programming</kwd>
        <kwd>P-log</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>This paper contributes to a research program aimed at nding precise
mathematical formalization of substantial parts of commonsense knowledge and
developing commonsense reasoning methods in knowledge representation languages
based on Answer Set Prolog (ASP). We concentrate on causal reasoning, which
seems to be of vital importance for our understanding of the world. The nature
of causality and various causal relations has, for a long time, been debated by
philosophers, physicists, statisticians, researchers in AI, etc. For recent work see,
for instance, [5,6,13,16]. But despite the amazing progress, we do not yet have
fully adequate understanding of the subject. There are still di erent
interpretations of the intuitive meaning of causality, answers provided to causal questions
by various formalisms do not always match the intuition, and some \causal
stories" simply cannot be expressed in existing languages. In our approach we
address these problems by using rich knowledge representation language capable
of expressing non-trivial causal relations as well as various forms of
commonsense background knowledge. We opted for logic programming language P-log
with consistency-restoring rules (cr-rules) [1,3,10]. It is an extension of ASP with
well known methodology for representing defaults and their direct and indirect
exceptions, recursive de nitions, probability, direct and indirect e ects of actions
(including parallel and non-deterministic actions), time, etc. Its non-monotonic
reasoning system combines standard ASP reasoning, abduction, and
probabilistic computation. We are primarily interested in dynamic domains and, as in
? Copyright © 2020 for this paper by its authors. Use permitted under Creative</p>
      <p>Commons License Attribution 4.0 International (CC BY 4.0).
many theories of action and change, view the agent's knowledge base as a
description of possible trajectories of the domain. The events in these trajectories
are caused by actions. This is di erent from a large body of work in which the
agent's knowledge is represented by structural equations, causal logic or other
formalisms emphasizing purely causal reasoning at the expense of background
knowledge. Usually, but not always, these works provide counterfactual account
of causality. There is, however, a number of recent approaches (see, for instance,
[4,7,8,14]) which seem to share our philosophy. There are, however, many
substantial di erences related to the power of our KR-language and other factors.
The multiplicity of interpretations of the word cause is partially addressed by
concentrating on what is often referred to as actual causes. In our approach time
(or at least ordering of events) is an integral part of this notion. We further deal
with this problem by dividing causes of events into those which consist of
deliberate actions, those which contain at least one accidental (but known) action,
and those which include some exogenous actions not native to the agent's model
of the world. The methods of testing our de nitions and KR methodology are
determined by our goal. We view our work as a step in an attempt to pass what
J.Pearl calls Mini-Turing Test [17]: \The idea is to take a simple story, encode
it on a machine in some way, and then test to see if the machine can correctly
answer causal questions that a human can answer." So, naturally, we use this
to test accuracy of our modeling and relationship with other approaches. (Of
course, only a few of such examples are presented in this paper.) To make sure
that wrong answers to these questions are not caused by inadequate
representation of the problem, we pay serious attention to developing KR methodology
which properly combines causal and background knowledge about the domain.
The paper is organized as follows. We assume some knowledge of P-log and
dene notions of background theory T and scenario S. The former contains general
knowledge about the domain while the latter describes a particular story to be
analyzed. Together they form the knowledge base of an agent, T (S), referred
to as causal theory. Next section contains de nitions of three types of causes
accompanied by some explanatory examples. This is continued by analyses of
causal relations in several simple stories, followed by conclusion and future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Representing Agent's Knowledge</title>
      <p>Knowledge of an agent will be represented by a P-log program tailored for
reasoning about e ects of actions and causes of events, Regular function symbols of
a program will be partitioned into uent, action, static and auxiliary and used
to form uent, action, static and auxiliary terms respectively. We assume that
actions are Boolean. The last parameter of functions from the rst two groups is
of a special sort called time-step (usually represented by natural numbers);
timesteps are not allowed in statics. Recall that P-log terms formed by random are
of the form random(m; f (x); p). This expression can also be viewed as an atom
(a shorthand for random(m; f; p) = true), which states that, as the result of a
random experiment m which is either genuine or deliberately interfered with,
f (x) should take the value from fY : p(Y ) \ range(f )g. In addition, we require
that for every time steps t1 and t2 occurring in m, f respectively, t2 &gt; t1 if f is
a uent, and t2 t1 if f is an action. Finally, both m and random(m; f (x); p)
are viewed as action terms. Sometimes we say that f (x; t) is an instance of
abstract uent (action) f (x) and that the value y of f (x; t) is the value of abstract
uent (action) f (x) at time-step t. Atoms formed by action terms are called
action atoms. Similarly for uent and static atoms. We are especially interested
in properties of events { statements describing occurrences of actions and values
of uents at given time-steps. More precisely an action event is a collection of
action atoms. Similarly for uent events. An event is a uent event or an action
event. The causal theory representing the agent's knowledge consists of a
particular story (also called domain scenario or recorded history of the domain) to
be analyzed and background theory representing agent's general knowledge.
Scenario is a recorded history of time-stepped observations and deliberate
(intended) actions which happened in the domain up to the current time-step.
The initial time-step of a scenario is usually assumed to be 0. Observations
are expressions of the form obs(atom), actions are of the form do(a(x; t) = y);
do(a(x; t) = true) indicates a deliberate execution of action a(x; t); do(a(x; t) =
f alse) { a deliberate refusal of such execution. Another form of do-operator
is similar to do-operator of the original P-log [3] and Pearl's causal networks
[16]. If random(m; e(x; t); p) is a random experiment and y is a possible value
of e(x; t) then do(m; y) represents an intervention into random experiment m
which forces e(x; t) to take value y. If the value y of e(x; t) is simply observed
this is recorded as obs(e(x; t) = y). Whenever possible, we omit do from the
description of actions in our scenarios.</p>
      <p>Background theory is a P-log program T which contains no deliberate actions
and observations and whose regular part (obtained from T by removing cr-rules)
is consistent. T contains a set of causal mechanisms or causal laws of the form
m : a(x) = y
body; not ab(m); not interf ere(a(x); y)1
( )
if a is an action and
m : a(x) = y
body; not ab(m)
if a is a uent. In both rules body is non-empty and contains no default
negation, m is the mechanism's name, ab and interf ere are auxiliary functions;
interf ere(a(x); y) holds if action a(x) is deliberately assigned value di erent
from y; ab(m) captures indirect exceptions to m. Each causal mechanism is
accompanied by Contingency Axiom</p>
      <p>ab(m) + body
1 If a(x) is formed by random(r; f (u); p), then m is omitted and the causal mechanism
is named r. Random experiments are normally named by action terms.
If the causal mechanism is not defeasible, then the contingency axiom and the
corresponding \not ab(m)" from the body of a causal law can be omitted.
Intuitively, the rst two rules say that normally body is a su cient cause for
head. The guard interf ere(a(x); y) present in rule ( ) allows deliberate actions
to defeat triggering defaults. We will use shorthand interf ere(a(x)) to denote
interf ere(a(x); true). The Contingency Axiom for n allows causal mechanism m
to be defeated by observations. It is a consistency-restoring rule of a version of
ASP called CR-Prolog [2]. It says that \causal mechanisms m may be disabled,
but such a possibility is very rare and, whenever possible, should be ignored".
For more details, see [9]. In addition, a rule r of a causal theory must satisfy the
following conditions:
{ If a time-step t occurs in r then some time-step occurs in head(r).
{ If t occurs in head(r) then (a) if head(r) is a uent atom then time-steps of
uents and actions in body(r) do not exceed t and t 1 respectively, (b) if
head(r) is an action atom then no time-step in body(r) exceeds t.
Let us illustrate the notion of causal theory by formalizing two informal examples
frequently used in the literature on causation.</p>
      <p>Example 1 (Firing Squad). A certain chain of events is required for a lawful
execution of a prisoner. First, the court must order the execution. The order
goes to a captain, who signals the soldiers on the ring squad (denoted by a and
b) to shoot. We'll assume that they are obedient and expert marksmen, so they
only shoot on command, and if either of them shoots, the prisoner dies.
Background theory F S for this example contains abstract actions court order,
captain order, shoot(a) and shoot(b), inertial abstract uent dead and standard
auxiliary symbols ab and interf ere. F S consists of causal mechanisms:
[m1(T )] : captain order(T + 1)
court order(T );
not ab(m1(T ));
not interf ere(captain order(T + 1))
(1a)
which is a defeasible version of dynamic causal law used in actions languages.
Two other rules:
[m2(G; T )] : shoot(G; T + 1)
captain order(T );
not ab(m2(G; T ));
not interf ere(shoot(G; T + 1))
[m3(G; T )] : dead(T + 1)
shoot(G; T );
not ab(m3(G; T ))
are defeasible triggers. We also have the contingency axioms:</p>
      <p>
        ab(m1(T )) + court order(T )
ab(m2(G; T )) + captain order(T )
ab(m3(G; T )) + shoot(G; T )
(1b)
(1c)
(2a)
(2b)
(2c)
(3a)
(3b)
(3c)
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
(5a)
(5b)
and the closed world assumptions (CWA) for actions:
      </p>
      <p>:shoot(G; T )
:captain order(T )
:court order(T )
not shoot(G; T )
not captain order(T )
not court order(T )
The CWA for deliberate action court order will be accompanied by an indirect
exception:</p>
      <p>court order(T ) +
We also need inertia axioms for dead:
:dead(T + 1)
dead(T + 1)
:dead(T ); not dead(T + 1)
dead(T ); not :dead(T + 1)
Despite the fact that the story insists that the guards only shoot on command,
the corresponding causal law is defeasible. This is essential since we would like
to consider scenarios in which guards may refuse to follow the orders or simply
fail to do so by unspeci ed reasons. Similarly for other causal mechanisms.
Example 2 (Flipping a Coin). Theory T C has \transient" uent agreed to play
(players agreed to start the game), and a \transient" uent h (the coin landed
heads). Transient uents are partial functions which do not satisfy inertia. T C
also contains action f lip ( ip the coin); h is de ned at time-steps immediately
following f lip. Causal mechanism
random(f lip(T ); h(T + 1))
agreed to play(T ); not ab(m(T ));
not interf ere(random(f lip(T ); h(T + 1)))
states that agreed to play triggers a random experiment f lip which ends in
heads or in tails. We also need the contingency axiom and CWA for actions.
Agent's knowledge base and its models: A scenario S is encoded in P-log
as follows: obs(A), where A is time-stepped by 0 is encoded by A; if the time-step
of A is greater than 0 then obs(A) is encoded by a constraint: \ not A".
Dostatements of S remain unchanged. We denote this encoding by enc(S). Agent's
knowledge base is given by causal theory</p>
      <p>T (S) =def T [ enc(S) [ DO
where S is a scenario of T and DO is a collection of axioms enforcing the intuitive
meaning of do:
{ for every do(a(x; t) = y) from S axioms:
a(x; t) = y</p>
      <p>do(a(x; t) = y)
where the former axiom connects do with an actual occurrence of an action,
and the latter allows a deliberate action interfere with a defeasible trigger
assigning values to action a(x);
{ for every do(m; y) from S, where m is the name of random experiment
random(m; a(x; t); p), axioms
do(m; a(x; t); y)</p>
      <p>do(m; y)
where the former axioms guarantees that on random experiments do
coincides with the original do of P-log and the latter de nes interference with
random experiments.</p>
      <p>We only consider S for which T (S) is a coherent P-log program in which
multiplicity of models can only be a result of general axiom (19) from [1] for random.
As any such program, T (S) comes with the de nition of its possible worlds and
probability function. A possible world W of T (S) can be viewed as a possible
trajectory of a dynamic system associated with the program and written as
W = h (tf ); (tf ); : : : ; (i); (i); : : : (tl
1); (tl)i
where (i) is the set of all action events from W time-stepped by i and (i) is
the set of all uent atoms of W time-stepped by i and statics from W . Note that
though all actions from (i) start at i, their e ects may manifest themselves at
di erent time-steps.</p>
      <p>
        De nition 1 (Model). A model of scenario S of T is a possible world of T (S).
Let us demonstrate this notion by going back to the Firing Squad example.
Example 3 (Firing Squad: models). Let us x F S from Example 1. Then, in the
model of the scenario S0 = hobs(:dead(0))i the prisoner is alive at every time
step of the model. There are no actions. Scenario
S1 = hobs(:dead(0)); court order(0)i has one model, M 2:
:dead(0); court order(0), :dead(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); captain order(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
:dead(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ); shoot(a; 2); shoot(b; 2), dead(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ), interf ere(court order(0); f alse).
When displaying a model we usually omit negations of actions derived by the
CWA and the do statements.
      </p>
      <p>
        Scenario S2 = hobs(:dead(0)); court order(0); :shoot(a; 2); :shoot(b; 2)i is more
interesting. Deliberate actions :shoot(a; 2); :shoot(b; 2) from S together with
axioms from DO cancel axiom m2(G; 2). The only model M of S2 contains
:dead(0); court order(0), :dead(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); captain order(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); :shoot(a; 2); :shoot(b; 2),
:dead(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ); interf ere(shoot(a; 2)); interf ere(shoot(b; 2)); :dead(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
(In what follows we omit atoms formed by interf ere in the models). Next
consider scenario S3 = hobs(:dead(0)); court order(0); obs(:dead(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ))i with a
noninitial observation which contradicts the e ects of our causal mechanisms. The
2 The model can be computed using our prototype P-log solver. For more details, refer
to https://github.com/iensen/plog2.0/tree/master/plogapp/tests/causality.
contradiction can be resolved by assuming that the captain was not able to follow
the court order or that his order could not have been executed by the guards.
This is done by the Contingency Axioms. In CR-Prolog the contradiction can be
avoided by nding abductive support - a minimal collection R of cr-rules whose
application restores consistency of the program, i.e., the regular part r of
program together with the result, (R), of replacing + in rules from R by has
an answer set. We de ne R =def r [ (R). M is a model of if it is a model
of R for some abductive support R of . In this case we say that R generates
M . There are di erent ways to compare abductive supports. In what follows we
mainly assume that support A is better than B if A B. In our case there are
two ways to resolve the contradiction. One abductive support is R1 consisting
of contingency axioms for m2(a; 1) and m2(b; 1). The axioms derive ab(m2(a; 1))
and ab(m2(b; 1)) and hence disable m2(a; 1) and m2(b; 1). By inertia, F SR1 will
conclude :dead(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) which leads to the rst model M1 of F S:
ab(m2(a; 1)), ab(m2(b; 1)), :dead(0); court order(0), :dead(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); captain order(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
:dead(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ); :shoot(a; 2); :shoot(b; 2), :dead(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
Contradiction can also be avoided by abductive support R2 consisting of the
contingency axiom for m1(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ). In F SR2 causal connection between court and
captain orders will be disabled and, by CWA, no order will be given by the
captain. This will lead to the second model M2 of F S:
ab(m1(0)), :dead(0); court order(0), :dead(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); :captain order(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
:dead(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ); :shoot(a; 2); :shoot(b; 2), :dead(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
In scenario S4 = hobs(:dead(0)); obs(dead(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ))i the only way to satisfy the last
observation is to use rule (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) of F S and assume court order(0).The resulting
model, M , consists of all atoms from the model of S1 except for those formed
by do and interf ere.
      </p>
      <p>
        Example 4 (Flipping a Coin (Models)). It is easy to see that all models of
scenario S0 = hagreed to play(0)i contain random(f lip(0); h(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )) (which we shorten
to f lip(0)). The experiment generates two possible outcomes h(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) and :h(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ).
Thus, S0 has two models: M1 = fagreed to play(0); f lip(0); h(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )g and M2 =
fagreed to play(0); f lip(0); :h(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )g. Scenario S1 = hagreed to play(0); obs(h(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ))i
has only one model M1. Finally, S2 = hagreed to play(0); do(f lip(0); true)i has
only one model M1 [ fdo(f lip(0); h(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); true)g.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>The De nitions</title>
      <p>Our framework is based on the following assumptions: An agent is supplied
with a ( xed) background theory T and a scenario S with the last time step n,
which consists of observations and the complete collection of deliberate actions
which occurred in the domain up to that time. In addition, we assume that every
uninterrupted random experiment of a scenario is immediately followed by the
observation of its outcome. Scenarios which do not satisfy these assumptions
will be called illegal. In what follows we introduce three di erent types of cause:
deliberate, accidental and exogenous. The best explanation of an event is given
by nding its deliberate cause. If this is impossible we attempt to nd causes
which include accidental (not deliberate) actions. As the last resort we allow
causes containing unknown exogenous actions.</p>
      <p>Deliberate Cause: Our de nition of a deliberate cause can be viewed as a
formalization of the following intuition:
\A cause of e(x; k) = y is a deliberate action event which initiates a
chain of events bringing about e(x; k) = y. Moreover, must be in some
sense minimal, i.e. no parts of can be removed without loss of causal
information about e(x; k) = y."
An expression \chain of events" from our informal description will be
modeled by notion of proof 3 M be a set of ground literals, and M = fnot l :
l is not satis ed by M g.</p>
      <sec id="sec-3-1">
        <title>De nition 2 (Proof ).</title>
        <p>{ A sequence P = hr0; l0; r1; l1 : : : ; rn; lni where ls are literals from M and rs
are rules or names of random experiments of program is called a proof of
ln in M from (M; ` ln) if</p>
        <p>For every i, body(ri) is satis ed by fl0; : : : ; li 1g [ M ,
li is the head of ri or
li is e(k) = y and li 1 is random(n; e(k); p) representing a non-interrupted
random experiment (i.e., there is no y such that do(n; e(k) = y) is in S),
ri is n, and p(y) 2 fl0; : : : ; li 1g</p>
        <p>No proper sub-sequence of P satis es the above conditions.</p>
        <p>If M is a possible world of we simply say that P is a proof of ln in M ;
{ A scenario S of background theory T derives event e(k) = y in M (or simply
T (S) derives e(k) = y) if there is a proof of e(k) = y in M from T (S); S
derives e(k) = y if S derives e(k) = y in every model of S.</p>
        <p>The idea of a deliberate (or intentional) action is formalized as follows.
De nition 3 (Deliberate Action). Let S0 be the result of removing action
event a(i) = y from a scenario S of T . We say that a(i) = y is deliberate in T (S)
if no model of S0 contains a(i) = y.</p>
        <p>To de ne a cause of an event e(k) = y in a scenario S of T we introduce a
notion of the event's in ection point - a time-step i k such that i 1 is the last
time-step of S in which the value of e(k) is not predicted to be y. To make this
3 A similar notion of a proof is given in [7]. Important and substantial di erences
include special treatment for P-log literals formed by do and random, literals with
default negation, and cr-rules.
precise we need some notation: Let S[i] consists of observations of S made at
points not exceeding i and all actions S which occurred at steps not exceeding
i 1, i.e. S[i] =def fobs(f (j) = y) 2 S : j ig [ fa(j) = y 2 S : j &lt; ig.
De nition 4 (In ection Point). Step i is the in ection point for e(k) = y
in T (S) if (a) T (S[i 1]) does not derive e(k) = y and (b) for every j 2 [i; k],
T (S[j]) derives e(k) = y.</p>
        <p>
          De nition 5 (Deliberate Cause). Let S be a scenario of T , obs(e(k) = y) 2
S, M be a model of S generated by a (possibly empty) abductive support R,
and i be the in ection point of e(k) = y in T R(S). A non-empty set of actions
from S is called a cause of e(k) = y (with respect to T (S)) in M if
(a) T R(S[i 1] [ ) derives e(k) = y in M ,
(b) for every there is a proof of e(k) = y from T R(S[i
which is not a proof of e(k) = y from T R(S[i 1] [ ) in M .
Consider scenario S1 from Example 3. Clearly, the in ection point for dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          )
in S1 [ fobs(dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ))g is 1. It's cause is court order(0) with the proof consisting
of applications of causal mechanisms of F S. The same is true for dead(
          <xref ref-type="bibr" rid="ref4">4</xref>
          ). Now
consider a theory T with action a, inertial uent f and causal law f (T )
a(T 1): Clearly M = f:f (0); m(0); :f (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ); a(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ); f (
          <xref ref-type="bibr" rid="ref2">2</xref>
          )g is the only model of
scenario S = hobs(:f (0)); random(m(0); a(
          <xref ref-type="bibr" rid="ref1">1</xref>
          )); obs(a(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ))i: The only deliberate
action random(m(0); a(
          <xref ref-type="bibr" rid="ref1">1</xref>
          )) of S is the only cause of f (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) in M . We often read
this as: f (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) is caused by the outcome a(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) of random experiment m(0). This
reading will be used throughout the paper.
        </p>
        <p>
          Causes Containing Accidental Actions. To see the need for causes with
accidental actions consider scenario S4 = fobs(:dead(0)); obs(dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ))g from
Example 3. Since S4 contains no deliberate actions, dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) has no deliberate
cause. One can, however, argue that action court order(0) should be a cause
of dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) in the unique model M of S4 even though it is not deliberate. This
intuition can be justi ed by the following informal principle:
        </p>
        <p>Execution of a non-deliberate (accidental) action could be a part of an
event's cause if it's deliberate execution could.</p>
        <p>
          One should, however, be careful in formalizing this intuition. An attempt to do
that by simply adding the action to the original scenario does not work. Since
court order is derived by F S in the model of S4, it is not deliberate in scenario
S5 = S4 [ fcourt order(0)g and hence such a scenario is not legal.
One way to avoid the di culty is to remove from F S rule (
          <xref ref-type="bibr" rid="ref4">4</xref>
          ) and consider S5 to
be a scenario of a new theory F S ; court order(0) is deliberate in F S (S5). After
this \surgery", somewhat reminiscent of Pearl's surgery on causal networks,
dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) would indeed be caused by court order(0). Another small operation is
required in scenarios containing random events. The new scenario should also
be extended by the observation of the outcome of this experiment taken from
the corresponding model. These observations lead to the following de nition.
Let M be a model of a scenario S of T , E be an action atom accidental in
T (S), c(E; M ) be E if E is regular, or random(m; f ) followed by observation of
outcome f = y of m in M if E is random(m; f ). If is an action event then
c( ; M ) =def fc(E; M ) : E 2 g. We say that a rule r generates the value of
term a(i) if head(r) is a(i) = y for some y or is of the form random(m; a(i); p).
By surg(T; ) we denote a theory obtained from T as follows. For every a(i)
such that contains random(m; a(i); p) or a(i) = y for some y remove from T
every rule generating the value of a(i).
        </p>
        <p>
          De nition 6 (Causes Containing Accidental Actions). Given a model M
of scenario S of T and action event M , is an accidental cause of e(k) = y
in M with respect to T (S) if there is an action event M such that
{ M is a model of scenario S =def S [ c( ; M ) of T1 = surg(T; ) (Note that,
by construction, all actions of S are deliberate), and
{ is a deliberate cause of e(k) = y in M with respect to T1(S ).
Now let us go back to scenario S4 from Example 3 and show that the cause of
dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) in model M of S4 is court order(0). The model contains court order(0)
included in it by cr-rule (
          <xref ref-type="bibr" rid="ref4">4</xref>
          ) of theory F S. Let = = fcourt order(0)g. It is
easy to check that court order(0) is a deliberate cause of dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) in scenario S4 =
S4 [ fcourt order(0)g of surg(F S; ) obtained from F S by removing rule (
          <xref ref-type="bibr" rid="ref4">4</xref>
          ).
Note, that captain order(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) will not be a cause of dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) in M since M is not
a model of S4 [ fcaptain order(
          <xref ref-type="bibr" rid="ref1">1</xref>
          )g. Finally, consider scenario S3 from Example
3. As was shown there it has two models: M1 in which guards refuse to shoot
and M2 in which captain does not follow his order. One can check that refusal
to shoot is the cause of :dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) in M1. In M2 the cause is :captain order(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ).
        </p>
        <p>
          To see how the de nition works for random events consider the unique model
M1 of scenario S1 = hobs(agreed to play(0)); obs(h(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ))i from Example 4. The
in ection point for h(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) in S1 is 1. The scenario contains no deliberate actions and
hence h(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) has no deliberate cause. It is, however, not di cult to show that, by
De nition 6, h(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) is caused by a random experiment f lip(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ). In the model M2 of
S2, however, h(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) is the result of deliberate intervening action do(f lip(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ); true).
        </p>
        <p>The di erence between Pearl's actions and observations is important not only
for computing probability of events but also for discovering their causes. So far,
we have been looking for causes of events occurring in a model M among actions
from M . Now we allow to search for causes among a speci c type of actions not
present in M .</p>
      </sec>
      <sec id="sec-3-2">
        <title>Causes Containing Exogenous Actions.</title>
        <p>
          If an event has no cause consisting of deliberate and accidental actions
then it may be useful to admit causes containing unknown, exogenous
actions responsible for bringing about events in the initial state of the
scenario and/or abnormality relations in causal mechanisms of the theory.
The de nition is omitted due to space limitation. We simply illustrate the
intended behavior. Consider scenario S0 = hobs(:dead(0)); obs(:dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ))i of F S
from Example 3. The cause of :dead(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) in the only model M0 of S0 is the
exogenous action which brought about :dead(0). The cause of :f (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) in the only
model of scenario S = hobs(:f (0)); a(0); obs(:f (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ))i of theory
m(T ) : f (T )
a(T
1); not ab(m(T ))
is the exogenous action which brought about :f (0).
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Examples</title>
      <p>This example, often used to highlight di culties with counterfactual approach
to causation, (see, for instance, [12]) deals with so called \late preemption".
Example 5 (Breaking the Bottle). Suzy and Billy both throw rocks at a bottle.
Suzy's rock arrives rst and shatters the bottle. Billy's arrives second and so does
not shatter the bottle. Both throws are accurate: Billy's would have shattered the
bottle if Suzy's had not.</p>
      <p>
        The background theory, T S of the story, with steps ranging from 0 to 2 contains
actions throw(suzy) and throw(bill) with static attributes duration(suzy) =
1 and duration(bill) = 2 for durations of agents' throws, causal mechanism
m(A; T1)
shattered(T2)
throw(A; T1); duration(A) = D; T2 = T1 + D;
:shattered(T2 1); not ab(m(A; T1))
determining the e ect of throwing, contingency axiom for this rule and the
inertia axiom for shattered. Consider scenario
S0 = hobs(:shattered(0)); throw(suzy; 0); throw(bill; 0)i. The only model M0 of
S0 is: f:shattered(0); throw(suzy; 0); throw(bill; 0); shattered(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); shattered(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )g.
Step 1 is the in ection point for shattered(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) and shattered(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) in M0 and their
only cause is throw(suzy; 0). Next consider S1 = S0 [ fobs(:shattered(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ))g and
its unique model
      </p>
      <p>
        M1 = M0 [ f:shattered(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ); ab(m(suzy; 0))g) n fshattered(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )g
Step 1 is still the in ection point for shattered(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) in M1, which is now caused
by throw(bill; 0); :shattered(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) 2 M1 is caused by an exogenous action which
brought about :shattered(0). Next consider
S2 = hobs(:shattered(0)); throw(bill; 0); throw(suzy; 1)i. It is easy to check that
in its only model shattered(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) has two causes: throw(bill; 0) and throw(suzy; 1).
Here is another example, taken from [11].
      </p>
      <p>Example 6 (Hall's Neuron Net). Consider a neuron net from Figure 1.
a
c
f
d
b
If a link from neuron n1 to neuron n2 is ended by an arrow, then n1 stimulates
n2; if it is ended by a bullet, then n1 inhibits n2; e is a \stubborn" neuron,
requiring two stimulatory signals to re. For other neurons one stimulating signal
is su cient.</p>
      <p>A background theory N N for this example will have sorts for neurons, an
action stim(S) which stimulate neurons from set S, Boolean uents stimulated
and inhibited, and statics link and stubborn. The net will be represented by a
collection of atoms link(a; d; stm), link(a; f; inh), etc., where link(X; Y; stm) /
link(X; Y; inh) indicates that X stimulates/inhibits Y , and facts stubborn(e) [
f:stubborn(N ) : N 6= eg. We will need two time steps: 0 and 1 with 0 being used
for the execution of actions and 1 for their e ects, and two inputs of action stim:
s1 and s2 de ned by statics: member(c; s1), member(c; s2), member(a; s2).
The causal mechanisms of N N are
[m0(X; S)] : stimulated(X; 1)</p>
      <p>stim(S; 0); member(X; S)
[m1(X; Y )] : stimulated(Y; 1)
[m2(Y )] : stimulated(Y; 1)
:stubborn(Y ); :inhibited(Y; 1);
link(X; Y; stm); stimulated(X; 1)
stubborn(Y ); :inhibited(Y; 1);
cardfX : link(X; Y; stm); stimulated(X; 1)g &gt; 1
[m3(X; Y )] : inhibited(Y; 1)</p>
      <p>link(X; Y; inh); stimulated(X; 1)
We assume that all neuron directly stimulated by stim are included in its
parameter S, which eliminates the possibility of parallel stim actions, i.e. we have
:stim(S1; I)</p>
      <p>stim(S2; I); S1 6= S2
Finally, we need the inertia axiom for the uents, and CWA with indirect
exceptions for action stim: :stim(S; 0) not stim(S; 0) and stim(S; 0) + : Let us
consider N N together with a scenario S0 = init [ fobs(stimulated(e; 1))g where
init = fobs(:stimulated(X; 0)); obs(:inhibited(X; 0)) : neuron(X)g. The
regular part of N N (S0) is inconsistent. There are two ways to restore consistency
using the cr-rule, and therefore two models of S0: M1 containing stim(s1; 0) in
which e is stimulated via neurons c, f , and b and M2 which contains stim(s2; 0).
In M2 neuron f is inhibited and e is stimulated via neurons a, c, d, and b. Clearly,
in the rst model stimulated(e; 1) is caused by stim(s1; 0) and in the second by
stim(s2; 0). Hence in S0, stimulated(e; 1) has two possible causes. One can argue
that stim(s2; 0) shall not be an actual cause of stimulated(e; 1) in S0 since there
is a better \minimally su cient" candidate stim(s1; 0). Indeed, since s1 s2,
action stim(s1) is simpler than stim(s2) but we believe that this does not
preclude stim(s2; 0) from being viewed as a valid possible cause of stimulated(e; 1)
in S0. This seems to agree with the Hall's view.</p>
      <p>Example 7 (Adopted from [15] to our language).</p>
      <p>Consider background theory with actions e1; e2, inertial uents d1; d2,d3, l, causal
mechanisms:
and inertia axioms for uents. Consider scenario:</p>
      <p>
        S = fe1(0); e2(0); obs(:d1(0)); obs(:d2(0)); obs(:d3(0)); obs(:l(0))g
Our de nition agrees with the author of [15] and produce two causes of l(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ):
C1 = fe1(0)g and C2 = fe1(0); e2(0)g. However, consider now background
theory T2 obtained from T by adding CR-rules e1(0) + and e2(0) + and a new
scenario S2 = fobs(:d1(0)); obs(:d2(0)); obs(:d3(0)); obs(:l(0)); obs(l(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ))g.
Intuitively, we would expect C1 and C2 to also be the causes of l(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) in T2(S2).
However, the subset-minimal preference relation does not produce this result.
In the extended version we de ne a new preference relation which minimizes
the number of applied cr-rules not relevant to actions and observations from the
scenario. It produces desired results for this and other examples.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>The paper outlines a new approach to analyzing causes of events in
trajectories of dynamic domains. The fuller version, available from https://www.depts.
ttu.edu/cs/research/krlab/documents/causal2020 extended.pdf, contains more
examples and a more detailed comparison with other approaches. In future, we
plan to conduct some mathematical investigation of causal theories. Even though
in some respects our formalism is a more powerful modeling tool than that of
structural equations and graphical models advocated by Pearl and many others
it remains to be seen if it can also expand their computational power.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Balai</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
          </string-name>
          , Y.:
          <article-title>P-log: re nement and a new coherency condition</article-title>
          .
          <source>Annals of Mathematics and Arti cial Intelligence</source>
          <volume>86</volume>
          (
          <issue>1-3</issue>
          ),
          <volume>149</volume>
          {
          <fpage>192</fpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Balduccini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Logic programs with consistency-restoring rules</article-title>
          .
          <source>In: International Symposium on Logical Formalization of Commonsense Reasoning</source>
          , AAAI 2003 Spring Symposium Series. vol.
          <volume>102</volume>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Baral</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rushton</surname>
            ,
            <given-names>J.N.</given-names>
          </string-name>
          :
          <article-title>Probabilistic reasoning with answer sets</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          <volume>9</volume>
          (
          <issue>1</issue>
          ),
          <volume>57</volume>
          {
          <fpage>144</fpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Batusov</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Soutchanski</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Situation calculus semantics for actual causality</article-title>
          .
          <source>In: Thirty-Second AAAI Conference on Arti cial Intelligence</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Beckers</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vennekens</surname>
          </string-name>
          , J.:
          <article-title>Counterfactual dependency and actual causation in cplogic and structural models: a comparison</article-title>
          .
          <source>In: Proceedings of the Sixth Starting AI Researchers Symposium</source>
          . vol.
          <volume>241</volume>
          , pp.
          <volume>35</volume>
          {
          <fpage>46</fpage>
          . IOS Press (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Bochman</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Actual causality in a logical setting</article-title>
          .
          <source>In: IJCAI</source>
          . pp.
          <volume>1730</volume>
          {
          <issue>1736</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Cabalar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fandinno</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fink</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leuschel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schrijvers</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Causal graph justi cations of logic programs</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          <volume>14</volume>
          (
          <issue>4- 5</issue>
          ),
          <volume>603</volume>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Fandinno</surname>
          </string-name>
          , J.:
          <article-title>Towards deriving conclusions from cause-e ect relations</article-title>
          .
          <source>Fundamenta Informaticae</source>
          <volume>147</volume>
          (
          <issue>1</issue>
          ),
          <volume>93</volume>
          {
          <fpage>131</fpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kahl</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Knowledge representation, reasoning, and the design of intelligent agents: The answer-set programming approach</article-title>
          . Cambridge University Press (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rushton</surname>
          </string-name>
          , N.:
          <article-title>Causal and probabilistic reasoning in P-log. Heuristics, probabilities and causality</article-title>
          . A tribute to Judea Pearl pp.
          <volume>337</volume>
          {
          <issue>359</issue>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Hall</surname>
          </string-name>
          , N.:
          <article-title>Two concepts of causation</article-title>
          , pp.
          <volume>225</volume>
          {
          <fpage>276</fpage>
          . MIT Press (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Halpern</surname>
            ,
            <given-names>J.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hitchcock</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Graded causation and defaults</article-title>
          .
          <source>The British Journal for the Philosophy of Science</source>
          <volume>66</volume>
          (
          <issue>2</issue>
          ),
          <volume>413</volume>
          {
          <fpage>457</fpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Halpern</surname>
          </string-name>
          , J.: Actual Causality. MIT Press (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>LeBlanc</surname>
          </string-name>
          , E.,
          <string-name>
            <surname>Baldiccini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vennekens</surname>
          </string-name>
          , J.:
          <article-title>Explaining actual causation via reasoning about actions and change</article-title>
          .
          <source>In: JELIA</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Leblanc</surname>
            ,
            <given-names>E.C.</given-names>
          </string-name>
          :
          <source>Explaining Actual Causation via Reasoning About Actions and Change. Ph.D. thesis</source>
          , Drexel University (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Pearl</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <source>Causality</source>
          . Cambridge university press (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Pearl</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mackenzie</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>The Book of Why</article-title>
          . Basic
          <string-name>
            <surname>Books</surname>
          </string-name>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>