diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 648ee0bb4..199dce7ca 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -10,7 +10,7 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name strategy: matrix: - python-version: ['3.9', '3.13'] + python-version: ['3.10', '3.14'] steps: - uses: actions/checkout@v5 @@ -39,7 +39,7 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] steps: - uses: actions/checkout@v4 @@ -63,7 +63,7 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] steps: - uses: actions/checkout@v4 @@ -88,7 +88,7 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] steps: - uses: actions/checkout@v5 diff --git a/.gitignore b/.gitignore index 5e3055af4..d2f3fe579 100644 --- a/.gitignore +++ b/.gitignore @@ -43,5 +43,8 @@ Gambit.app/* *.so doc/tutorials/games/*.nfg doc/tutorials/games/*.efg +doc/tutorials/*.png *.dmg Gambit.app/* +*.ipynb_checkpoints +*.ef diff --git a/.readthedocs.yml b/.readthedocs.yml index af921b438..73522dfdf 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,10 +8,11 @@ formats: all build: os: ubuntu-22.04 tools: - python: "3.13" + python: "3.14" apt_packages: - libgmp-dev - pandoc + - texlive-full python: install: diff --git a/doc/requirements.txt b/doc/requirements.txt index 1bb9e99fa..2daeedc58 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -10,3 +10,4 @@ matplotlib pickleshare jupyter open_spiel; sys_platform != 'win32' +draw-tree @ git+https://github.com/gambitproject/draw_tree.git@v0.2.0 diff --git a/doc/tutorials/02_extensive_form.ipynb b/doc/tutorials/02_extensive_form.ipynb index 4fa2094bc..528970c61 100644 --- a/doc/tutorials/02_extensive_form.ipynb +++ b/doc/tutorials/02_extensive_form.ipynb @@ -24,7 +24,9 @@ "- If the Seller chooses **Honor**, both players receive payoffs of `1`;\n", "- If the Seller chooses **Abuse**, the Buyer receives a payoff of `-1` and the Seller receives a payoff of `2`.\n", "\n", - "We create a game with an extensive representation using `Game.new_tree`:" + "In addition to `pygambit`, this tutorial introduces the `draw_tree` package, which can be used to draw extensive form games in Python.\n", + "If you're running this tutorial on your local machine, you'll need to install the requirements for [draw_tree](https://github.com/gambitproject/draw_tree), which include LaTeX, in order to run the `draw_tree` cells.\n", + "Another option for visualising extensive form games is to install the Gambit GUI and use it to load the EFG file generated at the end of this tutorial." ] }, { @@ -34,9 +36,19 @@ "metadata": {}, "outputs": [], "source": [ + "from draw_tree import draw_tree\n", + "\n", "import pygambit as gbt" ] }, + { + "cell_type": "markdown", + "id": "407eb819-9481-42e4-9886-3e87e7fec8af", + "metadata": {}, + "source": [ + "We create a game with an extensive representation using `Game.new_tree`:" + ] + }, { "cell_type": "code", "execution_count": 2, @@ -66,8 +78,26 @@ "outputs": [ { "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], "text/plain": [ - "0" + "" ] }, "execution_count": 3, @@ -76,7 +106,7 @@ } ], "source": [ - "len(g.root.children)" + "draw_tree(g)" ] }, { @@ -94,25 +124,151 @@ "execution_count": 4, "id": "5d27a07a", "metadata": {}, + "outputs": [], + "source": [ + "g.append_move(\n", + " g.root, # This is the node to append the move to\n", + " player=\"Buyer\",\n", + " actions=[\"Trust\", \"Not trust\"]\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "45638fda-7e25-4c8e-b709-24b05780581b", + "metadata": {}, "outputs": [ { "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], "text/plain": [ - "2" + "" ] }, - "execution_count": 4, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "g.append_move(\n", - " g.root, # This is the node to append the move to\n", - " player=\"Buyer\",\n", - " actions=[\"Trust\", \"Not trust\"]\n", - ")\n", - "len(g.root.children)" + "draw_tree(g)" ] }, { @@ -125,7 +281,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "47c4a31b", "metadata": {}, "outputs": [], @@ -137,6 +293,205 @@ ")" ] }, + { + "cell_type": "code", + "execution_count": 7, + "id": "ce41e9fe-cca4-46fb-8e9d-b2c27342e5ef", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "draw_tree(g)" + ] + }, { "cell_type": "markdown", "id": "382ba37d", @@ -151,7 +506,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "id": "716e9b9a", "metadata": {}, "outputs": [], @@ -165,6 +520,181 @@ ")" ] }, + { + "cell_type": "code", + "execution_count": 9, + "id": "b3408c55-714e-4a6f-b598-e338839442e4", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "draw_tree(g)" + ] + }, { "cell_type": "markdown", "id": "df082b10", @@ -175,7 +705,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 10, "id": "695b1aad", "metadata": {}, "outputs": [], @@ -189,6 +719,195 @@ ")" ] }, + { + "cell_type": "code", + "execution_count": 11, + "id": "09bedb3a-aac7-46e6-ae93-c47932c746d4", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "draw_tree(g)" + ] + }, { "cell_type": "markdown", "id": "48335eb8", @@ -199,7 +918,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 12, "id": "0704ef86", "metadata": {}, "outputs": [], @@ -213,6 +932,203 @@ ")" ] }, + { + "cell_type": "code", + "execution_count": 13, + "id": "cba0e562-2989-4dae-a0f0-b121635ba032", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "draw_tree(g)" + ] + }, { "cell_type": "markdown", "id": "09ef5e2e", @@ -234,12 +1150,13 @@ "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 Trust game (extensive-form) to the `.efg` format." + "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": 9, + "execution_count": 14, "id": "37c51152", "metadata": {}, "outputs": [], @@ -257,7 +1174,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 15, "id": "0d86a750", "metadata": {}, "outputs": [], @@ -267,41 +1184,50 @@ }, { "cell_type": "markdown", - "id": "be034836", + "id": "182f2424-274e-4044-84ff-3323cd70ec68", "metadata": {}, "source": [ - "#### References\n", - "\n", - "Kreps, D. (1990) \"Corporate Culture and Economic Theory.\" In J. Alt and K. Shepsle, eds., *Perspectives on Positive Political Economy*, Cambridge University Press." + "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": "1c1d7a22", + "execution_count": 16, + "id": "1bab777f-8a0b-4f1e-9c0c-270690288243", "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "Game(title='One-shot trust game, after Kreps (1990)')" - ], - "text/plain": [ - "Game(title='One-shot trust game, after Kreps (1990)')" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ - "g" + "# 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": 17, + "id": "2b715221-e427-4092-ad2f-9f4f2b548fa4", + "metadata": {}, + "outputs": [], + "source": [ + "# from IPython.display import Image\n", + "# Image(trust_game_png)" + ] + }, + { + "cell_type": "markdown", + "id": "be034836", + "metadata": {}, + "source": [ + "#### References\n", + "\n", + "Kreps, D. (1990) \"Corporate Culture and Economic Theory.\" In J. Alt and K. Shepsle, eds., *Perspectives on Positive Political Economy*, Cambridge University Press." ] } ], "metadata": { "kernelspec": { - "display_name": "gambitvenv313", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/doc/tutorials/03_stripped_down_poker.ipynb b/doc/tutorials/03_stripped_down_poker.ipynb index 647f4bf35..16507d6ec 100644 --- a/doc/tutorials/03_stripped_down_poker.ipynb +++ b/doc/tutorials/03_stripped_down_poker.ipynb @@ -30,7 +30,11 @@ " - If he chooses to Call, he adds another $1 to the pot.\n", "- There is then a showdown, in which Alice reveals her card.\n", " - If she has a King, then she wins the pot.\n", - " - If she has a Queen, then Bob wins the pot." + " - If she has a Queen, then Bob wins the pot.\n", + "\n", + "In addition to `pygambit`, this tutorial uses the `draw_tree` package, which can be used to draw extensive form games in Python.\n", + "If you're running this tutorial on your local machine, you'll need to install the requirements for [draw_tree](https://github.com/gambitproject/draw_tree), which include LaTeX, in order to run the `draw_tree` cells.\n", + "Another option for visualising extensive form games is to install the Gambit GUI and use it to load a saved EFG file." ] }, { @@ -40,6 +44,8 @@ "metadata": {}, "outputs": [], "source": [ + "from draw_tree import draw_tree\n", + "\n", "import pygambit as gbt" ] }, @@ -122,6 +128,171 @@ ")" ] }, + { + "cell_type": "code", + "execution_count": 5, + "id": "867cb1d8-7a5d-45d1-9349-9bbc2a4e2344", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "draw_tree(g)" + ] + }, { "cell_type": "markdown", "id": "5cf73f0a", @@ -138,7 +309,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "0e3bb5ef", "metadata": {}, "outputs": [], @@ -151,6 +322,302 @@ " )" ] }, + { + "cell_type": "code", + "execution_count": 7, + "id": "0c522c2d-992e-48b6-a1f8-0696d33cdbe0", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "draw_tree(g)" + ] + }, { "cell_type": "markdown", "id": "4c8d0343", @@ -171,7 +638,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "id": "dbfa7035", "metadata": {}, "outputs": [], @@ -183,6 +650,351 @@ ")" ] }, + { + "cell_type": "code", + "execution_count": 9, + "id": "e85b3346-2fea-4a73-aa72-9efb436c68c1", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "draw_tree(g)" + ] + }, { "cell_type": "markdown", "id": "c4eeb65f", @@ -198,7 +1010,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 10, "id": "87c988be", "metadata": {}, "outputs": [], @@ -219,7 +1031,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 11, "id": "29aa60a0", "metadata": {}, "outputs": [], @@ -239,6 +1051,356 @@ "g.set_outcome(g.root.children[\"Queen\"].children[\"Bet\"].children[\"Fold\"], win)" ] }, + { + "cell_type": "code", + "execution_count": 12, + "id": "fdee7b53-7820-44df-9d17-d15d0b9667aa", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "draw_tree(g)" + ] + }, { "cell_type": "markdown", "id": "17eb6af5", @@ -252,7 +1414,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 13, "id": "4d92c8d9", "metadata": {}, "outputs": [ @@ -262,7 +1424,7 @@ "NashComputationResult(method='lcp', rational=True, use_strategic=False, equilibria=[[[[Rational(1, 1), Rational(0, 1)], [Rational(1, 3), Rational(2, 3)]], [[Rational(2, 3), Rational(1, 3)]]]], parameters={'stop_after': 0, 'max_depth': 0})" ] }, - "execution_count": 9, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -286,7 +1448,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 14, "id": "9967d6f7", "metadata": {}, "outputs": [ @@ -313,7 +1475,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "id": "3293e818", "metadata": {}, "outputs": [ @@ -323,7 +1485,7 @@ "pygambit.gambit.MixedBehaviorProfileRational" ] }, - "execution_count": 11, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -344,7 +1506,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 16, "id": "4cf38264", "metadata": {}, "outputs": [ @@ -354,7 +1516,7 @@ "pygambit.gambit.MixedBehavior" ] }, - "execution_count": 12, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -365,7 +1527,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 17, "id": "85e7fdda", "metadata": {}, "outputs": [ @@ -378,7 +1540,7 @@ "[[Rational(1, 1), Rational(0, 1)], [Rational(1, 3), Rational(2, 3)]]" ] }, - "execution_count": 13, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -403,7 +1565,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 18, "id": "f45a82b6", "metadata": {}, "outputs": [ @@ -435,7 +1597,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 19, "id": "83bbd3e5", "metadata": {}, "outputs": [ @@ -468,7 +1630,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 20, "id": "6bf51b38", "metadata": {}, "outputs": [ @@ -481,7 +1643,7 @@ "[[Rational(2, 3), Rational(1, 3)]]" ] }, - "execution_count": 16, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -504,7 +1666,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 21, "id": "2966e700", "metadata": {}, "outputs": [ @@ -517,7 +1679,7 @@ "Rational(2, 3)" ] }, - "execution_count": 17, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -536,7 +1698,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 22, "id": "f5a7f110", "metadata": {}, "outputs": [ @@ -549,7 +1711,7 @@ "Rational(2, 3)" ] }, - "execution_count": 18, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -570,7 +1732,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 23, "id": "a7d3816d", "metadata": {}, "outputs": [ @@ -605,7 +1767,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 24, "id": "4a54b20c", "metadata": {}, "outputs": [ @@ -638,7 +1800,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 25, "id": "b250c1cd", "metadata": {}, "outputs": [ @@ -651,7 +1813,7 @@ "Rational(2, 3)" ] }, - "execution_count": 21, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -670,7 +1832,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 26, "id": "6f01846b", "metadata": {}, "outputs": [ @@ -702,7 +1864,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 27, "id": "5079d231", "metadata": {}, "outputs": [ @@ -715,7 +1877,7 @@ "Rational(1, 3)" ] }, - "execution_count": 23, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -726,7 +1888,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 28, "id": "c55f2c7a", "metadata": {}, "outputs": [ @@ -739,7 +1901,7 @@ "Rational(-1, 3)" ] }, - "execution_count": 24, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -766,7 +1928,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 29, "id": "d4ecff88", "metadata": {}, "outputs": [ @@ -776,7 +1938,7 @@ "['11', '12', '21', '22']" ] }, - "execution_count": 25, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -800,7 +1962,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 30, "id": "24e4b6e8", "metadata": {}, "outputs": [ @@ -810,7 +1972,7 @@ "NashComputationResult(method='gnm', rational=False, use_strategic=True, equilibria=[[[0.33333333333866677, 0.6666666666613335, 0.0, 0.0], [0.6666666666559997, 0.3333333333440004]]], parameters={'perturbation': [[1.0, 0.0, 0.0, 0.0], [1.0, 0.0]], 'end_lambda': -10.0, 'steps': 100, 'local_newton_interval': 3, 'local_newton_maxits': 10})" ] }, - "execution_count": 26, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -832,7 +1994,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 31, "id": "d9ffb4b8", "metadata": {}, "outputs": [ @@ -842,7 +2004,7 @@ "pygambit.gambit.MixedStrategyProfileDouble" ] }, - "execution_count": 27, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -864,7 +2026,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 32, "id": "56e2f847", "metadata": {}, "outputs": [ @@ -917,7 +2079,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 33, "id": "d18a91f0", "metadata": {}, "outputs": [ @@ -983,7 +2145,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 34, "id": "0c55f745", "metadata": {}, "outputs": [ @@ -993,7 +2155,7 @@ "(Rational(2, 1), Rational(-2, 1))" ] }, - "execution_count": 30, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -1015,7 +2177,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 35, "id": "101598c6", "metadata": {}, "outputs": [ @@ -1025,7 +2187,7 @@ "1" ] }, - "execution_count": 31, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -1037,7 +2199,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 36, "id": "9b142728", "metadata": {}, "outputs": [ @@ -1047,7 +2209,7 @@ "3.987411578698641e-08" ] }, - "execution_count": 32, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -1068,7 +2230,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 37, "id": "ff405409", "metadata": {}, "outputs": [ @@ -1078,7 +2240,7 @@ "9.968528946746602e-09" ] }, - "execution_count": 33, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -1099,7 +2261,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 38, "id": "31b0143c", "metadata": {}, "outputs": [ @@ -1109,7 +2271,7 @@ "9.395259956013202e-05" ] }, - "execution_count": 34, + "execution_count": 38, "metadata": {}, "output_type": "execute_result" } @@ -1128,7 +2290,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 39, "id": "7cfba34a", "metadata": {}, "outputs": [ @@ -1136,8 +2298,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 9.9 ms, sys: 230 μs, total: 10.1 ms\n", - "Wall time: 10.1 ms\n" + "CPU times: user 8.72 ms, sys: 143 μs, total: 8.86 ms\n", + "Wall time: 8.85 ms\n" ] }, { @@ -1146,7 +2308,7 @@ "NashComputationResult(method='logit', rational=False, use_strategic=False, equilibria=[[[[1.0, 0.0], [0.3338351656285655, 0.666164834417892]], [[0.6670407651644307, 0.3329592348608147]]]], parameters={'first_step': 0.03, 'max_accel': 1.1})" ] }, - "execution_count": 35, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } @@ -1158,7 +2320,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 40, "id": "6f1809a7", "metadata": {}, "outputs": [ @@ -1166,8 +2328,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 18.4 ms, sys: 210 μs, total: 18.6 ms\n", - "Wall time: 18.6 ms\n" + "CPU times: user 16.7 ms, sys: 234 μs, total: 17 ms\n", + "Wall time: 17 ms\n" ] }, { @@ -1176,7 +2338,7 @@ "NashComputationResult(method='logit', rational=False, use_strategic=False, equilibria=[[[[1.0, 0.0], [0.33333338649882943, 0.6666666135011706]], [[0.6666667065407631, 0.3333332934592369]]]], parameters={'first_step': 0.03, 'max_accel': 1.1})" ] }, - "execution_count": 36, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -1198,7 +2360,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 41, "id": "414b6f65", "metadata": {}, "outputs": [ @@ -1208,7 +2370,7 @@ "5.509533871672634e-05" ] }, - "execution_count": 37, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } @@ -1230,7 +2392,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 42, "id": "a892dc2b", "metadata": {}, "outputs": [ @@ -1240,7 +2402,7 @@ "5.509533871672634e-05" ] }, - "execution_count": 38, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -1271,7 +2433,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 43, "id": "2f79695a", "metadata": {}, "outputs": [ @@ -1281,7 +2443,7 @@ "[Rational(1, 3), Rational(1, 3), Rational(1, 3)]" ] }, - "execution_count": 39, + "execution_count": 43, "metadata": {}, "output_type": "execute_result" } @@ -1305,7 +2467,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 44, "id": "5de6acb2", "metadata": {}, "outputs": [ @@ -1315,7 +2477,7 @@ "[Rational(1, 4), Rational(1, 2), Rational(1, 4)]" ] }, - "execution_count": 40, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -1338,7 +2500,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 45, "id": "c47d2ab6", "metadata": {}, "outputs": [ @@ -1348,7 +2510,7 @@ "[Decimal('0.25'), Decimal('0.50'), Decimal('0.25')]" ] }, - "execution_count": 41, + "execution_count": 45, "metadata": {}, "output_type": "execute_result" } @@ -1375,7 +2537,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 46, "id": "04329084", "metadata": {}, "outputs": [ @@ -1385,7 +2547,7 @@ "[Rational(1, 4), Rational(1, 2), Rational(1, 4)]" ] }, - "execution_count": 42, + "execution_count": 46, "metadata": {}, "output_type": "execute_result" } @@ -1397,7 +2559,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 47, "id": "9015e129", "metadata": {}, "outputs": [ @@ -1407,7 +2569,7 @@ "[Decimal('0.25'), Decimal('0.50'), Decimal('0.25')]" ] }, - "execution_count": 43, + "execution_count": 47, "metadata": {}, "output_type": "execute_result" } @@ -1432,7 +2594,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 48, "id": "0a019aa5", "metadata": {}, "outputs": [ @@ -1442,7 +2604,7 @@ "[Decimal('0.25'), Decimal('0.5'), Decimal('0.25')]" ] }, - "execution_count": 44, + "execution_count": 48, "metadata": {}, "output_type": "execute_result" } @@ -1462,7 +2624,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 49, "id": "1991d288", "metadata": {}, "outputs": [ @@ -1492,7 +2654,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 50, "id": "b1dc37fd", "metadata": {}, "outputs": [ @@ -1502,7 +2664,7 @@ "1.0" ] }, - "execution_count": 46, + "execution_count": 50, "metadata": {}, "output_type": "execute_result" } @@ -1521,7 +2683,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 51, "id": "dc1edea2", "metadata": {}, "outputs": [ @@ -1531,7 +2693,7 @@ "Decimal('0.3333333333333333')" ] }, - "execution_count": 47, + "execution_count": 51, "metadata": {}, "output_type": "execute_result" } @@ -1550,7 +2712,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 52, "id": "1edd90d6", "metadata": {}, "outputs": [ @@ -1560,7 +2722,7 @@ "Decimal('0.9999999999999999')" ] }, - "execution_count": 48, + "execution_count": 52, "metadata": {}, "output_type": "execute_result" } @@ -1594,7 +2756,7 @@ ], "metadata": { "kernelspec": { - "display_name": "gambitvenv313", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, diff --git a/pyproject.toml b/pyproject.toml index fb4f80b43..a58c8ba72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "pygambit" version = "16.4.0" description = "The package for computation in game theory" readme = "src/README.rst" -requires-python = ">=3.9" +requires-python = ">=3.10" license = "GPL-2.0-or-later" authors = [ {name = "Theodore Turocy", email = "ted.turocy@gmail.com"}, @@ -17,11 +17,11 @@ keywords = ["game theory", "Nash equilibrium"] classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: Mathematics" ]