Prolog { contactSym(X,Y) :- contact(X,Y). contactSym(X,Y) :- contact(Y,X). distinct(X,Y) :- (\+(X=Y)). } //************ Predicate Declarations ******************* Discrete Bayesian Predicate cold/1 { domain = (true, false) combining rule = noisyor } Discrete Bayesian Predicate susceptible/1 { domain = (true, false) combining rule = noisyor } Logical Predicate contact/2 { } Logical Predicate contactSym/2 { } Logical Predicate distinct/2 { } //************ Knowledge-Base Rules ******************* Potential (cold(X)) { { 0.05 0.95 } } Potential (cold(X)|susceptible(X)) { { 0.1 0.9 // susceptible(X) = true 0.6 0.4 // susceptible(X) = false } } Potential (cold(X)|contactSym(X,Y),distinct(X,Y),cold(Y)) { { 0.6 0.4 // distinct(X,Y)=true,contactSym(X,Y)=true, cold(Y)=true 0.5 0.5 // distinct(X,Y)=true,contactSym(X,Y)=true, cold(Y)=false } }