summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-06 11:30:45 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-06 11:30:45 +0100
commit2699d094d6afe132fd1398f0de35201d918d6d7f (patch)
tree4018b405d8a8f3caa82b528d8a4d10e6d4252721
parentd12289e2f99d8cf1b858bf6f4be715f998913102 (diff)
downloadwbs-2699d094d6afe132fd1398f0de35201d918d6d7f.tar.gz
wbs-2699d094d6afe132fd1398f0de35201d918d6d7f.tar.bz2
wbs-2699d094d6afe132fd1398f0de35201d918d6d7f.zip
tit4tat.pl: Rename step to pay2
-rw-r--r--tit4tat.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/tit4tat.pl b/tit4tat.pl
index 7b9ecb8..b997a00 100644
--- a/tit4tat.pl
+++ b/tit4tat.pl
@@ -22,9 +22,9 @@ pay(d,d,2).
pay(c,c,3).
pay(d,c,4).
-step(A, B, PAY_A, PAY_B) :-
- pay(A, B, PAY_A),
- pay(B, A, PAY_B).
+pay2(A, B, PayA, PayB) :-
+ pay(A, B, PayA),
+ pay(B, A, PayB).
% Use opponents last decision
tit4tat_select(H,[H|_]).
@@ -33,7 +33,7 @@ tit4tat_select(c,[]).
tit4tat(A, Hist, PayA, PayB) :-
tit4tat_select(Old, Hist),
- step(A, Old, PayA, PayB).
+ pay2(A, Old, PayA, PayB).
sum([], 0).
sum([H|T], S):-sum(T, TMP), S is TMP + H.