File tree Expand file tree Collapse file tree 2 files changed +9
-106
lines changed Expand file tree Collapse file tree 2 files changed +9
-106
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,15 @@ python lookup_evolve.py -p 2 -s 3 -g 100000 -k 20 -u 0.03 -b 20 -i 4 -o evolve2
50
50
### 2, 2 is the current winner:
51
51
```
52
52
python lookup_evolve.py -p 2 -s 2 -g 100000 -k 20 -u 0.06 -b 20 -i 4 -o evolve2-2.csv
53
+
54
+ python lookup_evolve.py -p 1 -s 2 -g 100000 -k 20 -u 0.1 -b 20 -i 2 -o evolve1-2.csv
55
+
56
+ python lookup_evolve.py -p 1 -s 2 -g 100000 -k 20 -u 0.1 -b 20 -i 2 -o evolve2-1.csv
57
+
53
58
```
54
- ### 4, 4
59
+ ### 4, 4 (might take for ever / need a ton of ram)
55
60
```
56
- python lookup_evolve.py -p 4 -s 4 -g 100000 -k 20 -u 0.01 -b 20 -i 4 -o evolve4-4.csv
61
+ python lookup_evolve.py -p 4 -s 4 -g 100000 -k 20 -u 0.002 -b 20 -i 4 -o evolve4-4.csv
57
62
```
58
63
## Analyzing
59
64
Original file line number Diff line number Diff line change 1
1
from __future__ import division
2
2
import axelrod
3
3
4
-
5
4
axl = axelrod
6
5
7
- def get_strategies ():
8
- strategies = [
9
- axl .Aggravater ,
10
- axl .ALLCorALLD ,
11
- axl .Alternator ,
12
- axl .AlternatorHunter ,
13
- axl .AntiCycler ,
14
- axl .AntiTitForTat ,
15
- axl .APavlov2006 ,
16
- axl .APavlov2011 ,
17
- axl .Appeaser ,
18
- axl .AverageCopier ,
19
- axl .BackStabber ,
20
- axl .Bully ,
21
- axl .Calculator ,
22
- axl .Champion ,
23
- axl .Cooperator ,
24
- axl .CyclerCCCCCD ,
25
- axl .CyclerCCCD ,
26
- axl .CyclerCCD ,
27
- axl .Davis ,
28
- axl .Defector ,
29
- axl .DoubleCrosser ,
30
- axl .Eatherley ,
31
- axl .Feld ,
32
- axl .FirmButFair ,
33
- axl .FoolMeForever ,
34
- axl .FoolMeOnce ,
35
- axl .ForgetfulFoolMeOnce ,
36
- axl .ForgetfulGrudger ,
37
- axl .Forgiver ,
38
- axl .ForgivingTitForTat ,
39
- axl .PSOGambler ,
40
- axl .GTFT ,
41
- axl .GoByMajority ,
42
- axl .GoByMajority10 ,
43
- axl .GoByMajority20 ,
44
- axl .GoByMajority40 ,
45
- axl .GoByMajority5 ,
46
- axl .HardGoByMajority ,
47
- axl .HardGoByMajority10 ,
48
- axl .HardGoByMajority20 ,
49
- axl .HardGoByMajority40 ,
50
- axl .HardGoByMajority5 ,
51
- axl .Golden ,
52
- axl .Grofman ,
53
- axl .Grudger ,
54
- axl .Grumpy ,
55
- axl .HardProber ,
56
- axl .HardTitFor2Tats ,
57
- axl .HardTitForTat ,
58
- axl .Inverse ,
59
- axl .InversePunisher ,
60
- axl .Joss ,
61
- axl .LimitedRetaliate ,
62
- axl .LimitedRetaliate2 ,
63
- axl .LimitedRetaliate3 ,
64
- axl .EvolvedLookerUp ,
65
- axl .MathConstantHunter ,
66
- axl .NiceAverageCopier ,
67
- axl .Nydegger ,
68
- axl .OmegaTFT ,
69
- axl .OnceBitten ,
70
- axl .OppositeGrudger ,
71
- axl .Pi ,
72
- axl .Prober ,
73
- axl .Prober2 ,
74
- axl .Prober3 ,
75
- axl .Punisher ,
76
- axl .Random ,
77
- axl .RandomHunter ,
78
- axl .Retaliate ,
79
- axl .Retaliate2 ,
80
- axl .Retaliate3 ,
81
- axl .Shubik ,
82
- axl .SneakyTitForTat ,
83
- axl .SoftJoss ,
84
- axl .StochasticWSLS ,
85
- axl .SuspiciousTitForTat ,
86
- axl .Tester ,
87
- axl .ThueMorse ,
88
- axl .TitForTat ,
89
- axl .TitFor2Tats ,
90
- axl .TrickyCooperator ,
91
- axl .TrickyDefector ,
92
- axl .Tullock ,
93
- axl .TwoTitsForTat ,
94
- axl .WinStayLoseShift ,
95
- axl .ZDExtort2 ,
96
- axl .ZDExtort2v2 ,
97
- axl .ZDExtort4 ,
98
- axl .ZDGen2 ,
99
- axl .ZDGTFT2 ,
100
- axl .ZDSet2 ,
101
- axl .e ,
102
- ]
103
-
104
- strategies = [s for s in strategies if axl .obey_axelrod (s ())]
105
- return strategies
106
-
107
-
108
6
def mean (data ):
109
7
"""Return the sample arithmetic mean of data."""
110
8
n = len (data )
@@ -148,8 +46,8 @@ def score_for(my_strategy_factory, iterations=200):
148
46
run 100 repetitions and take the average to get a good estimate.
149
47
"""
150
48
scores_for_all_opponents = []
151
- for opponent in get_strategies () :
152
- if opponent .classifier ['stochastic' ]:
49
+ for opponent in axl . ordinary_strategies :
50
+ if opponent () .classifier ['stochastic' ]:
153
51
repetitions = 100
154
52
else :
155
53
repetitions = 1
You can’t perform that action at this time.
0 commit comments