@@ -81,7 +81,7 @@ class TestTitFor2Tats(TestPlayer):
81
81
def test_strategy (self ):
82
82
# Will punish sequence of 2 defections but will forgive
83
83
opponent = axelrod .MockPlayer (actions = [D , D , D , C , C ])
84
- actions = [(C , D ), (C , D ), (D , D ), (D , C ), (C , C )]
84
+ actions = [(C , D ), (C , D ), (D , D ), (D , C ), (C , C ), ( C , D ) ]
85
85
self .versus_test (opponent , expected_actions = actions )
86
86
87
87
@@ -104,6 +104,14 @@ def test_strategy(self):
104
104
actions = [(C , D ), (D , C ), (D , C ), (C , D ), (D , C )]
105
105
self .versus_test (opponent , expected_actions = actions )
106
106
107
+ actions = [(C , C ), (C , C )]
108
+ self .versus_test (opponent = axelrod .Cooperator (),
109
+ expected_actions = actions )
110
+
111
+ actions = [(C , D ), (D , D ), (D , D )]
112
+ self .versus_test (opponent = axelrod .Defector (),
113
+ expected_actions = actions )
114
+
107
115
108
116
class TestDynamicTwoTitsForTat (TestPlayer ):
109
117
@@ -201,6 +209,13 @@ def test_strategy(self):
201
209
actions = [(D , C ), (C , D )] * 8
202
210
self .versus_test (axelrod .TitForTat (), expected_actions = actions )
203
211
212
+ actions = [(D , C ), (C , C ), (C , C )]
213
+ self .versus_test (axelrod .Cooperator (),
214
+ expected_actions = actions )
215
+
216
+ actions = [(D , D ), (D , D ), (D , D )]
217
+ self .versus_test (axelrod .Defector (), expected_actions = actions )
218
+
204
219
205
220
class TestAntiTitForTat (TestPlayer ):
206
221
@@ -238,6 +253,13 @@ def test_strategy(self):
238
253
actions = [(C , D ), (D , C ), (D , C ), (D , C ), (C , D ), (D , C )]
239
254
self .versus_test (opponent , expected_actions = actions )
240
255
256
+ actions = [(C , C ), (C , C ), (C , C )]
257
+ self .versus_test (axelrod .Cooperator (),
258
+ expected_actions = actions )
259
+
260
+ actions = [(C , D ), (D , D ), (D , D )]
261
+ self .versus_test (axelrod .Defector (), expected_actions = actions )
262
+
241
263
242
264
class TestHardTitFor2Tats (TestPlayer ):
243
265
@@ -513,7 +535,7 @@ def test_strategy(self):
513
535
attrs = {"retaliating" : False })
514
536
515
537
opponent = axelrod .MockPlayer (actions = [C , C , C , C , D , C ])
516
- actions = [(C , C )] * 4 + [(C , D ), (D , C )]
538
+ actions = [(C , C )] * 4 + [(C , D ), (D , C ), ( C , C ) ]
517
539
self .versus_test (opponent , expected_actions = actions ,
518
540
attrs = {"retaliating" : False })
519
541
0 commit comments