1 2 3 4 5
% Syntax: random_choice(+history, -choice, +state_in, -state_out) random_choice(_, Choice, _, _) :- random(Number), (Number < 0.5 -> Choice=c ; Choice=d).