You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: axelrod/strategies/momentum.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ class Momentum(Player):
14
14
responds to gradients in optimization.
15
15
16
16
Parameters:
17
-
- alpha:
18
-
- threshold:
19
-
- momentum:
17
+
- alpha: Momentum decay factor that determines the rate of trust reduction. A higher value leads to slower decay, and the opponent's Defect acts as a trigger. (Optimized by Genetic Algorithm)
18
+
- threshold: The minimum momentum required to continue cooperation. If momentum falls below this value, the strategy switches to Defect as punishment. (Optimized by Genetic Algorithm)
19
+
- momentum: Represents the inertia of trust, dynamically changing based on past cooperation.
20
20
21
21
Names:
22
22
- Momentum: Original name by Dong Won Moon
@@ -35,8 +35,8 @@ class Momentum(Player):
35
35
36
36
def__init__(
37
37
self,
38
-
alpha=0.9914655399877477,# Optimized by Genetic Algorithm. You can try to adapt it to any Env.
0 commit comments