diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-11-06 17:10:14 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-11-06 17:10:14 +0100 |
commit | fa41b7300e3d16ca22527a802feba3bdaddd149e (patch) | |
tree | 8178fb3b4f4b5f96e5384565c26d100dba9e2256 | |
parent | 5a3337ec17d6bb39b0d43793c454ab199e4d9b0e (diff) | |
download | wbs-fa41b7300e3d16ca22527a802feba3bdaddd149e.tar.gz wbs-fa41b7300e3d16ca22527a802feba3bdaddd149e.tar.bz2 wbs-fa41b7300e3d16ca22527a802feba3bdaddd149e.zip |
Prisoners Dilemma: Add mistrust_tit4tat algorithm
-rw-r--r-- | mistrust_tit4tat.pl | 6 |
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). |