- Target selection: we want to compute the probability distribution on the variable Target (T), so we have to consider the joint distribution with all variables on which T
is conditionally dependant : T t-1 (the previous value of T), and all the variables on each character (except for Resists). The probability of a given target depends on the previous one (it encodes the previous decision and so all previous states). HPi depends on whether that the ith character is an ally, on his class, and if he's a target. Such a conditional probability table should be learned, but we can already foresee that a targeted ally with *C=tank* would have a high probability of having low HP because taking it for target means that we intend to heal him. Di is more probable to be far if Ai=false and T=i (our kind of druid attack with ranged spells). The probability of the ith character being an ally depends on if we target allies of foes more often. The probability that Δ*HPi=negative* is higher for *Ai=false* and *Ci=healer* and *T=i* and also for *Ai=true* and *Ci=tank*. As for Ai, the probability of IDi is driven by our soft evidence of targeting characters near death. The probability of Ci is driven by the distribution of foes and allies population, tuned with a soft evidence of which classes our druid human player will target more frequently. Each and every time, if T≠i, the probability of the left variable is given according to the uniform distribution. For the task of computing the distribution on Target, the joint distribution is simplified (by conditional independence of variables) as:
€
P(T ∧Tt−1 ∧ HP1:n ∧ D1:n ∧ A1:n ∧ΔHP1:n ∧*ID1:n* ∧C1:n ) =

$$P(T^{t-1})P(T\,|\,T^{t-1})\prod_{i=1}^{n}\{P(HP_{i}\,|\,A_{i}\wedge C_{i}\wedge T)P(D_{i}\,|\,A_{i}\wedge T)P(A_{i}\,|\,T).\tag{1}$$  $$P(\Delta HP_{i}\,|\,A_{i}\wedge C_{i}\wedge T)P(ID_{i}\,|\,T)P(C_{i}\,|\,A_{i}\wedge T)\}$$
€
€
€
€
- Skill selection: As previously for targets, we are interested in the conditional probabilities of each character's state variables given other state variables and given T
and S. If *T=i, S=big_heal, Ci=tank* and *Ai=true*, the probability that *HPi=0* or 1 (very low) is very high. Some skills have optimal ranges to be used at and so *P(Di)* will be affected. *Ai=true* will have a probability of 1.0 of *S=any_heal* as will *Ai=false* have a probability of 1.0 is *S=any_damage*. The probability of Δ*HPi=negative* will top when S=heal for an ally. That of *Ri=nature* for *S=nature_damage* will be very low. The probability of IDi will be high for *T=i* and S=big_heal or *S=big_damage* (depending on where i is an ally or not). For the task of computing the distribution on Skill we use:

use:  $$P(S\wedge T\wedge HP_{\mathbb{L}_{\text{in}}}\wedge D_{\mathbb{L}_{\text{in}}}\wedge A_{\mathbb{L}_{\text{in}}}\wedge\Delta HP_{\mathbb{L}_{\text{in}}}\wedge ID_{\mathbb{L}_{\text{in}}}\wedge C_{\mathbb{L}_{\text{in}}}\wedge R_{\mathbb{L}_{\text{in}}})=$$ $$P(S)P(T)\prod_{i=1}^{n}\{P(HP_{i}\,|\,A_{i}\wedge C_{i}\wedge S\wedge T)P(D_{i}\,|\,A_{i}\wedge S\wedge T)P(A_{i}\,|\,S\wedge T).$$ $$P(\Delta HP_{i}\,|\,A_{i}\wedge S\wedge T)P(R_{i}\,|\,C_{i}\wedge S\wedge T)P(ID_{i}\,|\,S\wedge T)P(C_{i}\,|\,A_{i}\wedge S\wedge T)\}$$
$$\quad(2)$$