From bb22c28250c4c20d7ba58736758a837cd8cc03d8 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 6 Nov 2012 19:01:42 +0100 Subject: Prisoners Dilemma: Add grudger algorithm --- grudger.pl | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 grudger.pl 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). -- cgit