File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -241,11 +241,16 @@ def clone(self):
241
241
return new_player
242
242
243
243
def reset (self ):
244
- """
245
- Resets history.
246
- When creating strategies that create new attributes then this method
247
- should be re-written (in the inherited class) and should not only reset
248
- history but also rest all other attributes.
244
+ """Resets a player to its initial state
245
+
246
+ This method is called at the beginning of each match (between a pair
247
+ of players) to reset a player's state to its initial starting point.
248
+ It ensures that no 'memory' of previous matches is carried forward.
249
+
250
+ The default method resets a player's history, cooperations, defections
251
+ and state_distribution. Players which have further attributes need to
252
+ override this method and ensure those additional attributes are also
253
+ reset.
249
254
"""
250
255
self .history = []
251
256
self .cooperations = 0
You can’t perform that action at this time.
0 commit comments