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