improve examples.

This commit is contained in:
Vítor Santos Costa 2012-03-22 19:09:31 +00:00
parent 172f59cee5
commit 7d4f83ca40
3 changed files with 25 additions and 3 deletions

View File

@ -10,6 +10,7 @@ t(dave).
bayes p(X)::[t,f] ; [0.1, 0.3] ; [t(X)]. bayes p(X)::[t,f] ; [0.1, 0.3] ; [t(X)].
?- p(ann,X), p(ann,f). % use standard Prolog queries: provide evidence first.
?- p(ann,f), p(ann,X).

View File

@ -9,10 +9,8 @@ t(dave).
bayes p(X)::[t,f] ; [0.1, 0.3] ; [t(X)]. bayes p(X)::[t,f] ; [0.1, 0.3] ; [t(X)].
p(ann,t). p(ann,t).
?- p(dave,X). ?- p(dave,X).

View File

@ -0,0 +1,23 @@
:- use_module(library(pfl)).
:- set_clpbn_flag(solver,fove).
t(ann).
t(dave).
t(lucy).
t(john).
t(kristian).
t(sriraam).
markov p(X)::[t,f] ; [0.1, 0.3] ; [t(X)].
markov q(X)::[t,f], r(X)::[t,f] ; [0.9, 0.5, 0.5, 0.1] ; [t(X)].
markov q(X)::[t,f], p(X)::[t,f] ; [0.9, 0.5, 0.5, 0.1] ; [t(X)].
p(ann,t).
?- p(dave,X).