39 lines
769 B
Plaintext
39 lines
769 B
Plaintext
:- use_module(library(pfl)).
|
|
|
|
:- set_solver(hve).
|
|
%:- set_solver(ve).
|
|
%:- set_solver(jt).
|
|
%:- set_solver(bdd).
|
|
%:- set_solver(bp).
|
|
%:- set_solver(cbp).
|
|
%:- set_solver(gibbs).
|
|
%:- set_solver(lve).
|
|
%:- set_solver(lkc).
|
|
%:- set_solver(lbp).
|
|
|
|
:- multifile people/1.
|
|
|
|
people @ 5.
|
|
|
|
people(X,Y) :-
|
|
people(X),
|
|
people(Y).
|
|
% X \== Y.
|
|
|
|
markov smokes(X) ; [1.0, 4.0552]; [people(X)].
|
|
|
|
markov asthma(X) ; [1.0, 9.9742] ; [people(X)].
|
|
|
|
markov friends(X,Y) ; [1.0, 99.48432] ; [people(X,Y)].
|
|
|
|
markov asthma(X), smokes(X) ;
|
|
[4.48169, 4.48169, 1.0, 4.48169] ;
|
|
[people(X)].
|
|
|
|
markov asthma(X), friends(X,Y), smokes(Y) ;
|
|
[3.004166, 3.004166, 3.004166, 3.004166, 3.004166, 1.0, 1.0, 3.004166] ;
|
|
[people(X,Y)].
|
|
|
|
% ?- smokes(p1,t), smokes(p2,t), friends(p1,p2,X).
|
|
|