Skip to content

Commit 9ae4307

Browse files
committed
Add more details about why of receive_match_attrs.
1 parent 05f97e3 commit 9ae4307

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/tutorials/contributing/strategy/writing_the_new_strategy.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ The variables :code:`C` and :code:`D` represent the cooperate and defect actions
121121
respectively.
122122

123123
Some strategies make specific use of the variables of a match to create their
124-
own attributes, in this case the :code:`receive_match_attributes` method must be
125-
defined. Here is how this is done for
126-
:class:`Stalker <axelrod.strategies.stalker.Stalker>`::
124+
own attributes. In principle these attributes could change throughout a match
125+
or tournament if the match properties (like the game matrix) change, so we
126+
require that this logic live in the :code:`receive_match_attributes` method for
127+
correct dynamic updating. Here is how this is done for :class:`Stalker
128+
<axelrod.strategies.stalker.Stalker>`::
127129

128130
def receive_match_attributes(self)
129131
R, P, S, T = self.match_attributes["game"].RPST()

0 commit comments

Comments
 (0)