summaryrefslogtreecommitdiff
path: root/doc/presentation.asciidoc
blob: dc9ad656e6a3135d5f503404e5d7b78b25563c77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Gefangenendilemma in Prolog
===========================
:Author: Valentina Rehpenning, Benjamin Franzke, Jan Klemkow

== Gefangendilemma-Implementierung
 * Server in C
 * Client in Prolog
 * Regelwerk 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!
 * 'c' fuer *Cooperation*
 * 'd' fuer *Defection*

== Netzwerkprotokoll-Ablauf
image::image/network_protocol.svg[time]

// vim: set syntax=asciidoc: