From 6dccb06aaac40c1c8003e6023063d19c028385e9 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 7 Nov 2012 11:09:23 +0100 Subject: Prisoners Dilemma: Add not-yet-working pavlov --- pavlov.pl | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 pavlov.pl diff --git a/pavlov.pl b/pavlov.pl new file mode 100644 index 0000000..4ca359f --- /dev/null +++ b/pavlov.pl @@ -0,0 +1,5 @@ +% Cooperates if and only if both players opted for the +% same choice in the previous move, otherwise it defects. +pavlov([], c, _, c). +pavlov([Choice|_], c, Choice, c):-!. +pavlov([_], d, _, d). -- cgit