File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1661,7 +1661,7 @@ def strategy(self, opponent: Player) -> Action:
1661
1661
recent_history = opponent .history [- 5 :]
1662
1662
1663
1663
did_d = np .vectorize (lambda action : int (action == D ))
1664
- number_defects = np . sum (did_d (recent_history ))
1664
+ number_defects = sum (did_d (recent_history ))
1665
1665
1666
1666
return self ._random .random_choice (self .prob_coop [number_defects ])
1667
1667
@@ -1774,7 +1774,7 @@ def strategy(self, opponent: Player) -> Action:
1774
1774
return C
1775
1775
1776
1776
proportion_agree = self .num_agreements / turn
1777
- last_four_num = np . sum (self .last_four_agreements )
1777
+ last_four_num = sum (self .last_four_agreements )
1778
1778
if proportion_agree > 0.9 and last_four_num >= 4 :
1779
1779
return C
1780
1780
elif proportion_agree >= 0.625 and last_four_num >= 2 :
You can’t perform that action at this time.
0 commit comments