% sorts and general variables stones={1..10}. colors={black,white}. boolean={true,false}. #domain stones(X). % Setting the color of each stone color: stone -> colors. color(1)=black. color(X)=white :- X<>1. % Random variable draw = number of the picked stone draw:stones. [r] random(draw). [r2] random(selcolor). % Other attributes selcolor:colors. help:boolean. % Representing the tribal laws help=true :- draw=X, color(X)=C, selcolor=C. help=false :- draw=X, color(X)=C, selcolor<>C. [r] pr(draw=1|selcolor=white)=1/3. :- not selcolor=white ?{draw=2}|do(selcolor=white).