File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def __init__(
34
34
self ,
35
35
init_c_reward : float = 0.0 ,
36
36
init_d_reward : float = 0.0 ,
37
- recency_weight : float = UNIFORM
37
+ recency_weight : float = UNIFORM ,
38
38
) -> None :
39
39
"""
40
40
Parameters
@@ -67,7 +67,9 @@ def update_rewards(self, opponent: Player):
67
67
68
68
# if UNIFORM, use 1 / total number of times the updated action was taken previously
69
69
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
+ )
71
73
else :
72
74
weight = self .weight
73
75
@@ -109,7 +111,7 @@ def __init__(
109
111
epsilon : float = 0.1 ,
110
112
init_c_reward : float = 0.0 ,
111
113
init_d_reward : float = 0.0 ,
112
- recency_weight : float = Greedy .UNIFORM
114
+ recency_weight : float = Greedy .UNIFORM ,
113
115
) -> None :
114
116
"""
115
117
Parameters
You can’t perform that action at this time.
0 commit comments