summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-06 17:03:39 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-06 17:04:58 +0100
commit7042741c556899fa1bebfea57603b28c366343a4 (patch)
treee08296f167898a8dfe83c4d1c158520064b2bf0f
parent5834f551123a738c39199d6fefcbd177422d3ca6 (diff)
downloadwbs-7042741c556899fa1bebfea57603b28c366343a4.tar.gz
wbs-7042741c556899fa1bebfea57603b28c366343a4.tar.bz2
wbs-7042741c556899fa1bebfea57603b28c366343a4.zip
Prisoners Dilemma: Add tit for two tats algorithm
-rw-r--r--tit42tat.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tit42tat.pl b/tit42tat.pl
new file mode 100644
index 0000000..4ec519d
--- /dev/null
+++ b/tit42tat.pl
@@ -0,0 +1,5 @@
+% Select distraction only if opponents both last decision were to distract.
+% See: http://en.wikipedia.org/wiki/Tit_for_tat#Tit_for_two_tats
+
+tit42tat([d,d|_],d).
+tit42tat(_,c).