Axelrod-Python / axelrod-fortran

Python wrapper library around TourExec Fortran for Axelrod's second tournament.
Other
4 stars 0 forks source link

k90r not actually TF2T? #83

Closed marcharper closed 4 years ago

marcharper commented 4 years ago

While updating this library for random seeding I've found that the following code doesn't behave as expected:

import axelrod as axl
import axelrod_fortran as axlf

player1 = axlf.Player("k90r")
player2 = axl.Defector()

match = axl.Match((player1, player2), turns=5)
results = match.play()
print(results)

It prints

[(C, D), (C, D), (C, D), (C, D), (C, D)]

However player1 should have defected after two opponent defections, i.e. on round 3.

The test test_implemented_strategies in test_player.py fails when I run it directly for k90r and TF2T.

Note that TF2T in axelrod does defect on the third round:

import axelrod as axl

player1 = axl.TitFor2Tats()
player2 = axl.Defector()

match = axl.Match((player1, player2), turns=5)
results = match.play()
print(results)
[(C, D), (C, D), (D, D), (D, D), (D, D)]
marcharper commented 4 years ago

Here's the tour exec code for k90r. It looks like TF2T...

meatballs commented 4 years ago

Looks like we have a rogue space on L10

marcharper commented 4 years ago

Looks like a regression of #59 ? Or perhaps my local install of TourExec is old?

meatballs commented 4 years ago

Should be fixed in v0.4.1 of TourExec

marcharper commented 4 years ago

It was an old install. Closing.