summaryrefslogtreecommitdiff
path: root/rules/random_choice.pl
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-12 10:37:23 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-12 10:37:23 +0100
commit565fbb75729138607c75c9ddcaca385402d67944 (patch)
tree78dc67b79c891dcd5c953cc929b489accb930c68 /rules/random_choice.pl
parent7e23cb0e2a2ad82cddf354ee0d3c2773b99b4d02 (diff)
downloadwbs-565fbb75729138607c75c9ddcaca385402d67944.tar.gz
wbs-565fbb75729138607c75c9ddcaca385402d67944.tar.bz2
wbs-565fbb75729138607c75c9ddcaca385402d67944.zip
Prisoners Dilemma: Add parameter description to modules
Diffstat (limited to 'rules/random_choice.pl')
-rw-r--r--rules/random_choice.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules/random_choice.pl b/rules/random_choice.pl
index 3bd4a91..8075afb 100644
--- a/rules/random_choice.pl
+++ b/rules/random_choice.pl
@@ -1,2 +1,5 @@
+
+% Syntax: random_choice(+history, -choice, +state_in, -state_out)
+
random_choice(_, Choice, _, _) :-
random(Number), (Number < 0.5 -> Choice=c ; Choice=d).