Skip to content

Commit 32605e3

Browse files
bing-jmarcharper
authored andcommitted
formatted armed_bandits.py using black.
1 parent 07430cb commit 32605e3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

axelrod/strategies/armed_bandits.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
self,
3535
init_c_reward: float = 0.0,
3636
init_d_reward: float = 0.0,
37-
recency_weight: float = UNIFORM
37+
recency_weight: float = UNIFORM,
3838
) -> None:
3939
"""
4040
Parameters
@@ -67,7 +67,9 @@ def update_rewards(self, opponent: Player):
6767

6868
# if UNIFORM, use 1 / total number of times the updated action was taken previously
6969
if np.isinf(self.weight):
70-
weight = 1 / (self.history.cooperations if last_play == C else self.history.defections)
70+
weight = 1 / (
71+
self.history.cooperations if last_play == C else self.history.defections
72+
)
7173
else:
7274
weight = self.weight
7375

@@ -109,7 +111,7 @@ def __init__(
109111
epsilon: float = 0.1,
110112
init_c_reward: float = 0.0,
111113
init_d_reward: float = 0.0,
112-
recency_weight: float = Greedy.UNIFORM
114+
recency_weight: float = Greedy.UNIFORM,
113115
) -> None:
114116
"""
115117
Parameters

0 commit comments

Comments
 (0)