Skip to content

Conversation

@edwardchalstrey1
Copy link
Member

@edwardchalstrey1 edwardchalstrey1 commented Sep 2, 2025

Changes

  • Restructures the PyGambit user guide into a set of notebook tutorials, which are rendered in the docs but can also be run locally by cloning the gambit repo
  • Tutorial content is adapted from the user guide but takes a sequential approach to introducing the PyGambit API functionality. The first 3 introductory tutorials should be understandable to someone without game theory knowledge or experience with Gambit, as is explained in the docs
  • Closes [Documentation]: Idea: Interactive version of PyGambit user guide/examples #542 - following this format it should be simple to add new tutorials going forward
  • Closes Update PyGambit tests to run tutorial notebooks #562

Reviewers

  • Please review PyGambit docs for this PR build compared with current release
  • I would suggest someone has a full read through of all the tutorials: all of the sections of the original documentation should still be included as part of one tutorial or another, with the exception of "Lifetime of a game object and its elements" which I removed since I felt it was just explaining a concept in Python, not a specific PyGambit feature - happy to restore it if it feels important!

WARNING

In the tutorials we currently overwrite node labels with action labels, to make it possible to index Node.children by action label, something which the API does not currently support, however, this should be changed if #587 #588 merged first

TODO

  • Update tutorials to not overwrite node labels and index by action label directly (see warning above) after Ted merges change that allows this FEAT: New syntax for node children and paths #587
  • If a docs page for [Documentation]: How to run tests locally & how to update the test suite #592 gets.merged first, update tests/requirements.txt with the relevant jupyter packages for running tests, which are not required by Gambit itself
  • Don't say "Game theory games"
  • Move "How to run Gambit tutorials" to start
  • Split tutorials into introductory and advanced
  • Suppress "Using external programs..." section for now (it can live in advanced)
  • Ensure advanced tutorials are run by notebook test
  • Update poker game file path as per remove use of poker.efg in test suite #608 this isn't used
  • Maybe also remove trust_game.efg and prisoners_dilemma.efg from Git since these will be generated by the tutorial code anyway, can update .gitignore to ignore the games in the tutorials/games folder
  • Check one card poker game is same as EFG example from remove use of poker.efg in test suite #608

…e server when doing local development to docs
@edwardchalstrey1 edwardchalstrey1 merged commit 500d8ba into master Nov 13, 2025
28 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Ed Chalstrey Gambit priorities Nov 13, 2025
@edwardchalstrey1 edwardchalstrey1 deleted the fix/542 branch November 13, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update PyGambit tests to run tutorial notebooks [Documentation]: Idea: Interactive version of PyGambit user guide/examples

2 participants