Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
231a96e
add new logo
edwardchalstrey1 Aug 12, 2025
df02488
add headers and link
edwardchalstrey1 Aug 12, 2025
047c826
Add livehtml target to Makefile and update build instructions for liv…
edwardchalstrey1 Aug 12, 2025
4ccadc1
tidy navbar
edwardchalstrey1 Aug 12, 2025
bc11922
downgrade Ipython to support current docs build process and add matpl…
edwardchalstrey1 Aug 12, 2025
3b0e6fa
simplify docs landing page
edwardchalstrey1 Aug 12, 2025
644f10d
Add external links and icon links to the HTML theme configuration
edwardchalstrey1 Aug 12, 2025
16301ed
Update PyGambit documentation for clarity and installation instructions
edwardchalstrey1 Aug 12, 2025
0196776
reorder so pygambit first
edwardchalstrey1 Aug 12, 2025
8314fbe
add link to older releases
edwardchalstrey1 Aug 12, 2025
c0699fd
remove download section
edwardchalstrey1 Aug 12, 2025
32c09fb
move bug reports section
edwardchalstrey1 Aug 12, 2025
adf3907
Update developer section to clarify team contributions and provide a …
edwardchalstrey1 Aug 12, 2025
71d08dc
pygambit before tools
edwardchalstrey1 Aug 12, 2025
34467d3
refactor history section to the bottom
edwardchalstrey1 Aug 12, 2025
4b57329
remove empty quickstart doc
edwardchalstrey1 Aug 13, 2025
0b45d0b
add links to docs and site on README
edwardchalstrey1 Aug 13, 2025
16a4da4
developer docs section
edwardchalstrey1 Aug 13, 2025
057c434
update toc with developer section
edwardchalstrey1 Aug 13, 2025
e5e0669
add version number to bug report template
edwardchalstrey1 Aug 13, 2025
67de383
add operating system dropdown to bug report template
edwardchalstrey1 Aug 13, 2025
f01785d
move issues section to top
edwardchalstrey1 Aug 13, 2025
d2aa4db
add contributing code guidelines to documentation
edwardchalstrey1 Aug 13, 2025
5e8f68e
update requirements.txt to specify package versions
edwardchalstrey1 Aug 13, 2025
5ab2aae
ignore 'doc/**' and '.github/ISSUE_TEMPLATE/**' paths in all workflows
edwardchalstrey1 Aug 13, 2025
50b1f5f
also dont run on README.md changes
edwardchalstrey1 Aug 13, 2025
f17749c
Merge branch 'master' into fix/541
edwardchalstrey1 Aug 20, 2025
8f71ad4
Update Python version to 3.11 in Read the Docs configuration
edwardchalstrey1 Aug 20, 2025
2d5091f
add revised logo
edwardchalstrey1 Aug 21, 2025
03836f7
neat centred logo and title
edwardchalstrey1 Aug 21, 2025
8876e32
update ipython and jupyter
edwardchalstrey1 Aug 21, 2025
ffad576
restore old logo
edwardchalstrey1 Aug 21, 2025
0adcedb
initial notebook
edwardchalstrey1 Aug 22, 2025
8be8809
better game setup
edwardchalstrey1 Aug 22, 2025
051f0b5
calculate equilibria
edwardchalstrey1 Aug 22, 2025
afef688
use player names and strategy names instead of indices
edwardchalstrey1 Aug 22, 2025
6856adb
explain strategy profiles and payoffs
edwardchalstrey1 Aug 22, 2025
f1bfeb1
tidy
edwardchalstrey1 Aug 22, 2025
ad039e0
add how to create a game from arrays
edwardchalstrey1 Aug 26, 2025
25e0112
add extensive form example start text
edwardchalstrey1 Aug 27, 2025
0c1dd53
add trust game existing content
edwardchalstrey1 Aug 27, 2025
3830199
explicit API calls
edwardchalstrey1 Aug 27, 2025
35d161d
finish equilibrium explanation with TODO questions
edwardchalstrey1 Aug 27, 2025
d08a66b
rename notebook
edwardchalstrey1 Aug 27, 2025
90bf32f
initial poker setup with information sets
edwardchalstrey1 Aug 27, 2025
5aadcf2
add outcomes and assign to nodes
edwardchalstrey1 Aug 27, 2025
6808cc4
explain the outcomes better
edwardchalstrey1 Aug 27, 2025
5ece960
rename
edwardchalstrey1 Aug 28, 2025
0454515
move trust game into new notebook
edwardchalstrey1 Aug 28, 2025
0a20cbd
read and save games
edwardchalstrey1 Aug 28, 2025
650a4de
explain extensive and normal form game distinction
edwardchalstrey1 Aug 28, 2025
a60d08e
demo saving efg
edwardchalstrey1 Aug 28, 2025
009e033
add to_arrays
edwardchalstrey1 Sep 1, 2025
f8d40ee
explain labels
edwardchalstrey1 Sep 1, 2025
fd8f454
remove todos
edwardchalstrey1 Sep 1, 2025
493a7c1
full notebook content
edwardchalstrey1 Sep 2, 2025
d69eb45
remove equilibrium computation from this example
edwardchalstrey1 Sep 2, 2025
0f2b92a
reference links
edwardchalstrey1 Sep 2, 2025
eb0217e
some notes added to the part before computing equlibria
edwardchalstrey1 Sep 2, 2025
8c76df5
better explanation
edwardchalstrey1 Sep 2, 2025
faa1d81
better explanation
edwardchalstrey1 Sep 2, 2025
5841802
explain better
edwardchalstrey1 Sep 2, 2025
0dcd95f
explain better
edwardchalstrey1 Sep 2, 2025
3a527b0
explain belief
edwardchalstrey1 Sep 2, 2025
15ec069
explain realiz_prob and node_value
edwardchalstrey1 Sep 2, 2025
767010a
rename var
edwardchalstrey1 Sep 2, 2025
118d353
explain strategy payoff better
edwardchalstrey1 Sep 2, 2025
a4f6bf9
explain difference between strategy and behaviour profiles
edwardchalstrey1 Sep 2, 2025
cc35e51
explain strategy and profile classes and subclasses better
edwardchalstrey1 Sep 2, 2025
9fe54d3
compare both methods
edwardchalstrey1 Sep 2, 2025
55ba90b
intro for Acceptance criteria for Nash equilibria section
edwardchalstrey1 Sep 3, 2025
7e034ad
commit before stash
edwardchalstrey1 Sep 4, 2025
776e6a5
Merge branch 'master' into fix/542
edwardchalstrey1 Sep 4, 2025
d095f4b
maxregret
edwardchalstrey1 Sep 5, 2025
52fc26e
end of poker example
edwardchalstrey1 Sep 5, 2025
7787a8a
add section links
edwardchalstrey1 Sep 5, 2025
b91d167
clarify section header
edwardchalstrey1 Sep 5, 2025
abea637
add starting points notebook
edwardchalstrey1 Sep 8, 2025
22d1309
tutorial assumptions
edwardchalstrey1 Sep 8, 2025
fccd9f4
tutorials purpose
edwardchalstrey1 Sep 8, 2025
6c939ed
tutorial 4
edwardchalstrey1 Sep 8, 2025
8df19c3
add qre notebook
edwardchalstrey1 Sep 8, 2025
6525210
add links
edwardchalstrey1 Sep 8, 2025
33d14fe
finish t05
edwardchalstrey1 Sep 8, 2025
c733acf
render tutorials
edwardchalstrey1 Sep 9, 2025
d21ea80
add pandoc to readthedocs config
edwardchalstrey1 Sep 9, 2025
5aeb158
add pandoc to documentation requirements
edwardchalstrey1 Sep 9, 2025
7a16672
fix typos and improve clarity in contributing documentation
edwardchalstrey1 Sep 9, 2025
1113a37
tidy notebooks and add subheader
edwardchalstrey1 Sep 9, 2025
ace7b17
update tutorial section titles
edwardchalstrey1 Sep 9, 2025
198efe3
fix headers
edwardchalstrey1 Sep 9, 2025
2929cf2
separate docs sections
edwardchalstrey1 Sep 9, 2025
26c7348
move tutorials onto pygambit homepage
edwardchalstrey1 Sep 9, 2025
28b15e4
update homepage link to pygambit
edwardchalstrey1 Sep 9, 2025
918036e
reduce user guide to remaining content not in tutorials
edwardchalstrey1 Sep 9, 2025
0c60ac4
add header and link to it for representation of numerical data of a game
edwardchalstrey1 Sep 9, 2025
1be0a2c
move numerical data representation in pygambit to tutorial 03
edwardchalstrey1 Sep 9, 2025
2187e75
restructure to remove original user guide completely
edwardchalstrey1 Sep 10, 2025
da43f31
reorder table and add explanation
edwardchalstrey1 Sep 10, 2025
1e95ff1
remove deprecated user guide link
edwardchalstrey1 Sep 10, 2025
23b637a
save the new table
edwardchalstrey1 Sep 10, 2025
a84201a
update tutorial explainers
edwardchalstrey1 Sep 10, 2025
245816e
correct no of tutorials
edwardchalstrey1 Sep 10, 2025
de9c8a4
fix up algorithm table
edwardchalstrey1 Sep 10, 2025
a57dedd
break up the PyGambit page appropriately
edwardchalstrey1 Sep 10, 2025
bf2b2d0
refine tutorial titles and sections
edwardchalstrey1 Sep 10, 2025
c7357c9
refactor developer doc
edwardchalstrey1 Sep 10, 2025
67dfd8d
update running_locally tutorial with detailed setup instructions
edwardchalstrey1 Sep 10, 2025
342e9a6
update tutorial names
edwardchalstrey1 Sep 10, 2025
0c9927f
take prisoners dilemma out of summary details tags
edwardchalstrey1 Sep 10, 2025
98b6650
move import
edwardchalstrey1 Sep 10, 2025
f1257bc
final save t01
edwardchalstrey1 Sep 10, 2025
4d52f4e
use reference not link
edwardchalstrey1 Sep 10, 2025
19646cb
rerun cells
edwardchalstrey1 Sep 10, 2025
2679932
tidy top markdown
edwardchalstrey1 Sep 10, 2025
0ac02bb
explain better
edwardchalstrey1 Sep 10, 2025
22895b3
typo
edwardchalstrey1 Sep 10, 2025
759aa1f
explain better
edwardchalstrey1 Sep 10, 2025
10ecaf8
typo
edwardchalstrey1 Sep 10, 2025
c21da80
indent episilon equilibria text
edwardchalstrey1 Sep 10, 2025
5c13a18
rerun notebook cells
edwardchalstrey1 Sep 10, 2025
14ebad3
tidy t4 and t5
edwardchalstrey1 Sep 10, 2025
3419a71
resave nb outputs
edwardchalstrey1 Sep 15, 2025
eaa8ce1
use prior_action.label as node labels
edwardchalstrey1 Sep 18, 2025
e55cbed
use Node.prior_action.label to set node labels
edwardchalstrey1 Sep 18, 2025
84d6371
initial tests
edwardchalstrey1 Nov 10, 2025
de62361
remove old userguide tests
edwardchalstrey1 Nov 10, 2025
08ca752
organise imports
edwardchalstrey1 Nov 10, 2025
6783f1f
refactor: simplify kernel shutdown handling in notebook tests
edwardchalstrey1 Nov 10, 2025
782aa88
organise imports again
edwardchalstrey1 Nov 10, 2025
72c8dc0
fix: update dependencies in CI workflow to include nbformat, nbclient…
edwardchalstrey1 Nov 10, 2025
74236d6
style: fix indentation in docstrings for tutorial notebook tests
edwardchalstrey1 Nov 10, 2025
06ba186
fix: skip notebook test on Python 3.9 in CI
edwardchalstrey1 Nov 10, 2025
7d45d7a
Merge pull request #594 from gambitproject/test-run-notebooks
edwardchalstrey1 Nov 10, 2025
4617f9c
Merge branch 'master' into fix/542
edwardchalstrey1 Nov 10, 2025
d7e7bf5
just "games"
edwardchalstrey1 Nov 11, 2025
b73410f
move how to run up
edwardchalstrey1 Nov 11, 2025
db16579
split tutorials on main page
edwardchalstrey1 Nov 11, 2025
3ce97cc
move advanced tutorials to their own folder
edwardchalstrey1 Nov 11, 2025
38fbde7
refer to tutorials properly
edwardchalstrey1 Nov 11, 2025
255ed1b
move external programs doc which currently isnt linked to anywhere an…
edwardchalstrey1 Nov 11, 2025
3fc3729
fix link to advanced tutorials
edwardchalstrey1 Nov 11, 2025
e2f2c52
add text above advanced tutorials list
edwardchalstrey1 Nov 11, 2025
e2160db
refactor: enhance tutorial notebook discovery to include advanced tut…
edwardchalstrey1 Nov 11, 2025
4fcd208
fix link to nfg file
edwardchalstrey1 Nov 11, 2025
7af604c
Merge branch 'master' into fix/542
edwardchalstrey1 Nov 13, 2025
bc1acce
Add *.so files to .gitignore
edwardchalstrey1 Nov 13, 2025
93df731
remove tutorial games from git
edwardchalstrey1 Nov 13, 2025
9201165
fix tutorial game paths
edwardchalstrey1 Nov 13, 2025
2e9c3fd
comment out the save/load lines
edwardchalstrey1 Nov 13, 2025
f0c130a
update tutorials to use action labels
edwardchalstrey1 Nov 13, 2025
2feffff
remove note
edwardchalstrey1 Nov 13, 2025
20ce0e7
use prior action labels for parent nodes too
edwardchalstrey1 Nov 13, 2025
61fb0d6
update test requirements.txt to include notebook dependencies
edwardchalstrey1 Nov 13, 2025
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
16 changes: 11 additions & 5 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools build cython pytest pytest-skip-slow wheel lxml numpy scipy
pip install setuptools build cython pytest pytest-skip-slow wheel lxml numpy scipy nbformat nbclient ipykernel
- name: Build source distribution
run:
python -m build
Expand All @@ -38,7 +38,13 @@ jobs:
cd dist
pip install -v pygambit*.tar.gz
- name: Run tests
run: pytest
run: |
if [ "${{ matrix.python-version }}" = "3.9" ]; then
# Python 3.9 on linux skips the notebook execution test (notebooks may require newer kernels/deps)
pytest -q -k 'not test_execute_notebook'
else
pytest
fi

macos-13:
runs-on: macos-13
Expand All @@ -56,7 +62,7 @@ jobs:
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
pip install cython pytest pytest-skip-slow wheel lxml numpy scipy
pip install cython pytest pytest-skip-slow wheel lxml numpy scipy nbformat nbclient ipykernel
- name: Build extension
run: |
python -m pip install -v .
Expand All @@ -79,7 +85,7 @@ jobs:
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
pip install cython pytest pytest-skip-slow wheel lxml numpy scipy
pip install cython pytest pytest-skip-slow wheel lxml numpy scipy nbformat nbclient ipykernel
- name: Build extension
run: |
python -m pip install -v .
Expand All @@ -102,7 +108,7 @@ jobs:
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
pip install cython pytest pytest-skip-slow wheel lxml numpy scipy
pip install cython pytest pytest-skip-slow wheel lxml numpy scipy nbformat nbclient ipykernel
- name: Build extension
run: |
python -m pip install -v .
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ gambit
dist
.venv
*.dmg
Gambit.app/*
Gambit.app/*
*.so
doc/tutorials/games/*.nfg
doc/tutorials/games/*.efg
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ build:
python: "3.13"
apt_packages:
- libgmp-dev
- pandoc

python:
install:
Expand Down
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"IPython.sphinxext.ipython_console_highlighting",
"IPython.sphinxext.ipython_directive",
"sphinx_design",
"nbsphinx",
]

# IPython directive configuration
Expand Down
13 changes: 7 additions & 6 deletions doc/developer.contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,21 @@ You can make changes to the documentation by editing the `.rst` files in the ``d
Creating a pull request with your changes will automatically trigger a build of the documentation via the ReadTheDocs service, which can be viewed online.
You can also build the documentation locally to preview your changes before submitting a pull request.

1. Install the docs dependencies (into the virtual environment where you installed PyGambit): ::
1. `Install Pandoc <https://pandoc.org/installing.html>`_ for your OS

2. Install the docs dependencies (into the virtual environment where you installed PyGambit): ::

pip install -r doc/requirements.txt

2. Navigate to the Gambit repo and build the docs: ::
3. Navigate to the Gambit repo and build the docs: ::

cd doc
make html # or make livehtml for live server with auto-rebuild

3. Open ``doc/_build/html/index.html`` in your browser to view the documentation.
4. Open ``doc/_build/html/index.html`` in your browser to view the documentation.



.. TODO: Add instructions for the GitHub workflow during contributor docs refactoring.
See https://github.com/gambitproject/gambit/issues/541

Recognising contributions
-------------------------
Expand All @@ -122,4 +123,4 @@ To add a contributor, comment on a GitHub Issue or Pull Request, asking @all-con

@all-contributors please add @<username> for <contributions>

Refer to the `emoji key <https://allcontributors.org/docs/en/emoji-key>`__ for a list of contribution types.
Refer to the `emoji key <https://allcontributors.org/docs/en/emoji-key>`__ for a list of contribution types.
64 changes: 62 additions & 2 deletions doc/pygambit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,68 @@ PyGambit

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.

New user tutorials
------------------

These tutorials assume no prior knowledge of Game Theory or the PyGambit API and provide detailed explanations of the concepts and code.
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_poker

Advanced user tutorials
-----------------------

These tutorials assume some familiarity with the PyGambit API and Game Theory terminology and concepts including:

- Nash equilibria
- Pure and mixed strategies
- Simplex representations of available strategies
- Logit quantal response equilibrium (LQRE) correspondence

Advanced tutorials:

.. toctree::
:maxdepth: 2

tutorials/advanced_tutorials/starting_points
tutorials/advanced_tutorials/quantal_response
.. pygambit.external_programs

Algorithms for computing Nash equilibria
----------------------------------------

Interfaces to algorithms for computing Nash equilibria are provided in :py:mod:`pygambit.nash`.
The table below summarizes the available PyGambit functions and the corresponding Gambit CLI commands.

========================================== ========================================
CLI command PyGambit function
========================================== ========================================
:ref:`gambit-enumpure <gambit-enumpure>` :py:func:`pygambit.nash.enumpure_solve`
:ref:`gambit-enummixed <gambit-enummixed>` :py:func:`pygambit.nash.enummixed_solve`
:ref:`gambit-lp <gambit-lp>` :py:func:`pygambit.nash.lp_solve`
:ref:`gambit-lcp <gambit-lcp>` :py:func:`pygambit.nash.lcp_solve`
:ref:`gambit-liap <gambit-liap>` :py:func:`pygambit.nash.liap_solve`
:ref:`gambit-logit <gambit-logit>` :py:func:`pygambit.nash.logit_solve`
:ref:`gambit-simpdiv <gambit-simpdiv>` :py:func:`pygambit.nash.simpdiv_solve`
:ref:`gambit-ipa <gambit-ipa>` :py:func:`pygambit.nash.ipa_solve`
:ref:`gambit-gnm <gambit-gnm>` :py:func:`pygambit.nash.gnm_solve`
========================================== ========================================

API documentation
----------------

.. toctree::
:maxdepth: 2

pygambit.user
pygambit.api
pygambit.api
Loading
Loading