Adding the new strategy¶
To get the strategy to be recognised by the library we need to add it to the
files that initialise when someone types
import axelrod. This is done
To classify the new strategy, run rebuild_classifier_table:
This will update
axelrod/strategies/_strategies.py. Check that the
recorded classifications for the strategies are what you expected.
If you have added your strategy to a file that already existed (perhaps you
added a new variant of
titfortat to the
simply add your strategy to the list of strategies already imported from
from <file_name> import <list-of-strategies>
If you have added your strategy to a new file then simply add a line similar to above with your new strategy.
Once you have done that, you need to add the class itself to the
all_strategies list (in
You will also need to increment the doctest in
Finally, if you have created a new module (a new
please add it to the
docs/references/all_strategies.rst file so that it
will automatically be documented.