Bayesian network
An example of MPE inference, i.e., finding the most likely world where
the evidence holds. Note that ProbLog will only report the state of
atoms the evidence logically depends on (those in the relevant ground program).
person(john).
person(mary).
person(bob).
0.7::burglary.
0.2::earthquake.
0.9::alarm :- burglary, earthquake.
0.8::alarm :- burglary, \+earthquake.
0.1::alarm :- \+burglary, earthquake.
0.8::calls(X) :- alarm, person(X).
0.1::calls(X) :- \+alarm, person(X).
evidence(calls(john),false).
evidence(calls(mary),true).