Skip to content

Commit

Permalink
correct prob of action c
Browse files Browse the repository at this point in the history
  • Loading branch information
friguzzi committed Jun 19, 2016
1 parent 9b51f21 commit 1ed80cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions examples/inference/truel.pl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@
% P = 0.267
?- mc_sample(survives_action(a,[a,b,c],0,c),1000,P).
% What is the probability that a survives if it aims at c?
% P = 0.312
% P = 59/189=0.31216931216
?- mc_sample(survives_action(a,[a,b,c],0,sky),1000,P).
% What is the probability that a survives if it aims at the sky?
% P = 0.39682539682
% P =25/63= 0.39682539682
?- mc_sample(survives([a,c],a,0),1000,P).
% P =1/3
?- mc_sample(survives([a,b],a,0),1000,P).
% P=3/7=0.42857142857
?- mc_sample(survives_round([b],[a,b],a,0),1000,P).
%P=1/7=0.14285714285
*/
:- use_module(library(mcintyre)).

Expand Down

0 comments on commit 1ed80cf

Please sign in to comment.