summaryrefslogtreecommitdiff
path: root/rules/hard_tit4tat.pl
blob: 8efc1243e8c5aa892c49f152e6dcf7165a184758 (plain)
1
2
3
4
5
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,_,_).