# 5.8 Causal Models

A primitive atom is an atom that is defined using facts. A derived atom is an atom that is defined using rules. Typically, the designer writes axioms for the derived atoms and then expects a user to specify which primitive atoms are true. Thus, a derived atom will be inferred as necessary from the primitive atoms and other atoms that can be derived.

The designer of an agent must make many decisions when designing a knowledge base for a domain. For example, consider two propositions, $a$ and $b$, both of which are true. There are many choices of how to write this. A designer could specify both $a$ and $b$ as atomic clauses, treating both as primitive. A designer could have $a$ as primitive and $b$ as derived, stating $a$ as an atomic clause and giving the rule $b\leftarrow\mbox{}a$. Alternatively, the designer could specify the atomic clause $b$ and the rule $a\leftarrow\mbox{}b$, treating $b$ as primitive and $a$ as derived. These representations are logically equivalent; they cannot be distinguished logically. However, they have different effects when the knowledge base is changed. Suppose $a$ was no longer true for some reason. In the first and third representations, $b$ would still be true, and in the second representation $b$ would no longer true.

A causal model, or a model of causality, is a representation of a domain that predicts the results of interventions. An intervention is an action that forces a variable to have a particular value. That is, an intervention changes the value in some way other than manipulating other variables in the model.

To predict the effect of interventions, a causal model represents how the cause implies its effect. When the cause is changed, its effect should be changed. An evidential model represents a domain in the other direction – from effect to cause. Note that we do not assume that there is “the cause” of an effect; rather there are propositions, which together may cause the effect to become true.

###### Example 5.36.

In the electrical domain depicted in Figure 5.2, consider the relationship between switches $s_{1}$ and $s_{2}$ and light $l_{1}$. Assume all components are working properly. Light $l_{1}$ is lit whenever both switches are up or both switches are down. Thus,

 ${\mbox{lit\_l}_{1}\leftrightarrow(\mbox{up\_s}_{1}\iff\mbox{up\_s}_{2}).}$ (5.1)

This is logically equivalent to

 ${\mbox{up\_s}_{1}\leftrightarrow(\mbox{lit\_l}_{1}\iff\mbox{up\_s}_{2}).}$

This formula is symmetric between the three propositions; it is true if and only if an odd number of the propositions are true. However, in the world, the relationship between these propositions is not symmetric. Suppose both switches were up and the light was lit. Putting $s_{1}$ down does not make $s_{2}$ go down to preserve $\mbox{lit\_l}_{1}$. Instead, putting $s_{1}$ down makes $\mbox{lit\_l}_{1}$ false, and $\mbox{up\_s}_{2}$ remains true. Thus, to predict the result of interventions, we require more than proposition (5.1) above.

A causal model is

 $\displaystyle{\mbox{lit\_l}_{1}\leftarrow\mbox{}\mbox{up\_s}_{1}\wedge\mbox{}% \mbox{up\_s}_{2}.}$ $\displaystyle{\mbox{lit\_l}_{1}\leftarrow\mbox{}\mbox{\sim}\mbox{up\_s}_{1}% \wedge\mbox{}\mbox{\sim}\mbox{up\_s}_{2}.}$

The completion of this is equivalent to proposition (5.1); however, it makes reasonable predictions when one of the values is changed. Changing one of the switch positions changes whether the light is lit, but changing whether the light is lit (by some other mechanism) does not change whether the switches are up or down.

An evidential model is

 $\displaystyle{\mbox{up\_s}_{1}\leftarrow\mbox{}\mbox{lit\_l}_{1}\wedge\mbox{up% \_s}_{2}.}$ $\displaystyle{\mbox{up\_s}_{1}\leftarrow\mbox{}\mbox{\sim}\mbox{lit\_l}_{1}% \wedge\mbox{\sim}\mbox{up\_s}_{2}.}$

This can be used to answer questions about whether $s_{1}$ is up based on the position of $s_{2}$ and whether $l_{1}$ is lit. Its completion is also equivalent to formula (5.1). However, it does not accurately predict the effect of interventions.

For most purposes, it is preferable to use a causal model of the world as it is more transparent, stable and modular than an evidential model.