File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -33,21 +33,19 @@ class LookerUp(Player):
33
33
34
34
where m and n are both zero. Tit-For-Tat is given by:
35
35
36
- {('', 'C', 'D'): D,
37
- ('', 'D', 'D'): D,
38
- ('', 'C', 'C'): C,
39
- ('', 'D', 'C'): C,
40
- }
36
+ {('', 'C', 'D'): D,
37
+ ('', 'D', 'D'): D,
38
+ ('', 'C', 'C'): C,
39
+ ('', 'D', 'C'): C}
41
40
42
41
where m=1 and n=0.
43
42
44
43
Lookup tables where the action depends on the opponent's first actions (as
45
44
opposed to most recent actions) will have a non-empty first string in the
46
45
tuple. For example, this fragment of a dict:
47
46
48
- {('C', 'C', 'C'): C,
49
- ('D', 'C', 'C'): D,
50
- }
47
+ {('C', 'C', 'C'): C,
48
+ ('D', 'C', 'C'): D}
51
49
52
50
states that if self and opponent both cooperated on the previous turn, we
53
51
should cooperate this turn unless the opponent started by defecting, in
@@ -57,9 +55,9 @@ class LookerUp(Player):
57
55
(so m or n are greater than 1), simply concatenate the strings together.
58
56
Below is an incomplete example where m=3 and n=2.
59
57
60
- {('CC', 'CDD', 'CCC'): C,
61
- ('CD', 'CCD', 'CCC'): D,
62
- }
58
+ {('CC', 'CDD', 'CCC'): C,
59
+ ('CD', 'CCD', 'CCC'): D}
60
+
63
61
"""
64
62
65
63
name = 'LookerUp'
You can’t perform that action at this time.
0 commit comments