Interface to Gamut#930
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
| @@ -0,0 +1,534 @@ | |||
| { | |||
There was a problem hiding this comment.
|
This looks quite good to me already out of the box. I still have a feeling that the verb differentiation between OpenSpiel and GAMUT here isn't meaningful - I could just as easily justify "generate" for OpenSpiel, or "load" for both. In both cases the external tools are doing a generation step, even if we are using .efg/.nfg as the communication format those files are being created on demand by the library we're calling. |
Shall we stick with "load" for both to be consistent with the regular catalog load function? |
|
I can see it both ways. A reason I might lean to So |
|
Thanks @tturocy |
|
Hi @wyz2368 I was just discussing with @rahulsavani - it would be helpful to have your review on this pull request. If you could check out the branch and read and run the tutorial I added locally (noting you will need to download Gamut as it should explain) and let me know if anything doesn't work, and also if the tutorial makes sense or should be re-written at all. |
|
@edwardchalstrey1 I tested all the examples in the notebook and everything works. Thank you. |
|
Thanks @wyz2368 ! |
| @@ -0,0 +1,809 @@ | |||
| { | |||
There was a problem hiding this comment.
Unfortunately, this is not a standard version of Battle of the Sexes (not your fault, Gamut's). The standard version would have by symmetric, but only by swapping players AND actions. However this game in Gamut is unusually actually "symmetric" in the standard game-theoretic sense with payoffs (3,3) for (Opera, Opera) and likewise for (Football, Football). A standard (non-symmetric) version, e.g. , a la Wiki:
has the man preferring (Football, Football) to (Opera, Opera) and vice versa for the woman, e.g. with payoffs (3, 2) and (2, 3). We should avoid confusing people.
@tturocy Do you agree?
If so, a simple fix would be to swap out BoS for Chicken, which is symmetric in Gamut and symmetric as standard too.
Reply via ReviewNB
There was a problem hiding this comment.
Looks good apart from the fact Gamut (and thereby we) have used a non-standard version of Battle of the Sexes. We should probably swap it out for, e.g. Chicken. Let's see if @tturocy agrees.
|
Yes, I would agree with using Chicken instead, doesn't require substantial changes to the exposition of the example but users familiar with game theory won't be surprised by the game's payoffs. |
Issues closed by this PR
Description of the changes in this PR
This PR adds:
pygambit.catalogmodule, with a new function calledgenerate_gamut(as oppose toload_gamutwhich would make it more similar to the OpenSpiel one, but I thought this made sense)paramsargument maps directly to GAMUT command-line flags. Boolean flags such as-normalizeand-int_payoffsare passed asTrue; list values for-actionsexpand to space-separated tokens.
Example usage:
Todo:
How to review this PR
@tturocy @rahulsavani I've taken an approach to this that mirrors that of OpenSpiel loading since #910 is listed as a catalog issue, however re-reading I notice Ted said "and we call as an external process, similar to the model established for
PHCpackandlrslib" - so perhaps that approach makes more sense than what I've done here. Since Gamut involves Game generation rather than just loading pre-made games as in OpenSpiel (though I suppose you can pass in params there too)... my thought is perhaps Gamut generation should live elsewhere from the Catalog module? Again this brings up the issue of the Catalog being currently a PyGambit-only feature which Ted has raised. What are your thoughts?