From fa41b7300e3d16ca22527a802feba3bdaddd149e Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 6 Nov 2012 17:10:14 +0100 Subject: Prisoners Dilemma: Add mistrust_tit4tat algorithm --- mistrust_tit4tat.pl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 mistrust_tit4tat.pl 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). -- cgit