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__(
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
You can’t perform that action at this time.
0 commit comments