summaryrefslogtreecommitdiff
path: root/grudger.pl
blob: b075a42f5f2a0fafceff81dbb4a36394021d4956 (plain)
1
2
3
4
5
6
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([d|_], d, _, _).
grudger([c|Tail], Decision, _, _) :- grudger(Tail, Decision, _, _).