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.
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? |
tturocy
left a comment
There was a problem hiding this comment.
This addresses well the immediate issue of duplication. We can take for further discussion the best way to manage having a catalogue of standard games.
|
Also the resultant EFG from tutorial 3 has slightly different labels for players, actions and payoff nodes, and lacks the full title . I propose I should update the tutorial version to have the proper title and standardisation of "Fold" (vs "Pass"), but perhaps better to keep the terminal node labels referencing the player that wins e.g. "Alice wins big" (indifferent over the actual names of course 😄). Tutorial 3 EFG: New stripped down poker EFG from this PR: |
|
Also, what is the difference between: |
That field is an explicit information set label. It is possibly dubious to be labelling these in that way given the broader discussion about how we order information sets in "canonicalisation" - but for present purposes it's good enough. When we have our standardised games library this will become moot. |
Ah, that's a good catch. Yes, it would be good to be consistent. Neither other source uses personal names for players, but I think it's nice to do so here especially in the tutorial just because it makes it more accessible. "Alice" and "Bob" are of course more comp sci figures; I have no idea where "Fred" and "Alice" may have come from. Let's go with "Alice" and "Bob" universally perhaps just to be consistent both internally and with the "folk" naming? |
|
Yes, it is what I mentioned in my comment to Ted above: I added these infoset labels to keep a test parametrization we had before using this game. I think you can just drop these infoset labels from the tutorial, and leave them only in the tests version. I could also do 2 versions in the tests, one with and one without infoset labels, but I think that is not a must. Please do copy the labels of players and actions in the tutorial to match the new test version, which exactly mirrors Reiley et al. Fine to have player names in the outcome labels for who wins/loses. Myerson's game is different in an important way in terms of payoffs, and also in terms of action/player labels. We might just want to mention it as a similar variant in a "footnote" on the tutorial, with the main reference to Reiley et al. |
|
Ah was typing at the same time as Ted.
@tturocy , shall I update the test version to use Alice and Bob then? |
If we're in agreement then let's ensure we're consistent with this naming everywhere (in While you're doing this, maybe go ahead also and do a different naming scheme for the information sets? Just because we have the potential confusion about the |
|
I am happy using Alice/Bob everywhere, so let's go for that. I didn't like the infoset labels, but wasn't sure on the best alternative labels. How about: "Deal", "Alice King", "Alice Queen", "Bob" Or any other suggestions? |
|
Maybe "Alice has King", "Alice has Queen", "Bob's response" or something like that? Wouldn't want to overload "Bob" to mean both a player and an information set. |
|
strippped_down_poker.efg and corresponding tests updated as follows:
@tturocy: I hadn't noticed that you had already merged this before I just pushed these final changes to player/info set names; please let me know if you need me to do anything further before you get this onto master. |
Hi @rahulsavani I added these commits in a new PR where I was updating the tutorial to match it, see Q on node labelling: #621 |
resolves #606