Skip to content

Commit a94a7f5

Browse files
authored
Merge pull request #4 from drvinceknight/marcharper-style
Fix the sphinx build error.
2 parents a195a4d + a45b306 commit a94a7f5

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

axelrod/match.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from axelrod import Actions, Game
23
from .deterministic_cache import DeterministicCache
34

axelrod/strategies/lookerup.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,46 +20,44 @@ class LookerUp(Player):
2020
* my last action was a C the opponents
2121
* last action was a D
2222
23-
then the corresponding key would be
23+
then the corresponding key would be::
2424
2525
('C', 'C', 'D')
2626
2727
and the value would contain the action to play on this turn.
2828
2929
Some well-known strategies can be expressed as special cases; for example
30-
Cooperator is given by the dict:
30+
Cooperator is given by the dict::
3131
3232
{('', '', '') : C}
3333
34-
where m and n are both zero. Tit-For-Tat is given by:
34+
where m and n are both zero. Tit-For-Tat is given by::
3535
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}
4140
4241
where m=1 and n=0.
4342
4443
Lookup tables where the action depends on the opponent's first actions (as
4544
opposed to most recent actions) will have a non-empty first string in the
46-
tuple. For example, this fragment of a dict:
45+
tuple. For example, this fragment of a dict::
4746
48-
{('C', 'C', 'C'): C,
49-
('D', 'C', 'C'): D,
50-
}
47+
{('C', 'C', 'C'): C,
48+
('D', 'C', 'C'): D}
5149
5250
states that if self and opponent both cooperated on the previous turn, we
5351
should cooperate this turn unless the opponent started by defecting, in
5452
which case we should defect.
5553
5654
To denote lookup tables where the action depends on sequences of actions
5755
(so m or n are greater than 1), simply concatenate the strings together.
58-
Below is an incomplete example where m=3 and n=2.
56+
Below is an incomplete example where m=3 and n=2::
57+
58+
{('CC', 'CDD', 'CCC'): C,
59+
('CD', 'CCD', 'CCC'): D}
5960
60-
{('CC', 'CDD', 'CCC'): C,
61-
('CD', 'CCD', 'CCC'): D,
62-
}
6361
"""
6462

6563
name = 'LookerUp'

0 commit comments

Comments
 (0)