summaryrefslogtreecommitdiff
path: root/rules/naive_prober.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/naive_prober.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/naive_prober.pl')
-rw-r--r--rules/naive_prober.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules/naive_prober.pl b/rules/naive_prober.pl
index df2bcf5..72debd3 100644
--- a/rules/naive_prober.pl
+++ b/rules/naive_prober.pl
@@ -2,6 +2,8 @@
% Like Tit for Tat, but sometimes, after the opponent has cooperated, it
% defects (e.g. at random, in one of ten rounds in average).
+% Syntax: naive_prober(+history, -choice, +state_in, -state_out)
+
naive_prober([d|_],d,_,_).
% but only for for 90% if coorporated
naive_prober([c|_],Choice,_,_):-random(Number), (Number < 0.1 -> Choice=d; Choice=c).