diff options
author | Jan Klemkow <j.klemkow@wemelug.de> | 2012-11-10 16:24:13 +0100 |
---|---|---|
committer | Jan Klemkow <j.klemkow@wemelug.de> | 2012-11-10 16:24:13 +0100 |
commit | 22b189d3f9b07e0bd9d3fc2c852b16560980d8f6 (patch) | |
tree | 7bfa6f7ea733d9046623762740f2ddea5d8835c5 /doc | |
parent | 1cc3cc85fdb8a187593584aac2db365cf0ec29f9 (diff) | |
download | wbs-22b189d3f9b07e0bd9d3fc2c852b16560980d8f6.tar.gz wbs-22b189d3f9b07e0bd9d3fc2c852b16560980d8f6.tar.bz2 wbs-22b189d3f9b07e0bd9d3fc2c852b16560980d8f6.zip |
Add prolog code for tit3tat rules.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/presentation.asciidoc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/presentation.asciidoc b/doc/presentation.asciidoc index ebd2091..dc9ad65 100644 --- a/doc/presentation.asciidoc +++ b/doc/presentation.asciidoc @@ -10,6 +10,23 @@ Gefangenendilemma in Prolog == Spielregeln image::image/game_rules.svg[game rules] +== Computerspielerregeln + +[source,prolog] +---- +% Tit for Tat: +% Begins with cooperation and then plays what its opponent played in the last +% move (if the opponent defects in some round, Tit for Tat will defect in the +% following one; to cooperation it responds with cooperation). + +% Syntax: MODULE(UserDecisionHistry [in], ModuleDecision [out]) + +% Use opponents last decision +tit4tat([Last|_],Last,_,_). +% Fallback to coorporate if history is empty. +tit4tat([],c,_,_). +---- + == Netzwerkprotokoll * TCP Port 8068 * Uebertragung von einem Byte! |