-
Notifications
You must be signed in to change notification settings - Fork 263
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
Conversation
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}) |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@marcharper with 1648ddf I've changed the |
Cool. I think it used to be -1. |
That must be why :) |
It is possible to pass a dictionary to
axelrod.Match
ismatch_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.