-
Notifications
You must be signed in to change notification settings - Fork 165
remove use of poker.efg in test suite #608
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
base: master
Are you sure you want to change the base?
Conversation
|
poker.efg is still used in the user guide. I left it in tests/test_games, but now realise that for the user guide it likely reads it from contrib/games. We then may want to delete poker.efg from tests/test_games. |
tturocy
left a comment
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 have just one version of this game. It is at the moment awkward that we have games in tests/test_games and in contrib/games. But we will need to sort that out later, and I expect it will gradually come out in the was as we build out tests for algorithms and solution concepts.
We should decide which version we want to have, because there are several issues here:
-
We want a version that uses rational fractions rather than decimal representation. The decimal representation version would be very old (when "floating point" payoffs were permitted). We want to encourage the use of rational payoffs where it makes sense to do so.
-
I believe Myerson (1991) likely gets priority on this game as written, I do not have an earlier citation and there is none in his textbook. However two issues to consider:
- Myerson treats Red (high card) followed by Fold as a win for the informed player. This is consistent with the narrative exposition in the book, but is not consistent with how "poker" works. Alternatively, the version of this game used in Reiley's classroom experiment follows the "normal" rules of poker.
- Myerson does not actually give the players human names. However the names Fred and Alice are consistent with his textbook, as he uses male pronouns for odd-numbered players and female for even-numbered ones.
-
We also need a name for the game. Calling this 2-card poker is not accurate. In Myerson's description, the deals are "red" and "black" because they're dealt from a standard deck of cards but only the suit colour matters for payoffs. Further, calling it 2-card poker makes it sound more like e.g. Borel or von Neumann's versions, where each player gets a "card" (a draw from the uniform distribution).
Tagging @edwardchalstrey1 because this interacts with the relevant tutorial.
|
Yes, that all makes sense @tturocy. Happy to make the required further changes once we agree what we want to do. Note this is not the only example of duplication between contrib/games and tests/test_games: cat duplicates.txt |
|
Right, that is something we know about. :) But in those cases there's just one version of the file (as far as I know), just kept in two places. The way out of that would be to have something like a "library of standard games" which could be packaged and imported directly - something we've talked about before, perhaps we need to start thinking about articulating that as a facility and a project to do... |
The myerson_2_card_poker.efg is the one with floating point, and then only for the chance probabilities: c "" 1 "(0,1)" { "RED" 0.500000 "BLACK" 0.500000 } 1 "Outcome 3" { -1, 1 } I have just checked and all tests (on this branch) still pass with this changed to rational probabilities, i.e.: c "" 1 "(0,1)" { "RED" 1/2 "BLACK" 1/2 } 1 "Outcome 3" { -1, 1 } Thus, we just need to decide on game naming/actions labels etc. and I can update myerson_2_card_poker.efg and the tests (only in terms of action labels, and the file name) accordingly. |
In the tutorial the efg file isn't used as the game is constructed via the code so not to worry |
|
Yes @edwardchalstrey1, but it would be good that the game we build there matches the saved file, just for the avoidance of any confusion!!! :) |
|
@tturocy: The tests now only use stripped_down_poker.efg, which is faithful to Reiley et al in terms of action labels and payoffs. The reuse of action labels ("Fold" and "Bet" in particular) means that a couple of tests were simply dropped, since they relied on the uniqueness of said labels. I don't think that's a problem. I didn't want to drop some other tests that used infoset labels, so I inserted the infoset labels from the old myerson_2_card_poker.efg into stripped_down_poker.efg, which was adapted from poker.efg which had empty infoset labels. @edwardchalstrey1 : For after this is settled on any merged into the tests: contrib/games still contains poker.efg, and tests/test_userguide.py still contains test_myerson_poker(). If you could update both of these when you update the user guide that would be great (putting stripped_down_poker.efg in contrib/games, and, assuming we keep test_userguid.py, updating it to create the right game, exactly as in the updated user guide, not mentioning Myerson at all, but Reiley et al (2008). |
@rahulsavani I actually dropped this test and replaced it with a new one that checks all tutorials can be run without error, which doesn't need to be updated when any new tutorials are added or existing ones changed, looks like Reiley et al (2008) is cited correctly as well Edit: actually it mentions them both, so should I drop the Myerson citation? |
resolves #606