Instructions¶
Here is the file structure for the Axelrod repository:
.
├── axelrod
│ └── __init__.py
│ └── ecosystem.py
│ └── game.py
│ └── player.py
│ └── plot.py
│ └── result_set.py
│ └── round_robin.py
│ └── tournament.py
│ └── /strategies/
│ └── __init__.py
│ └── _strategies.py
│ └── cooperator.py
│ └── defector.py
│ └── grudger.py
│ └── titfortat.py
│ └── gobymajority.py
│ └── ...
│ └── /tests/
│ └── integration
│ └── strategies
│ └── unit
│ └── test_*.py
└── README.md
To contribute a strategy you need to follow as many of the following steps as possible:
- Fork the github repository.
- Add a
<strategy>.py
file to the strategies directory or add a strategy to a pre existing<strategy>.py
file. - Update the
./axelrod/strategies/_strategies.py
file. - If you created a new
<strategy>.py
file add it to.docs/reference/all_strategies.rst
. - Write some unit tests in the
./axelrod/tests/strategies/
directory. - This one is also optional: ping us a message and we’ll add you to the Contributors team. This would add an Axelrod-Python organisation badge to your profile.
- Send us a pull request.
If you would like a hand with any of the above please do get in touch: we’re always delighted to have new strategies.