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 ! |
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?