summaryrefslogtreecommitdiff
path: root/hard_tit4tat.pl
diff options
context:
space:
mode:
Diffstat (limited to 'hard_tit4tat.pl')
-rw-r--r--hard_tit4tat.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/hard_tit4tat.pl b/hard_tit4tat.pl
index 5bff447..8efc124 100644
--- a/hard_tit4tat.pl
+++ b/hard_tit4tat.pl
@@ -1,2 +1,6 @@
+% Hard Tit for Tat:
+% Cooperates unless the opponent has defected
+% at least once in the last two rounds.
+
hard_tit4tat([A,B|_],d,_,_):-(A=d;B=d),!.
hard_tit4tat(_,c,_,_).