Skip to content

Commit dd91f0a

Browse files
committed
Subtracted first defect.
1 parent da80753 commit dd91f0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

axelrod/strategies/axelrod_second.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,8 @@ def strategy(self, opponent: Player) -> Action:
802802
if len(self.history) <= 1:
803803
return C
804804
number_defects = opponent.defections
805+
if opponent.history[0] == D:
806+
number_defects -= 1
805807

806808
if number_defects in [4, 7, 9]: return D
807809
if number_defects > 9 and opponent.history[-1] == D:

0 commit comments

Comments
 (0)