RuleBackproja (ρ) , where ρ is given by hc : vi, with c ∈ **Dom[**C].

Let g = {}.

Select the set P of relevant probability rules:
P = {ηj ∈ P(X′
i | **Parents**(X′
i
)) | X′
i ∈ C and c is consistent with cj}.

Remove the X′ assignments from the context of all rules in P.

// Multiply consistent rules:
While there are two consistent rules η1 = hc1 : p1i and η2 = hc2 : p2i:
If c1 = c2, replace these two rules by hc1 : p1p2i; Else replace these two rules by the set: **Split**(η1 6 c2) ∪ **Split**(η2

![0_image_0.png](0_image_0.png)

![0_image_1.png](0_image_1.png)

Update the backprojection g = g **∪ {h**ci: pivi}.

Figure 12: Rule-based backprojection.

g a j
(x) = X
x′ Pa(x ′| x)hj (x ′) ; =X x′ Pa(x ′| x) X i ρ (hj ) i(x ′); =X i X x′ Pa(x ′| x)ρ (hj ) i(x ′); =X i v (hj ) i Pa(c (hj ) i| x);
where the term v
(hj )
i Pa(c
(hj )
i| x) can be written as a rule function. We denote this backprojection operation by **RuleBackproj**a (ρ
(hj )
i).

The backprojection procedure, described in Figure 12, follows three steps. First, the relevant rules are selected: In the CPDs for the variables that appear in the context of ρ, we select the rules consistent with this context, as these are the only rules that play a role in the backprojection computation. Second, we multiply all **consistent probability rules to** form a local set of mutually-exclusive rules. This procedure is analogous to the addition procedure described in Section 8.2. Now that we have represented the probabilities that can affect ρ **by a mutually-exclusive set, we can simply represent the backprojection of** ρ by the product of these probabilities with the value of ρ**. That is, the backprojection of** ρ is a rule-based function with one rule for each one of the mutually-exclusive probability rules ηi. The context of this new value rule is the same as that of ηi**, and the value is the product**
of the probability of ηi **and the value of** ρ.

Example 8.12 **For example, consider the backprojection of a simple rule,**

$$\rho=\langle\ P a$$
$\frac{1}{2}$
ρ = h Painting = **done : 100**i, through the CPD in Figure 11(c) for the paint action:

$$\begin{array}{r c l}{{R u e B a c k p r o j_{\mathrm{{pairt}}}(\rho)}}&{{=}}&{{\sum_{{\bf x}^{\prime}}P_{\mathrm{{pairt}}}({\bf x}^{\prime}\mid{\bf x})\rho({\bf x}^{\prime});}}\end{array}$$
$$\therefore\;100\rangle,$$
