diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-11-07 12:44:05 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-11-07 12:44:05 +0100 |
commit | 1c97abe546122de35286a14e535723212976fa3b (patch) | |
tree | a63b5057de0e75a32e7f9ac8b41ab32f979a19dd | |
parent | 6dccb06aaac40c1c8003e6023063d19c028385e9 (diff) | |
download | wbs-1c97abe546122de35286a14e535723212976fa3b.tar.gz wbs-1c97abe546122de35286a14e535723212976fa3b.tar.bz2 wbs-1c97abe546122de35286a14e535723212976fa3b.zip |
Prisoners Dilemma: Fix pavlov algorithm
-rw-r--r-- | pavlov.pl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +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([], c, _, c):-!. pavlov([Choice|_], c, Choice, c):-!. -pavlov([_], d, _, d). +pavlov(_, d, _, d). |