Axelrod
Axelrod copied to clipboard
ModalTFT, ModalDefector strategies - Ben McGuffog
Hi, I've added two strategies that are interesting (well at least I think). Here are their descritpions:
ModalTFT A player starts by cooperating and then analyses the history of the opponent. If the opponent Cooperated in the last round, they are returned with a Cooperation. If the opponent chose to Defect in the previous round, then this strategy will return with the mode of the previous opponent responses.
ModalDefector A player starts by Defecting and then analyses the history of the opponent. If the opponent Cooperated in the last round, they are returned with a Defection. If the opponent chose to Defect in the previous round, then this strategy will return with the mode of the previous opponent responses.
Interestingly, when pitted against a few of the classics from the orignal Axelrod tournement, they do quite well. When tested agianst all of the strategies in this repository, they rank 103 and 200 respectively.
I have never written code for other people in my life. This would be the first. My tests, while simple, seem to pass though. This is also my first pull request ever so I'm probably doing a number on it. I have tried searching through your code to see if these strategies already exist and I haven't found any like them. It may be that I've simply missread the code and im wasting your time right now, for which I appologise in advance. It would be cool to have the contributors badge on my account though.
Hi, there's one doc test failing:
----------------------------------------------------------------------
File "/home/runner/work/Axelrod/Axelrod/./docs/index.rst", line 55, in index.rst
Failed example:
len(axl.strategies)
Expected:
240
Got:
242
----------------------------------------------------------------------
Ran 65 tests in 76.362s
FAILED (failures=1)
It's because you added two new strategies.
Also, are you sure there's no similar strategies in the library? Many are TFT with a tweak like what you've done.
Thanks Marc,
I'll go through them all again. I'm a little more familiar with the whole package now.
On Sat, 2 Mar 2024, 10:07 Marc, @.***> wrote:
Hi, there's one doc test failing:
File "/home/runner/work/Axelrod/Axelrod/./docs/index.rst", line 55, in index.rst Failed example: len(axl.strategies) Expected: 240 Got: 242
Ran 65 tests in 76.362s
FAILED (failures=1)
It's because you added two new strategies.
Also, are you sure there's no similar strategy in the library? Many are TFT with a tweak like what you've done.
— Reply to this email directly, view it on GitHub https://github.com/Axelrod-Python/Axelrod/pull/1433#issuecomment-1974052136, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUH5LT5R4ROWBJXMQ76F3YWEC23AVCNFSM6AAAAABC5KWMOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUGA2TEMJTGY . You are receiving this because you authored the thread.Message ID: @.***>