summaryrefslogtreecommitdiff
path: root/rules/random_choice.pl
blob: 8075afb626d1425b077a851cd60dc4737f059417 (plain)
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).