%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  NAME :
%      dice.pl
%
% VERSION :
%     0
%
% AUTHOR : Matthieu Petit, Arnaud Gotlieb and Arnaud Jobin
%
% FUNCTION :
%      Implementation of a dice play with an unknown biase
%      
% REMARKS : any problem, contact petit@(without advertissement)irisa.fr
%
% NOTE TO THE USER :  need ctr_proba_v0.pl to work
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%-----------------
% Dice
%-----------------



dice(X) :-
        init_env(Env),
        P1 in 1..2,
        P2 #= 2,
        P3 #= 2,
        P4 #= 2,
        P5 #= 2,
        P6 in 2..4,
        choose(X,[1,2,3,4,5,6]-[P1,P2,P3,P4,P5,P6],[],[inconsistency_check],Env).
        

% ptc([dice(X)],[X],R).
% R = [[[[[1|1]]],0.07735],[[[[[1|2]]],0.09065],[[[[2|2]]],0.06285],[[[2|3]]],0.10175],[[[[3|3]]],0.05135],[[[[3|4]]],0.11795],[[[[4|4]]],0.0386],[[[[4|5]]],0.12775],[[[[5|5]]],0.02575],[[[[5|6]]],0.1401],,[[[[6|6]]],0.1659]]
% Resolution de la contrainte avec une probabilité d'environ 0.42


