Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
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
b270578
add mac install instructions
edwardchalstrey1 Sep 18, 2025
7edeb84
add mac, windows, linux
edwardchalstrey1 Sep 18, 2025
6310fd8
Add final installation instruction for the Gambit application on macOS
edwardchalstrey1 Sep 18, 2025
729fd4a
update gitignore
edwardchalstrey1 Sep 19, 2025
8a55070
link to releases page
edwardchalstrey1 Sep 19, 2025
f468da4
Merge branch 'gui-install' into openspiel-tutorial
edwardchalstrey1 Sep 19, 2025
0b5bd75
Add tutorial for OpenSpiel and Gambit workflow
edwardchalstrey1 Sep 19, 2025
d4509cc
get a matrix rock-paper-scissors game from OpenSpiel in Gambit
edwardchalstrey1 Sep 19, 2025
5247821
add openspiel to doc requirements
edwardchalstrey1 Sep 19, 2025
c0b0586
add example of using OpenSpiel to approach Nash equilibria via evolut…
edwardchalstrey1 Sep 19, 2025
f73f5c0
label gambit players
edwardchalstrey1 Sep 22, 2025
a576183
hanabi extensive form example
edwardchalstrey1 Sep 25, 2025
056a8cd
explain hanabi choice and error
edwardchalstrey1 Oct 2, 2025
7470aa3
play tiny hanabi with RL
edwardchalstrey1 Oct 2, 2025
18a3a93
add explanation
edwardchalstrey1 Oct 2, 2025
fa53f2b
update explainer text
edwardchalstrey1 Oct 3, 2025
c42bf90
tidy intro
edwardchalstrey1 Oct 3, 2025
f249490
explain game library
edwardchalstrey1 Oct 3, 2025
1b837d5
add nfg alternative
edwardchalstrey1 Oct 3, 2025
ed77b9d
avoid saving efg file
edwardchalstrey1 Oct 3, 2025
4972b8a
use the game_to_nfg_string function
edwardchalstrey1 Oct 3, 2025
a2f5c65
rerun nb
edwardchalstrey1 Oct 3, 2025
8b09d84
add game title
edwardchalstrey1 Oct 3, 2025
91b61fc
you can create games in OpenSpiel
edwardchalstrey1 Oct 3, 2025
ce7f5a5
simpligy tensor game creation
edwardchalstrey1 Oct 3, 2025
b826a8e
simplify create_matrix_game
edwardchalstrey1 Oct 3, 2025
cfbc2e6
load_efg_game and load_nfg_game funcs
edwardchalstrey1 Oct 3, 2025
917d144
load_nfg_game findings
edwardchalstrey1 Oct 6, 2025
781a51d
manual play of one card poker
edwardchalstrey1 Oct 6, 2025
a8813d0
explain API differences better
edwardchalstrey1 Oct 6, 2025
e539f09
normal form playthrough
edwardchalstrey1 Oct 6, 2025
06990a3
evolutionary dynamics chart
edwardchalstrey1 Oct 6, 2025
7542dc8
add plot for prisoners dilemma
edwardchalstrey1 Oct 6, 2025
3edbec8
remove extra parts
edwardchalstrey1 Oct 6, 2025
1b2591e
better explanation of Gambit EFG
edwardchalstrey1 Oct 6, 2025
2acc73e
explain playing one card poker in OpenSpiel
edwardchalstrey1 Oct 6, 2025
3160dba
update what the notebook does
edwardchalstrey1 Oct 6, 2025
521bf76
plot rps dynamics
edwardchalstrey1 Oct 7, 2025
4f4daed
update gitignore to exclude .so files
edwardchalstrey1 Oct 7, 2025
0322b46
tidy text
edwardchalstrey1 Oct 7, 2025
fdb6e70
explain difference between the rps and pd dynamics
edwardchalstrey1 Oct 7, 2025
8372cdb
remind explananation of pd
edwardchalstrey1 Oct 7, 2025
88061df
more tidying
edwardchalstrey1 Oct 7, 2025
f6f7b9e
explain better that Tiny hanabi learned strategies are consistent wit…
edwardchalstrey1 Oct 7, 2025
2fd3c6a
final explaination of poker
edwardchalstrey1 Oct 7, 2025
57c8377
resave outputs
edwardchalstrey1 Oct 7, 2025
b14a643
add to toctree and give number
edwardchalstrey1 Oct 7, 2025
a6901dc
plot the convergence of the time average of strategies
edwardchalstrey1 Oct 20, 2025
d03a125
show difference between plotting the current strategy proportions vs.…
edwardchalstrey1 Oct 20, 2025
7ba2fde
clearly show average strategy convergence in RPS
edwardchalstrey1 Oct 20, 2025
5094652
cite OpenSpiel nb
edwardchalstrey1 Oct 20, 2025
73fb533
better explanations
edwardchalstrey1 Oct 20, 2025
4fdad5b
better y axis label
edwardchalstrey1 Oct 20, 2025
23484bd
better explanation of replicator dynamics with msp terminology
edwardchalstrey1 Oct 20, 2025
fd26b15
rerun nb
edwardchalstrey1 Oct 20, 2025
ed7efed
install draw_tree from GitHub
edwardchalstrey1 Oct 23, 2025
fac319c
attempt to include draw_tree in Cython
edwardchalstrey1 Oct 27, 2025
6de0eeb
remove draw_tree function
edwardchalstrey1 Oct 27, 2025
f42a828
move draw_tree to doc requirements only
edwardchalstrey1 Oct 27, 2025
4bd9f3f
use draw_tree in tutorial 2
edwardchalstrey1 Oct 27, 2025
7f555f0
add texlive-full to apt_packages in Read the Docs configuration
edwardchalstrey1 Oct 27, 2025
2d2706c
uncomment open_spiel installation
edwardchalstrey1 Oct 27, 2025
1281367
add draw_tree to installation instructions
edwardchalstrey1 Oct 27, 2025
0562ece
update tutorial 2 with draw_tree
edwardchalstrey1 Oct 27, 2025
abb04fc
ignore .ef files
edwardchalstrey1 Oct 27, 2025
b1147b9
add draw_tree to one card poker
edwardchalstrey1 Oct 27, 2025
448bd13
escape dollar signs in markdown files
edwardchalstrey1 Oct 27, 2025
6c20364
add poker efg
edwardchalstrey1 Oct 27, 2025
e53e4c1
save openspiel nb with no saved outputs
edwardchalstrey1 Oct 27, 2025
c95e5a7
add .ipynb_checkpoints to .gitignore
edwardchalstrey1 Oct 27, 2025
00746c8
Revert "save openspiel nb with no saved outputs"
edwardchalstrey1 Oct 27, 2025
6cef275
test saving without outputs on tutorial 2
edwardchalstrey1 Oct 27, 2025
4f46dc0
add draw_tree lines to openspiel tutorial
edwardchalstrey1 Oct 27, 2025
5f1f262
tiny hanabi looks bad with draw_tree default layout
edwardchalstrey1 Oct 27, 2025
7b3442d
Wrote simple layout abstraction that at least compiles...
tturocy Oct 27, 2025
cd56719
Layout of levels using new abstraction seems to work.
tturocy Oct 27, 2025
2b9e872
Remove infoset depths from GUI class.
tturocy Oct 27, 2025
7e3d2e5
Remove max level from GUI class.
tturocy Oct 27, 2025
7233788
Compute next member on demand for now
tturocy Oct 27, 2025
99faaa2
Remove unused maxlevel from new layout
tturocy Oct 27, 2025
3f400f7
Offsets now being computed from the generic layout.
tturocy Oct 27, 2025
d53c89a
Removing unused (and non-existent) includes
tturocy Oct 27, 2025
79df020
Merge branch 'master' into dev_layout
tturocy Nov 10, 2025
9e399c4
remove use of poker.efg in test suite
rahulsavani Nov 12, 2025
eba5da5
myerson_2_card_poker.efg -> stripped_down_poker.efg
rahulsavani Nov 13, 2025
d79174e
added the file tests/test_games/stripped_down_poker.efg
rahulsavani Nov 13, 2025
4b0a3dc
Fred/Alice -> Alice/Bob; new infoset labels
rahulsavani Nov 17, 2025
040788c
Merge branch 'de-duplicate_simple_poker_game_in_test_suite' into stri…
edwardchalstrey1 Nov 17, 2025
346ce45
update game title in tutorial 3
edwardchalstrey1 Nov 17, 2025
a96b03f
change action labels to Bet/Call and Fold
edwardchalstrey1 Nov 17, 2025
6487d31
Merge branch 'master' into openspiel-tutorial
edwardchalstrey1 Nov 17, 2025
6b75c08
finish merge
edwardchalstrey1 Nov 17, 2025
5381d6c
merge fixes
edwardchalstrey1 Nov 17, 2025
f351a2e
merge fixes
edwardchalstrey1 Nov 17, 2025
fa3d22d
merge fixes
edwardchalstrey1 Nov 17, 2025
94ac72d
merge fixes
edwardchalstrey1 Nov 17, 2025
5cd6010
Move openspiel tutorial to its own section
edwardchalstrey1 Nov 17, 2025
82b5dd7
Add requirements file and update installation instructions in running…
edwardchalstrey1 Nov 17, 2025
69a4d2f
fix link
edwardchalstrey1 Nov 17, 2025
aa8247b
level of understanding
edwardchalstrey1 Nov 17, 2025
15ac613
single requirements for doc and tutorials
edwardchalstrey1 Nov 18, 2025
98373ca
refactor: streamline notebook collection in test suite to collect all…
edwardchalstrey1 Nov 18, 2025
31f6c42
make prisoners dilemma game in this nb
edwardchalstrey1 Nov 18, 2025
ecfb153
rename to stripped-down poker
edwardchalstrey1 Nov 18, 2025
5aa3450
update references
edwardchalstrey1 Nov 18, 2025
d040af9
match outcome labels to test game
edwardchalstrey1 Nov 18, 2025
3999934
add full stops
edwardchalstrey1 Nov 18, 2025
10f25bc
remove "Betd" typo
edwardchalstrey1 Nov 18, 2025
1d9de38
add nodes to same infoset with passing a list of nodes to append_move
edwardchalstrey1 Nov 18, 2025
8e87be2
consistent colons
edwardchalstrey1 Nov 18, 2025
708db39
new name for turorial 03
edwardchalstrey1 Nov 18, 2025
66f6dc1
Merge branch 'stripped-down-poker' into openspiel-tutorial
edwardchalstrey1 Nov 18, 2025
e049629
bump openspiel version to 1.6.9
edwardchalstrey1 Nov 18, 2025
e3591f9
tidy notebook
edwardchalstrey1 Nov 19, 2025
d6dcabd
colon consistency
edwardchalstrey1 Nov 19, 2025
db88be7
fix title
edwardchalstrey1 Nov 19, 2025
36ec9df
Merge branch 'master' into dev_layout
tturocy Nov 19, 2025
3185b11
Move UI-independent tree layout to game
tturocy Nov 19, 2025
2cc3997
Rudimentary exposure of tree layout in Python
tturocy Nov 19, 2025
442188b
Rudimentary exposure of tree layout in Python.
tturocy Nov 19, 2025
a723559
Merge branch 'openspiel-tutorial' into integrate-drawtree
edwardchalstrey1 Nov 20, 2025
6e1b218
current and expected API behavior.
edwardchalstrey1 Nov 20, 2025
e9a43da
temp commit to see if draw_tree renders correctly
edwardchalstrey1 Nov 20, 2025
7f96107
Merge remote-tracking branch 'origin/dev_layout' into integrate-drawtree
edwardchalstrey1 Nov 20, 2025
f450f3e
Clarify installation instructions for the draw_tree package in runnin…
edwardchalstrey1 Nov 20, 2025
545a804
Merge branch 'master' into integrate-drawtree
edwardchalstrey1 Nov 20, 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
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ _build
build
*.egg-info
*.pyc
*.so

config.guess
config.sub
Expand All @@ -39,6 +40,5 @@ dist
.venv
*.dmg
Gambit.app/*
*.so
doc/tutorials/games/*.nfg
doc/tutorials/games/*.efg
*.ef
doc/tutorials/*.ipynb_checkpoints
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build:
apt_packages:
- libgmp-dev
- pandoc
- texlive-full

python:
install:
Expand Down
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ game_SOURCES = \
src/games/file.cc \
src/games/writer.cc \
src/games/writer.h \
src/games/layout.cc \
src/games/layout.h \
${agg_SOURCES} \
src/games/nash.h

Expand Down
13 changes: 12 additions & 1 deletion doc/pygambit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ They are numbered in the order they should be read.
tutorials/running_locally
tutorials/01_quickstart
tutorials/02_extensive_form
tutorials/03_poker
tutorials/03_stripped_down_poker

Advanced user tutorials
-----------------------
Expand All @@ -44,6 +44,17 @@ Advanced tutorials:
tutorials/advanced_tutorials/quantal_response
.. pygambit.external_programs

Interoperability tutorials
--------------------------

These tutorials demonstrate how to use PyGambit alongside other game-theoretic software packages.
These tutorials assume you have read the new user tutorials and are familiar with the PyGambit API, however they do not assume prior knowledge of the other software packages or an advanced understanding of Game Theory:

.. toctree::
:maxdepth: 2

tutorials/interoperability_tutorials/openspiel

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

Expand Down
2 changes: 2 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ ipython==9.4.0
matplotlib==3.10.5
pickleshare==0.7.5
jupyter==1.1.1
open_spiel==1.6.9
draw-tree @ git+https://github.com/gambitproject/draw_tree.git@main
73 changes: 56 additions & 17 deletions doc/tutorials/02_extensive_form.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 12,
"id": "5946289b",
"metadata": {},
"outputs": [],
"source": [
"import pygambit as gbt"
"import pygambit as gbt\n",
"from draw_tree import draw_tree"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 13,
"id": "91ed4dfb",
"metadata": {},
"outputs": [],
Expand All @@ -60,7 +61,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 14,
"id": "3cd94917",
"metadata": {},
"outputs": [
Expand All @@ -70,7 +71,7 @@
"0"
]
},
"execution_count": 3,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -91,7 +92,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 15,
"id": "5d27a07a",
"metadata": {},
"outputs": [
Expand All @@ -101,7 +102,7 @@
"2"
]
},
"execution_count": 4,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -125,7 +126,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 16,
"id": "47c4a31b",
"metadata": {},
"outputs": [],
Expand All @@ -151,7 +152,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 17,
"id": "716e9b9a",
"metadata": {},
"outputs": [],
Expand All @@ -175,7 +176,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 18,
"id": "695b1aad",
"metadata": {},
"outputs": [],
Expand All @@ -199,7 +200,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 19,
"id": "0704ef86",
"metadata": {},
"outputs": [],
Expand All @@ -220,7 +221,30 @@
"source": [
"Nodes without an outcome attached are assumed to have payoffs of zero for all players.\n",
"\n",
"Therefore, adding the outcome to this latter terminal node is not strictly necessary in Gambit, but it is useful to be explicit for readability."
"Therefore, adding the outcome to this latter terminal node is not strictly necessary in Gambit, but it is useful to be explicit for readability.\n",
"\n",
"Visualizing an extensive form game\n",
"----------------------------------\n",
"\n",
"We can visualize the game tree using the `draw_tree` package, which accepts a Gambit game object."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9e1efa88",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/bin/sh: pdflatex: command not found\n"
]
}
],
"source": [
"# draw_tree(g)"
]
},
{
Expand All @@ -239,12 +263,13 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "37c51152",
"metadata": {},
"outputs": [],
"source": [
"# g.to_efg(\"trust_game.efg\")"
"g.to_efg(\"trust_game.efg\")\n",
"draw_tree(\"trust_game.efg\")"
]
},
{
Expand All @@ -257,12 +282,26 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 21,
"id": "0d86a750",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/html": [
"Game(title='One-shot trust game, after Kreps (1990)')"
],
"text/plain": [
"Game(title='One-shot trust game, after Kreps (1990)')"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# gbt.read_efg(\"trust_game.efg\")"
"gbt.read_efg(\"trust_game.efg\")"
]
},
{
Expand Down
14 changes: 14 additions & 0 deletions doc/tutorials/games/one_card_poker.efg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
EFG 2 R "One card poker" { "Alice" "Bob" }
""

c "" 1 "" { "King" 1/2 "Queen" 1/2 } 0
p "King" 1 1 "" { "Raise" "Fold" } 0
p "Raise" 2 1 "" { "Meet" "Pass" } 0
t "Meet" 1 "Alice wins big" { 2, -2 }
t "Pass" 2 "Alice wins" { 1, -1 }
t "Fold" 4 "Bob wins" { -1, 1 }
p "Queen" 1 2 "" { "Raise" "Fold" } 0
p "Raise" 2 1 "" { "Meet" "Pass" } 0
t "Meet" 3 "Bob wins big" { -2, 2 }
t "Pass" 2 "Alice wins" { 1, -1 }
t "Fold" 4 "Bob wins" { -1, 1 }
58 changes: 58 additions & 0 deletions doc/tutorials/games/tiny_hanabi.efg
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
EFG 2 R "tiny_hanabi()" { "Pl0" "Pl1" }
""

c "" 1 "" { "d0" 0.5000000000000000 "d1" 0.5000000000000000 } 0
c "p0:d0" 2 "" { "d0" 0.5000000000000000 "d1" 0.5000000000000000 } 0
p "" 1 1 "" { "p0a0" "p0a1" "p0a2" } 0
p "" 2 1 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 1 "" { 10.0, 10.0 }
t "" 2 "" { 0.0, 0.0 }
t "" 3 "" { 0.0, 0.0 }
p "" 2 2 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 4 "" { 4.0, 4.0 }
t "" 5 "" { 8.0, 8.0 }
t "" 6 "" { 4.0, 4.0 }
p "" 2 3 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 7 "" { 10.0, 10.0 }
t "" 8 "" { 0.0, 0.0 }
t "" 9 "" { 0.0, 0.0 }
p "" 1 1 "" { "p0a0" "p0a1" "p0a2" } 0
p "" 2 4 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 10 "" { 0.0, 0.0 }
t "" 11 "" { 0.0, 0.0 }
t "" 12 "" { 10.0, 10.0 }
p "" 2 5 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 13 "" { 4.0, 4.0 }
t "" 14 "" { 8.0, 8.0 }
t "" 15 "" { 4.0, 4.0 }
p "" 2 6 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 16 "" { 0.0, 0.0 }
t "" 17 "" { 0.0, 0.0 }
t "" 18 "" { 10.0, 10.0 }
c "p0:d1" 3 "" { "d0" 0.5000000000000000 "d1" 0.5000000000000000 } 0
p "" 1 2 "" { "p0a0" "p0a1" "p0a2" } 0
p "" 2 1 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 19 "" { 0.0, 0.0 }
t "" 20 "" { 0.0, 0.0 }
t "" 21 "" { 10.0, 10.0 }
p "" 2 2 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 22 "" { 4.0, 4.0 }
t "" 23 "" { 8.0, 8.0 }
t "" 24 "" { 4.0, 4.0 }
p "" 2 3 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 25 "" { 0.0, 0.0 }
t "" 26 "" { 0.0, 0.0 }
t "" 27 "" { 0.0, 0.0 }
p "" 1 2 "" { "p0a0" "p0a1" "p0a2" } 0
p "" 2 4 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 28 "" { 10.0, 10.0 }
t "" 29 "" { 0.0, 0.0 }
t "" 30 "" { 0.0, 0.0 }
p "" 2 5 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 31 "" { 4.0, 4.0 }
t "" 32 "" { 8.0, 8.0 }
t "" 33 "" { 4.0, 4.0 }
p "" 2 6 "" { "p1a0" "p1a1" "p1a2" } 0
t "" 34 "" { 10.0, 10.0 }
t "" 35 "" { 0.0, 0.0 }
t "" 36 "" { 0.0, 0.0 }
Loading
Loading