@@ -11,14 +11,14 @@ Here is the :code:`classifier` for the :code:`Cooperator` strategy::
11
11
12
12
>>> import axelrod as axl
13
13
>>> expected_dictionary = {
14
- >>> 'manipulates_state': False,
15
- >>> 'makes_use_of': set([]),
16
- >>> 'long_run_time': False,
17
- >>> 'stochastic': False,
18
- >>> 'manipulates_source': False,
19
- >>> 'inspects_source': False,
20
- >>> 'memory_depth': 0
21
- >>> } # Order of this dictionary might be different on your machine
14
+ ... 'manipulates_state': False,
15
+ ... 'makes_use_of': set([]),
16
+ ... 'long_run_time': False,
17
+ ... 'stochastic': False,
18
+ ... 'manipulates_source': False,
19
+ ... 'inspects_source': False,
20
+ ... 'memory_depth': 0
21
+ ... } # Order of this dictionary might be different on your machine
22
22
>>> axl.Cooperator.classifier == expected_dictionary
23
23
True
24
24
@@ -34,9 +34,9 @@ filters which we define in a 'filterset' dictionary and then pass to the
34
34
strategies::
35
35
36
36
>>> filterset = {
37
- >>> 'stochastic': True
38
- >>> }
39
- >>> strategies = filtered_strategies(filterset)
37
+ ... 'stochastic': True
38
+ ... }
39
+ >>> strategies = axl. filtered_strategies(filterset)
40
40
>>> len(strategies)
41
41
43
42
42
@@ -45,9 +45,9 @@ Or, to find out how many strategy only use 1 turn worth of memory to
45
45
make a decision::
46
46
47
47
>>> filterset = {
48
- >>> 'memory_depth': 1
49
- >>> }
50
- >>> strategies = filtered_strategies(filterset)
48
+ ... 'memory_depth': 1
49
+ ... }
50
+ >>> strategies = axl. filtered_strategies(filterset)
51
51
>>> len(strategies)
52
52
24
53
53
@@ -56,10 +56,10 @@ range of memory_depth values, we can use the 'min_memory_depth' and
56
56
'max_memory_depth' filters::
57
57
58
58
>>> filterset = {
59
- >>> 'min_memory_depth': 1,
60
- >>> 'max_memory_depth': 4
61
- >>> }
62
- >>> strategies = filtered_strategies(filterset)
59
+ ... 'min_memory_depth': 1,
60
+ ... 'max_memory_depth': 4
61
+ ... }
62
+ >>> strategies = axl. filtered_strategies(filterset)
63
63
>>> len(strategies)
64
64
24
65
65
@@ -68,9 +68,9 @@ tournament. For example, here is the number of strategies that make use of the
68
68
length of each match of the tournament::
69
69
70
70
>>> filterset = {
71
- >>> 'makes_use_of': ['length']
72
- >>> }
73
- >>> strategies = filtered_strategies(filterset)
71
+ ... 'makes_use_of': ['length']
72
+ ... }
73
+ >>> strategies = axl. filtered_strategies(filterset)
74
74
>>> len(strategies)
75
75
10
76
76
@@ -79,18 +79,17 @@ must be a list. Here is how we might identify the number of strategies that use
79
79
both the length of the tournament and the game being played::
80
80
81
81
>>> filterset = {
82
- >>> 'makes_use_of': ['length', 'game']
83
- >>> }
84
- >>> strategies = filtered_strategies(filterset)
82
+ ... 'makes_use_of': ['length', 'game']
83
+ ... }
84
+ >>> strategies = axl. filtered_strategies(filterset)
85
85
>>> len(strategies)
86
86
10
87
87
88
88
Some strategies have been classified as having a particularly long run time::
89
89
90
90
>>> filterset = {
91
- >>> 'long_run_time': True
92
- >>> }
93
- >>> strategies = filtered_strategies(filterset)
91
+ ... 'long_run_time': True
92
+ >>> strategies = axl.filtered_strategies(filterset)
94
93
>>> len(strategies)
95
94
10
96
95
0 commit comments