From c70429d4abe325ff71c85b89fc6308117d0487fc Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 7 Nov 2012 12:48:17 +0100 Subject: tit42tat: Fix incorrect second solution if thre are two defacts in history --- tit42tat.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tit42tat.pl b/tit42tat.pl index 72a6e6a..281bc4d 100644 --- a/tit42tat.pl +++ b/tit42tat.pl @@ -1,5 +1,5 @@ % Select distraction only if opponents both last decision were to distract. % See: http://en.wikipedia.org/wiki/Tit_for_tat#Tit_for_two_tats -tit42tat([d,d|_],d,_,_). +tit42tat([d,d|_],d,_,_):-!. tit42tat(_,c,_,_). -- cgit