summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grudger.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/grudger.pl b/grudger.pl
new file mode 100644
index 0000000..a2792a9
--- /dev/null
+++ b/grudger.pl
@@ -0,0 +1,7 @@
+% Cooperates until the second has defected, after
+% that move defects forever (he does not forgive).
+% http://euler.fd.cvut.cz/predmety/game_theory/lecture_repeat.pdf
+
+grudger([], c) :- !.
+grudger([c|Tail], c) :- grudger(Tail, c),!.
+grudger(_, d).