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:
16611661 recent_history = opponent .history [- 5 :]
16621662
16631663 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 ))
16651665
16661666 return self ._random .random_choice (self .prob_coop [number_defects ])
16671667
@@ -1774,7 +1774,7 @@ def strategy(self, opponent: Player) -> Action:
17741774 return C
17751775
17761776 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 )
17781778 if proportion_agree > 0.9 and last_four_num >= 4 :
17791779 return C
17801780 elif proportion_agree >= 0.625 and last_four_num >= 2 :
You can’t perform that action at this time.
0 commit comments