summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mistrust_tit4tat.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/mistrust_tit4tat.pl b/mistrust_tit4tat.pl
new file mode 100644
index 0000000..ebea1cb
--- /dev/null
+++ b/mistrust_tit4tat.pl
@@ -0,0 +1,6 @@
+% Syntax: MODULE(UserDecisionHistry [in], ModuleDecision [out])
+
+% Use opponents last decision
+mistrust_tit4tat([Last|_],Last).
+% Fallback to defect if history is empty.
+mistrust_tit4tat([],d).