Axelrod
Axelrod copied to clipboard
add py 3.13 support
addresses https://github.com/Axelrod-Python/Axelrod/issues/1463
We may need to update setup.py as well, @drvinceknight do we still need that?
Thanks @miller-ian. I restarted the failing tests, not sure what went wrong...
Sorry everyone, it's been a busy fortnight.
It's failing on doctests:
117 :align: center
118
119 The first 6 strategies have similar scores which could indicate that the
120 original work by Axelrod was not run with sufficient repetitions. Another
121 explanation is that all the strategies are implemented from the descriptions
122 given in [Axelrod1980]_ and there is no source code to base this on. This leads
123 to some strategies being ambiguous. These are all clearly explained in the
124 strategy docstrings. For example::
125
126 >>> print(axl.FirstByAnonymous.__doc__)
Differences (unified diff with -expected +actual):
@@ -1,22 +1,22 @@
<BLANKLINE>
- Submitted to Axelrod's first tournament by a graduate student whose name was
- withheld.
+Submitted to Axelrod's first tournament by a graduate student whose name was
+withheld.
<BLANKLINE>
- The description written in [Axelrod1980]_ is:
+The description written in [Axelrod1980]_ is:
<BLANKLINE>
- > "This rule has a probability of cooperating, P, which is initially 30% and
- > is updated every 10 moves. P is adjusted if the other player seems random,
- > very cooperative, or very uncooperative. P is also adjusted after move 130
- > if the rule has a lower score than the other player. Unfortunately, the
- > complex process of adjustment frequently left the probability of cooperation
- > in the 30% to 70% range, and therefore the rule appeared random to many
- > other players."
+> "This rule has a probability of cooperating, P, which is initially 30% and
+> is updated every 10 moves. P is adjusted if the other player seems random,
+> very cooperative, or very uncooperative. P is also adjusted after move 130
+> if the rule has a lower score than the other player. Unfortunately, the
+> complex process of adjustment frequently left the probability of cooperation
+> in the 30% to 70% range, and therefore the rule appeared random to many
+> other players."
<BLANKLINE>
- Given the lack of detail this strategy is implemented based on the final
- sentence of the description which is to have a cooperation probability that
- is uniformly random in the 30 to 70% range.
+Given the lack of detail this strategy is implemented based on the final
+sentence of the description which is to have a cooperation probability that
+is uniformly random in the 30 to 70% range.
<BLANKLINE>
- Names:
+Names:
<BLANKLINE>
- - (Name withheld): [Axelrod1980]_
+- (Name withheld): [Axelrod1980]_
<BLANKLINE>
I don't fully understand why (I assume it's an upstream change somewhere), do they pass locally for you @miller-ian ?
We may need to update setup.py as well, @drvinceknight do we still need that?
I believe we can delete that file.