File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,10 @@ def strategy(opponent: Player) -> Action:
96
96
class DynamicTwoTitsForTat (Player ):
97
97
"""
98
98
A player starts by cooperating and then punishes its opponent's
99
- defectiions by opponent with a dynamic bias based off of the
100
- opponents ratio of cooperations to total moves (so their current
101
- probability of cooperating towards cooporating regardless of the
102
- move (aka: forgiveness)).
99
+ defections with defections, but with a dynamic bias towards cooperating
100
+ based off of the opponent's ratio of cooperations to total moves
101
+ (so their current probability of cooperating regardless of the
102
+ opponent's move (aka: forgiveness)).
103
103
104
104
Names:
105
105
@@ -120,7 +120,7 @@ class DynamicTwoTitsForTat(Player):
120
120
@staticmethod
121
121
def strategy (opponent ):
122
122
# First move
123
- if len ( opponent .history ) == 0 :
123
+ if not opponent .history :
124
124
# Make sure we cooporate first turn
125
125
return C
126
126
if D in opponent .history [- 2 :]:
You can’t perform that action at this time.
0 commit comments