Probable (certain?) implementation error in `axelrod_first.TidemanAndChieruzzi`
drvinceknight opened this issue · 2 comments
@gaffney2010 has recently implemented MoreTidemanAndChieruzzi
in #1147, there's a check there that look very similar to the TidemanAndChieruzzi
strategy in axelrod_first
.
This specific line, https://github.com/Axelrod-Python/Axelrod/blob/master/axelrod/strategies/axelrod_first.py#L676:
if self.defections <= lower or self.defections >= upper:
Aims to check "and the total number of defections differs from a 50-50 random sample
by at least 3.0 standard deviations." (from the paper description).
@gaffney2010 has pointed out that the current implementation in axelrod_first
doesn't look right:
- It calculates the expected mean based on
opponent
and compare toself
. - It differs to the implementation in the Fortran code (the strategies are different but this particular check is likely to be the same).
Thus, because of the ambiguity in the paper it makes sense to change the line to be:
if opponent.defections <= lower or opponent.defections >= upper:
This fix requires that simple change and adjustment of any relevant tests.
I will grab this! ✋
Good catch :)