Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
a90a137
update pyproject.toml with optional dependencies for test suite and docs
edwardchalstrey1 Jan 28, 2026
adc322f
update GitHub actions to install optional dependencies when installin…
edwardchalstrey1 Jan 28, 2026
38ddfa2
add doc dependencies: Cython, numpy, scipy
edwardchalstrey1 Jan 28, 2026
4d54262
try GH actions without testing docs
edwardchalstrey1 Jan 28, 2026
0a46de2
Revert "try GH actions without testing docs"
edwardchalstrey1 Jan 28, 2026
7c59b5f
remove pip install that is already covered by build-system in pyproje…
edwardchalstrey1 Jan 28, 2026
fa8c42f
fix typo mistake in doc dependencies list
edwardchalstrey1 Jan 28, 2026
eadf1b4
remove Cython, numpy and scipy from doc dependency list as these are …
edwardchalstrey1 Jan 28, 2026
a403b5b
restore installation of build on linux job
edwardchalstrey1 Jan 28, 2026
06fe088
remove requirements.txt files
edwardchalstrey1 Jan 28, 2026
317e601
update docs for new installation method
edwardchalstrey1 Jan 28, 2026
d89b891
update documentation instructions
edwardchalstrey1 Jan 28, 2026
af6ece0
update readthedocs config
edwardchalstrey1 Jan 28, 2026
476efc1
try fixing linux build
edwardchalstrey1 Jan 28, 2026
b8db5ca
try again to fix linux job: let bash expand the filename first, then …
edwardchalstrey1 Jan 28, 2026
90a5e36
Create catalog dir and move one EFG and one NFG into it from contrib/…
edwardchalstrey1 Feb 3, 2026
83dd410
ignore catalog files copied into pygambit
edwardchalstrey1 Feb 3, 2026
7fc2199
add failing tests
edwardchalstrey1 Feb 3, 2026
3c53bea
improve tests
edwardchalstrey1 Feb 3, 2026
898a916
add pandas to pyproject.toml
edwardchalstrey1 Feb 3, 2026
8f916db
add test_catalog_load_invalid_slug
edwardchalstrey1 Feb 3, 2026
606dd8a
create load function
edwardchalstrey1 Feb 3, 2026
00beed3
add catalog to __init__
edwardchalstrey1 Feb 3, 2026
64eb310
add games() function
edwardchalstrey1 Feb 3, 2026
d24befd
refactor to define READERS once
edwardchalstrey1 Feb 3, 2026
72aade1
Big refactor to get catalog files from catalog dir external to pygambit
edwardchalstrey1 Feb 3, 2026
e7953e9
update Makefile.am for the 2 examples we moved into the catalog so far
edwardchalstrey1 Feb 3, 2026
7490ae6
update Game.comment to be Game.description in Python code
edwardchalstrey1 Feb 4, 2026
ebf6829
Revert "update Game.comment to be Game.description in Python code"
edwardchalstrey1 Feb 4, 2026
fbf6b89
Add initial update catalog script and RST page
edwardchalstrey1 Feb 4, 2026
1ca3461
rename table headers on output df from game() func
edwardchalstrey1 Feb 4, 2026
bd3c1f3
add generating the catalog csv for docs into GH actions
edwardchalstrey1 Feb 4, 2026
569148c
Revert "add generating the catalog csv for docs into GH actions"
edwardchalstrey1 Feb 4, 2026
8cf0396
refactor update script so its run from repo root
edwardchalstrey1 Feb 4, 2026
1b20438
update readthedocs to build the catalog csv before docs build
edwardchalstrey1 Feb 4, 2026
e977e64
add function which updates Makefile.am
edwardchalstrey1 Feb 4, 2026
af08d29
use a proper path for CATALOG_CSV
edwardchalstrey1 Feb 4, 2026
cd2ffc9
tidy update script
edwardchalstrey1 Feb 4, 2026
5675444
use explicit python executable from the virtualenv to create CSV for …
edwardchalstrey1 Feb 4, 2026
f574223
add developer doc for updating the catalog
edwardchalstrey1 Feb 4, 2026
5147278
Don't update Makefile.am by default
edwardchalstrey1 Feb 4, 2026
4b033c9
consistency in notebook comment
edwardchalstrey1 Feb 4, 2026
b14402a
demo loading from catalog in tutorial 1
edwardchalstrey1 Feb 4, 2026
264f7fb
load from catalog for game examples in advanced tutorials
edwardchalstrey1 Feb 4, 2026
0e268a2
Try using pip instead of setuptools to ensure pyproject.toml deps ins…
edwardchalstrey1 Feb 4, 2026
8649946
remove deleted contrib games from Makefile.am
edwardchalstrey1 Feb 4, 2026
adea4f2
add a warning about moving games from contrib
edwardchalstrey1 Feb 4, 2026
a72f7a2
check if pandas duplications error exists if we dont save outputs on …
edwardchalstrey1 Feb 4, 2026
57863d4
fix problem with print function
edwardchalstrey1 Feb 4, 2026
b687e20
resave notebook outputs
edwardchalstrey1 Feb 4, 2026
6562433
Update writer.cc
tturocy Feb 10, 2026
39fde9d
Merge branch 'master' into ehancement/731/take2
edwardchalstrey1 Feb 10, 2026
f84bcc8
move catalog update script into build support
edwardchalstrey1 Feb 10, 2026
d17f976
rename script
edwardchalstrey1 Feb 10, 2026
f07fdae
rename var
edwardchalstrey1 Feb 10, 2026
fd66e41
update path to catalog update script in readthedocs yml and docs page
edwardchalstrey1 Feb 10, 2026
bb1e920
move myserson fig into subfolder
edwardchalstrey1 Feb 10, 2026
5c7a60f
clarify script usage
edwardchalstrey1 Feb 10, 2026
dc7a373
add test_catalog_load_subdir_slug
edwardchalstrey1 Feb 10, 2026
7850585
update makefile
edwardchalstrey1 Feb 10, 2026
f6ea5df
update agent nb
edwardchalstrey1 Feb 10, 2026
f655645
add test for slug in subdir of catalog
edwardchalstrey1 Feb 10, 2026
56cd19a
update games func to list slugs correctly
edwardchalstrey1 Feb 10, 2026
6a4df8f
update test to avoid duplicates
edwardchalstrey1 Feb 10, 2026
886131c
fix code for handling slugs that duplicates of those in subfolders
edwardchalstrey1 Feb 10, 2026
68909b9
tidy the games() refactor
edwardchalstrey1 Feb 10, 2026
bb8f483
resave notebook
edwardchalstrey1 Feb 10, 2026
50e618b
strip nb outputs
edwardchalstrey1 Feb 10, 2026
67dedb2
remove modification to games() that was fixing a local issue
edwardchalstrey1 Feb 10, 2026
1794a83
fix the update script to get correct paths
edwardchalstrey1 Feb 10, 2026
079aacd
remove unused var
edwardchalstrey1 Feb 10, 2026
e57cfce
Add Windows handling
edwardchalstrey1 Feb 10, 2026
bdc5d3a
fix incorrect var name and make consistent
edwardchalstrey1 Feb 11, 2026
69d8cb9
use as_posix for slugs
edwardchalstrey1 Feb 11, 2026
d7290f4
add new notebook
edwardchalstrey1 Feb 12, 2026
cb5c210
Merge branch 'feature/677' into tutorial/732
edwardchalstrey1 Feb 12, 2026
d32570f
upgrade draw_tree version to 0.4.0
edwardchalstrey1 Feb 12, 2026
b56c95b
2smp game looks good
edwardchalstrey1 Feb 13, 2026
e73dfe8
add sections on saving images and further adjustments
edwardchalstrey1 Feb 13, 2026
1962e06
update headers
edwardchalstrey1 Feb 13, 2026
a4fc744
update header further
edwardchalstrey1 Feb 13, 2026
59dd0dd
add comment
edwardchalstrey1 Feb 13, 2026
c27f805
clear saved outputs from all tutorials
edwardchalstrey1 Feb 13, 2026
4be7887
typo
edwardchalstrey1 Feb 13, 2026
e1a7e98
tidy read and save sections
edwardchalstrey1 Feb 13, 2026
f4113e8
renumber and reorder tutorials
edwardchalstrey1 Feb 13, 2026
0a75924
update image to use sublevel_scaling
edwardchalstrey1 Feb 17, 2026
f6dcb49
clear outputs
edwardchalstrey1 Feb 17, 2026
100792c
Merge branch 'master' into tutorial/732
edwardchalstrey1 Feb 25, 2026
bb0ca84
revert makefile changes
edwardchalstrey1 Feb 25, 2026
eda750b
move games back to contrib
edwardchalstrey1 Feb 25, 2026
fc2e98e
Move 2smp back again since it's used by tutorial 4
edwardchalstrey1 Feb 25, 2026
a7fcf18
tidy saving sections of tutorials 1 and 2
edwardchalstrey1 Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ EXTRA_DIST = \
src/gui/bitmaps/zoom1.xpm \
src/gui/bitmaps/gambitrc.rc \
contrib/games/2s2x2x2.efg \
contrib/games/2smp.efg \
contrib/games/2x2x2.efg \
contrib/games/4cards.efg \
contrib/games/artist1.efg \
Expand Down Expand Up @@ -236,6 +235,7 @@ EXTRA_DIST = \
contrib/games/yamamoto.nfg \
contrib/games/zero.nfg \
src/README.rst \
catalog/2smp.efg \
catalog/myerson1991/fig4_2.efg \
catalog/selten1975/fig1.efg \
catalog/selten1975/fig2.efg \
Expand Down
File renamed without changes.
7 changes: 4 additions & 3 deletions doc/pygambit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ See installation instructions in the :ref:`install` section.


For newcomers to Gambit, we recommend reading through the PyGambit tutorials, which demonstrate the API's key capabilities for analyzing and solving games.
These tutorials are available to be run interactively as Jupyter notebooks, see :ref:`local_tutorials`.
All of the tutorials assume a basic knowledge of programming in Python.
All of these tutorials assume a basic knowledge of programming in Python.

You can run the tutorials interactively as Jupyter notebooks, see :ref:`local_tutorials`.

New user tutorials
------------------
Expand All @@ -20,10 +21,10 @@ They are numbered in the order they should be read.
.. toctree::
:maxdepth: 2

tutorials/running_locally
tutorials/01_quickstart
tutorials/02_extensive_form
tutorials/03_stripped_down_poker
tutorials/04_creating_images

Advanced user tutorials
-----------------------
Expand Down
43 changes: 13 additions & 30 deletions doc/tutorials/01_quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
},
{
"cell_type": "markdown",
"id": "24f36b0d",
"id": "3dfbf327",
"metadata": {},
"source": [
"Saving and reading strategic form games to and from file\n",
Expand All @@ -320,35 +320,18 @@
"You can use Gambit to save games to, and read from files.\n",
"The specific format depends on whether the game is normal or extensive-form.\n",
"\n",
"Here we'll save the Prisoner's Dilemma (Normal-form) to the `.nfg` format."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f58eaa77",
"metadata": {},
"outputs": [],
"source": [
"# g.to_nfg(\"prisoners_dilemma.nfg\")"
]
},
{
"cell_type": "markdown",
"id": "e373be1e",
"metadata": {},
"source": [
"You can easily restore the game object from file like so:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4119a2ac",
"metadata": {},
"outputs": [],
"source": [
"# gbt.read_nfg(\"prisoners_dilemma.nfg\")"
"Here we'll save the Prisoner's Dilemma (Normal-form) to the `.nfg` format.\n",
"Run these lines of code in new code cells if you're running the tutorial locally:\n",
"\n",
"```python\n",
"g.to_nfg(\"prisoners_dilemma.nfg\")\n",
"```\n",
"\n",
"You can easily restore the game object from file like so:\n",
"\n",
"```python\n",
"gbt.read_nfg(\"prisoners_dilemma.nfg\")\n",
"```"
]
}
],
Expand Down
72 changes: 11 additions & 61 deletions doc/tutorials/02_extensive_form.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -314,67 +314,17 @@
"The specific format depends on whether the game is normal or extensive-form.\n",
"\n",
"Here we'll save the Trust game (extensive-form) to the `.efg` format.\n",
"Uncomment these lines of code if you're running the tutorial locally:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "37c51152",
"metadata": {},
"outputs": [],
"source": [
"# g.to_efg(\"trust_game.efg\")"
]
},
{
"cell_type": "markdown",
"id": "0eb31525",
"metadata": {},
"source": [
"You can easily restore the game object from file like so:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0d86a750",
"metadata": {},
"outputs": [],
"source": [
"# gbt.read_efg(\"trust_game.efg\")"
]
},
{
"cell_type": "markdown",
"id": "182f2424-274e-4044-84ff-3323cd70ec68",
"metadata": {},
"source": [
"You can also use the `draw_tree` package to save the game in the `.ef` format which encodes layout information.\n",
"This can in turn be used to render the image for use in publications, for example as a `.png` (there are also `.pdf` and `.tex` options, see [draw_tree](https://github.com/gambitproject/draw_tree)):"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1bab777f-8a0b-4f1e-9c0c-270690288243",
"metadata": {},
"outputs": [],
"source": [
"# from draw_tree import generate_png\n",
"# draw_tree(g, save_to=\"trust_game.ef\")\n",
"# trust_game_png = generate_png(\"trust_game.ef\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2b715221-e427-4092-ad2f-9f4f2b548fa4",
"metadata": {},
"outputs": [],
"source": [
"# from IPython.display import Image\n",
"# Image(trust_game_png)"
"Run these lines of code in new code cells if you're running the tutorial locally:\n",
"\n",
"```python\n",
"g.to_efg(\"trust_game.efg\")\n",
"```\n",
"\n",
"You can easily restore the game object from file like so:\n",
"\n",
"```python\n",
"gbt.read_efg(\"trust_game.efg\")\n",
"```"
]
},
{
Expand Down
Loading