@@ -43,7 +43,7 @@ class FirstByDavis(Player):
43
43
- Davis: [Axelrod1980]_
44
44
"""
45
45
46
- name = "First tournament by Davis"
46
+ name = "First by Davis"
47
47
classifier = {
48
48
"memory_depth" : float ("inf" ), # Long memory
49
49
"stochastic" : False ,
@@ -69,7 +69,7 @@ def strategy(self, opponent: Player) -> Action:
69
69
opponent ever plays D."""
70
70
if len (self .history ) < self ._rounds_to_cooperate :
71
71
return C
72
- if opponent .defections > 0 :
72
+ if opponent .defections > 0 : # Implement Grudger
73
73
return D
74
74
return C
75
75
@@ -97,7 +97,7 @@ class FirstByDowning(Player):
97
97
> "[...] In these strategies, O's [the opponent's] response on trial N is in
98
98
some way dependent or contingent on S's [the subject's] response on trial N-
99
99
1. All varieties of these lag-one matching strategies can be defined by two
100
- parameters: the conditional probability that O will choose C folloging C by
100
+ parameters: the conditional probability that O will choose C following C by
101
101
S, P(C_o | C_s) and the conditional probability that O will choose C
102
102
following D by S, P(C_o, D_s)."
103
103
@@ -120,7 +120,7 @@ class FirstByDowning(Player):
120
120
To understand the particular mechanism that describes the strategy S, we
121
121
refer to Appendix A of the paper on page 389.
122
122
123
- The state goal of the strategy is to maximize (using the notation of the
123
+ The stated goal of the strategy is to maximize (using the notation of the
124
124
paper):
125
125
126
126
EV_TOT = #CC(EV_CC) + #CD(EV_CD) + #DC(EV_DC) + #DD(EV_DD)
@@ -130,7 +130,7 @@ class FirstByDowning(Player):
130
130
131
131
On the second page of the appendix, figure 4 (page 390) supposedly
132
132
identifies an expression for EV_TOT however it is not clear how some of the
133
- steps are carried out. To the best guess, it seems like an asymptotic
133
+ steps are carried out. It seems like an asymptotic
134
134
argument is being used. Furthermore, a specific term is made to disappear in
135
135
the case of T - R = P - S (which is not the case for the standard
136
136
(R, P, S, T) = (3, 1, 0, 5)):
@@ -147,8 +147,8 @@ class FirstByDowning(Player):
147
147
148
148
1. On any given turn, the strategy will estimate alpha = P(C_o | C_s) and
149
149
beta = P(C_o | D_s).
150
- 2. The stragy will calculate the expected utility of always playing C OR
151
- always playing D against the estimage probabilities. This corresponds to:
150
+ 2. The strategy will calculate the expected utility of always playing C OR
151
+ always playing D against the estimated probabilities. This corresponds to:
152
152
153
153
a. In the case of the player always cooperating:
154
154
@@ -186,7 +186,8 @@ class FirstByDowning(Player):
186
186
However there is a presentation available at
187
187
http://www.sci.brooklyn.cuny.edu/~sklar/teaching/f05/alife/notes/azhar-ipd-Oct19th.pdf
188
188
That clearly states that Downing defected in the first two rounds, thus this
189
- is assumed to be the behaviour.
189
+ is assumed to be the behaviour. Interestingly, in future tournaments this
190
+ strategy was revised to not defect on the opening two rounds.
190
191
191
192
Note that response to the first round allows us to estimate
192
193
beta = P(C_o | D_s) and we will use the opening play of the player to
@@ -201,7 +202,7 @@ class FirstByDowning(Player):
201
202
- Revised Downing: [Axelrod1980]_
202
203
"""
203
204
204
- name = "First tournament by Downing"
205
+ name = "First by Downing"
205
206
206
207
classifier = {
207
208
"memory_depth" : float ("inf" ),
@@ -273,7 +274,7 @@ class FirstByFeld(Player):
273
274
- Feld: [Axelrod1980]_
274
275
"""
275
276
276
- name = "First tournament by Feld"
277
+ name = "First by Feld"
277
278
classifier = {
278
279
"memory_depth" : 200 , # Varies actually, eventually becomes depth 1
279
280
"stochastic" : True ,
@@ -326,7 +327,7 @@ def strategy(self, opponent: Player) -> Action:
326
327
327
328
class FirstByGraaskamp (Player ):
328
329
"""
329
- Submitted to Axelrod's first tournament by James Graaskamp..
330
+ Submitted to Axelrod's first tournament by James Graaskamp.
330
331
331
332
The description written in [Axelrod1980]_ is:
332
333
@@ -354,6 +355,9 @@ class FirstByGraaskamp(Player):
354
355
355
356
Note that there is no information about 'Analogy' available thus Step 5 is
356
357
a "best possible" interpretation of the description in the paper.
358
+ Furthermore the test for the clone is implemented as checking that both
359
+ players have played the same moves for the entire game, this is unlikely to
360
+ be the original approach but no further details are available.
357
361
358
362
This strategy came 9th in Axelrod’s original tournament.
359
363
@@ -362,7 +366,7 @@ class FirstByGraaskamp(Player):
362
366
- Graaskamp: [Axelrod1980]_
363
367
"""
364
368
365
- name = "First tournament by Graaskamp"
369
+ name = "First by Graaskamp"
366
370
classifier = {
367
371
"memory_depth" : float ("inf" ),
368
372
"stochastic" : True ,
@@ -438,7 +442,7 @@ class FirstByGrofman(Player):
438
442
- Grofman: [Axelrod1980]_
439
443
"""
440
444
441
- name = "First tournament by Grofman"
445
+ name = "First by Grofman"
442
446
classifier = {
443
447
"memory_depth" : 1 ,
444
448
"stochastic" : True ,
@@ -471,7 +475,7 @@ class FirstByJoss(MemoryOnePlayer):
471
475
- Hard Joss: [Stewart2012]_
472
476
"""
473
477
474
- name = "First tournament by Joss"
478
+ name = "First by Joss"
475
479
476
480
def __init__ (self , p : float = 0.9 ) -> None :
477
481
"""
@@ -539,7 +543,7 @@ class FirstByNydegger(Player):
539
543
- Nydegger: [Axelrod1980]_
540
544
"""
541
545
542
- name = "First tournament by Nydegger"
546
+ name = "First by Nydegger"
543
547
classifier = {
544
548
"memory_depth" : 3 ,
545
549
"stochastic" : False ,
@@ -604,7 +608,7 @@ class FirstByShubik(Player):
604
608
defection on the turn where it starts to cooperate once more. In Shubik
605
609
(1970) the strategy is described as:
606
610
607
- > "I will play my move 1 to begin with and will continue to do so, so long
611
+ > "I will play my move 1 to begin with and will continue to do so, so long
608
612
> as my information shows that the other player has chosen his move 1. If my
609
613
> information tells me he has used move 2, then I will use move 2 for the
610
614
> immediate k subsequent periods, after which I will resume using move 1. If
@@ -619,12 +623,14 @@ class FirstByShubik(Player):
619
623
defects for k rounds. After k rounds it starts cooperating again and
620
624
increments the value of k if the opponent defects again.
621
625
626
+ This strategy came 5th in Axelrod's original tournament.
627
+
622
628
Names:
623
629
624
630
- Shubik: [Axelrod1980]_
625
631
"""
626
632
627
- name = "First tournament by Shubik"
633
+ name = "First by Shubik"
628
634
classifier = {
629
635
"memory_depth" : float ("inf" ),
630
636
"stochastic" : False ,
@@ -695,9 +701,9 @@ class FirstByTullock(Player):
695
701
- Tullock: [Axelrod1980]_
696
702
"""
697
703
698
- name = "First tournament by Tullock"
704
+ name = "First by Tullock"
699
705
classifier = {
700
- "memory_depth" : 11 ,
706
+ "memory_depth" : float ( "inf" ) ,
701
707
"stochastic" : True ,
702
708
"makes_use_of" : set (),
703
709
"long_run_time" : False ,
@@ -706,16 +712,16 @@ class FirstByTullock(Player):
706
712
"manipulates_state" : False ,
707
713
}
708
714
709
- def __init__ (self , rounds_to_cooperate : int = 11 ) -> None :
715
+ def __init__ (self ) -> None :
710
716
"""
711
717
Parameters
712
718
----------
713
719
rounds_to_cooperate: int
714
720
The number of rounds to cooperate initially
715
721
"""
716
722
super ().__init__ ()
717
- self ._rounds_to_cooperate = rounds_to_cooperate
718
- self .memory_depth = rounds_to_cooperate
723
+ self ._rounds_to_cooperate = 11
724
+ self .memory_depth = self . _rounds_to_cooperate
719
725
720
726
def strategy (self , opponent : Player ) -> Action :
721
727
if len (self .history ) < self ._rounds_to_cooperate :
@@ -751,7 +757,7 @@ class FirstByAnonymous(Player):
751
757
- (Name withheld): [Axelrod1980]_
752
758
"""
753
759
754
- name = "First tournament by Anonymous"
760
+ name = "First by Anonymous"
755
761
classifier = {
756
762
"memory_depth" : 0 ,
757
763
"stochastic" : True ,
@@ -796,7 +802,7 @@ class FirstBySteinAndRapoport(Player):
796
802
- SteinAndRapoport: [Axelrod1980]_
797
803
"""
798
804
799
- name = "First tournament by Stein and Rapoport"
805
+ name = "First by Stein and Rapoport"
800
806
classifier = {
801
807
"memory_depth" : float ("inf" ),
802
808
"stochastic" : False ,
@@ -884,7 +890,7 @@ class FirstByTidemanAndChieruzzi(Player):
884
890
- TidemanAndChieruzzi: [Axelrod1980]_
885
891
"""
886
892
887
- name = "First tournament by Tideman and Chieruzzi"
893
+ name = "First by Tideman and Chieruzzi"
888
894
classifier = {
889
895
"memory_depth" : float ("inf" ),
890
896
"stochastic" : False ,
0 commit comments