Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to pass match attributes in tournament #1096

Merged
merged 3 commits into from
Jul 29, 2017

Conversation

drvinceknight
Copy link
Member

It is possible to pass a dictionary to axelrod.Match is
match_attributes which correspond to the information given to players.

This is motivated by wanting to reproduce Axelrod's second tournament in
which all matches were 1 of 5 values.

It is possible to pass a dictionary to `axelrod.Match` is
`match_attributes` which correspond to the information given to players.

This is motivated by wanting to reproduce Axelrod's second tournament in
which all matches were 1 of 5 values.
game=test_game,
repetitions=test_repetitions,
turns=5,
match_attributes={"length": -1})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is length -> None a better default than -1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason I thought -1 was the default already in place. It's not! Let me change it to float('inf') which is what is currently there. Good catch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check the behavior of any strategies that use the match attributes...

Copy link
Member Author

@drvinceknight drvinceknight Jul 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already do this for the tests in the matches? (This matches_attribute argument is not new, it's used with prob_end matches/tournament, this PR is just adding the ability to get the tournament to pass it to the matches).

It is possible to determine what information players know about their matches.
By default all known information is given.
For example let us create a match with 5 turns between :code:`SteinAndRapoport`
and :code:`Aternator`. The latter of these two always defects on the last 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternator

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@drvinceknight
Copy link
Member Author

@marcharper with 1648ddf I've changed the -1 to float('inf') which is the default we already use. For some reason I thought it was -1. No idea why.

@marcharper
Copy link
Member

Cool. I think it used to be -1.

@drvinceknight
Copy link
Member Author

Cool. I think it used to be -1.

That must be why :)

@marcharper marcharper merged commit fdf04dd into master Jul 29, 2017
@marcharper marcharper deleted the pass-match-attributes branch October 3, 2017 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants