pygambit 16.3.2__tar.gz → 16.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pygambit-16.3.2/src/pygambit.egg-info → pygambit-16.4.1}/PKG-INFO +11 -22
- {pygambit-16.3.2 → pygambit-16.4.1}/README.md +3 -0
- pygambit-16.4.1/pyproject.toml +85 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/setup.py +0 -37
- pygambit-16.4.1/src/core/array.h +106 -0
- pygambit-16.4.1/src/core/core.h +34 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/function.cc +15 -12
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/function.h +7 -7
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/integer.cc +123 -124
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/integer.h +4 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/list.h +6 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/matrix.cc +2 -2
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/matrix.h +4 -8
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/matrix.imp +6 -53
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/rational.cc +12 -12
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/rational.h +6 -5
- pygambit-16.4.1/src/core/recarray.h +281 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/sqmatrix.cc +2 -2
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/sqmatrix.h +6 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/sqmatrix.imp +1 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/tinyxml.cc +4 -15
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/tinyxml.h +97 -92
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/tinyxmlerror.cc +1 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/core/tinyxmlparser.cc +19 -18
- pygambit-16.4.1/src/core/util.h +96 -0
- pygambit-16.4.1/src/core/vector.h +194 -0
- pygambit-16.4.1/src/gambit.h +39 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/agg.cc +33 -32
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/agg.h +5 -5
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/bagg.cc +7 -7
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/gray.h +6 -14
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/proj_func.h +7 -11
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/trie_map.h +5 -8
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/trie_map.imp +11 -15
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/behavmixed.cc +48 -56
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/behavmixed.h +12 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/behavpure.cc +1 -16
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/behavpure.h +3 -3
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/behavspt.cc +3 -3
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/file.cc +22 -25
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/game.cc +90 -186
- pygambit-16.4.1/src/games/game.h +1033 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/gameagg.cc +51 -48
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/gameagg.h +14 -48
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/gamebagg.cc +51 -59
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/gamebagg.h +13 -40
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/gameexpl.cc +35 -75
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/gameexpl.h +8 -30
- pygambit-16.4.1/src/games/gameobject.h +219 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/gametable.cc +135 -119
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/gametable.h +12 -16
- pygambit-16.4.1/src/games/gametree.cc +1255 -0
- pygambit-16.4.1/src/games/gametree.h +185 -0
- pygambit-16.4.1/src/games/nash.cc +203 -0
- pygambit-16.4.1/src/games/nash.h +79 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/stratmixed.h +43 -28
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/stratpure.cc +6 -63
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/stratpure.h +17 -41
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/stratspt.cc +3 -3
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/stratspt.h +2 -2
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/writer.cc +29 -29
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/__init__.py +1 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/action.pxi +10 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/behavmixed.pxi +12 -10
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/gambit.cpp +17992 -15764
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/gambit.pxd +217 -198
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/gambit.pyx +1 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/game.pxi +204 -229
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/infoset.pxi +30 -7
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/nash.pxi +27 -28
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/nashlrs.py +10 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/nashphc.py +10 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/node.pxi +14 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/outcome.pxi +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/player.pxi +24 -9
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/strategy.pxi +43 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/stratmixed.pxi +12 -10
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/stratspt.pxi +21 -21
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/util.h +7 -54
- {pygambit-16.3.2 → pygambit-16.4.1/src/pygambit.egg-info}/PKG-INFO +11 -22
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit.egg-info/SOURCES.txt +4 -9
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit.egg-info/requires.txt +0 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enummixed/clique.cc +9 -12
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enummixed/clique.h +3 -5
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enummixed/enummixed.cc +34 -39
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enummixed/enummixed.h +12 -34
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/behavextend.cc +33 -39
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/behavextend.h +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/efgpoly.cc +11 -11
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/enumpoly.h +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/gameseq.cc +3 -2
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/gameseq.h +10 -13
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/indexproduct.h +2 -2
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/ndarray.h +7 -5
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/nfgpoly.cc +9 -10
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/poly.h +1 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/poly.imp +7 -7
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/polyfeasible.h +3 -3
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/polypartial.imp +4 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/polysolver.cc +8 -8
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/polysolver.h +2 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpure/enumpure.h +40 -46
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gnm/gnm.cc +13 -12
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gnm/gnm.h +5 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/aggame.cc +15 -16
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/aggame.h +3 -5
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/cmatrix.cc +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/cmatrix.h +25 -55
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/gnm.cc +6 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/gnmgame.cc +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/gnmgame.h +3 -5
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/gtracer.cc +19 -14
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/gtracer.h +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/ipa.cc +13 -14
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/nfgame.cc +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/gtracer/nfgame.h +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/ipa/ipa.cc +10 -10
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/ipa/ipa.h +5 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/lcp/efglcp.cc +60 -29
- pygambit-16.4.1/src/solvers/lcp/lcp.h +42 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/lcp/nfglcp.cc +58 -32
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/liap/efgliap.cc +8 -10
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/liap/liap.h +4 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/liap/nfgliap.cc +6 -7
- pygambit-16.4.1/src/solvers/linalg/btableau.h +316 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lemketab.cc +2 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lemketab.h +7 -15
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lemketab.imp +13 -117
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lhtab.cc +2 -6
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lhtab.h +23 -28
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lhtab.imp +7 -39
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lpsolve.cc +2 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lpsolve.h +9 -18
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lpsolve.imp +75 -120
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lptab.h +3 -11
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lptab.imp +21 -32
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/ludecomp.h +5 -5
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/ludecomp.imp +17 -17
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/tableau.cc +47 -181
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/tableau.h +22 -44
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/vertenum.h +2 -3
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/vertenum.imp +4 -4
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/logit/efglogit.cc +23 -29
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/logit/logbehav.h +1 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/logit/logbehav.imp +24 -35
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/logit/nfglogit.cc +21 -27
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/logit/path.cc +17 -17
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/logit/path.h +2 -2
- pygambit-16.4.1/src/solvers/lp/lp.cc +277 -0
- pygambit-16.3.2/src/solvers/linalg/btableau.cc → pygambit-16.4.1/src/solvers/lp/lp.h +16 -13
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/nashsupport/efgsupport.cc +1 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/nashsupport/nfgsupport.cc +11 -9
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/simpdiv/simpdiv.cc +76 -38
- pygambit-16.4.1/src/solvers/simpdiv/simpdiv.h +43 -0
- pygambit-16.4.1/tests/test_actions.py +241 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_behav.py +14 -14
- pygambit-16.4.1/tests/test_extensive.py +394 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_file.py +33 -15
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_game_resolve.py +1 -1
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_infosets.py +16 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_io.py +30 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_nash.py +11 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_node.py +419 -5
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_players.py +10 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_strategic.py +1 -1
- pygambit-16.3.2/pyproject.toml +0 -35
- pygambit-16.3.2/src/core/array.h +0 -285
- pygambit-16.3.2/src/core/recarray.h +0 -458
- pygambit-16.3.2/src/core/vector.h +0 -167
- pygambit-16.3.2/src/gambit.h +0 -156
- pygambit-16.3.2/src/games/game.h +0 -688
- pygambit-16.3.2/src/games/gameobject.h +0 -212
- pygambit-16.3.2/src/games/gametree.cc +0 -1249
- pygambit-16.3.2/src/games/gametree.h +0 -327
- pygambit-16.3.2/src/games/nash.cc +0 -399
- pygambit-16.3.2/src/games/nash.h +0 -246
- pygambit-16.3.2/src/solvers/lcp/lcp.h +0 -107
- pygambit-16.3.2/src/solvers/linalg/basis.cc +0 -204
- pygambit-16.3.2/src/solvers/linalg/basis.h +0 -98
- pygambit-16.3.2/src/solvers/linalg/bfs.h +0 -83
- pygambit-16.3.2/src/solvers/linalg/btableau.h +0 -148
- pygambit-16.3.2/src/solvers/linalg/btableau.imp +0 -211
- pygambit-16.3.2/src/solvers/lp/efglp.cc +0 -218
- pygambit-16.3.2/src/solvers/lp/efglp.h +0 -58
- pygambit-16.3.2/src/solvers/lp/nfglp.cc +0 -135
- pygambit-16.3.2/src/solvers/lp/nfglp.h +0 -56
- pygambit-16.3.2/src/solvers/simpdiv/simpdiv.h +0 -81
- pygambit-16.3.2/tests/test_actions.py +0 -129
- pygambit-16.3.2/tests/test_extensive.py +0 -102
- {pygambit-16.3.2 → pygambit-16.4.1}/AUTHORS +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/COPYING +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/MANIFEST.in +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/setup.cfg +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/README.rst +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/bagg.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/agg/trie_map.cc +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/behavspt.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/number.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/games/writer.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/enumeration.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/error.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/gameiter.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/levelk.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/nash.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/nash.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/profiles.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/qre.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/supports.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit/util.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit.egg-info/dependency_links.txt +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/pygambit.egg-info/top_level.txt +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/poly.cc +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/polypartial.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/polysystem.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/enumpoly/rectangle.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/lptab.cc +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/linalg/ludecomp.cc +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/logit/logit.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/src/solvers/nashsupport/nashsupport.h +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_game.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_mixed.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_outcomes.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_stratprofiles.py +0 -0
- {pygambit-16.3.2 → pygambit-16.4.1}/tests/test_userguide.py +0 -0
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygambit
|
|
3
|
-
Version: 16.
|
|
3
|
+
Version: 16.4.1
|
|
4
4
|
Summary: The package for computation in game theory
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Project-URL:
|
|
10
|
-
Project-URL:
|
|
11
|
-
Project-URL:
|
|
12
|
-
Keywords: game theory
|
|
5
|
+
Author-email: Theodore Turocy <ted.turocy@gmail.com>, Rahul Savani <rahul.savani@liverpool.ac.uk>
|
|
6
|
+
License-Expression: GPL-2.0-or-later
|
|
7
|
+
Project-URL: Homepage, https://www.gambit-project.org
|
|
8
|
+
Project-URL: Documentation, https://gambitproject.readthedocs.io
|
|
9
|
+
Project-URL: Repository, https://github.com/gambitproject/gambit.git
|
|
10
|
+
Project-URL: Issues, https://github.com/gambitproject/gambit/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/gambitproject/gambit/blob/master/ChangeLog
|
|
12
|
+
Keywords: game theory,Nash equilibrium
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Science/Research
|
|
15
|
-
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
20
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
21
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
22
22
|
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/x-rst
|
|
23
24
|
License-File: COPYING
|
|
24
25
|
License-File: AUTHORS
|
|
25
26
|
Requires-Dist: numpy
|
|
26
27
|
Requires-Dist: scipy
|
|
27
|
-
Requires-Dist: deprecated
|
|
28
|
-
Dynamic: author
|
|
29
|
-
Dynamic: author-email
|
|
30
|
-
Dynamic: classifier
|
|
31
|
-
Dynamic: description
|
|
32
|
-
Dynamic: home-page
|
|
33
|
-
Dynamic: keywords
|
|
34
|
-
Dynamic: license
|
|
35
28
|
Dynamic: license-file
|
|
36
|
-
Dynamic: project-url
|
|
37
|
-
Dynamic: requires-dist
|
|
38
|
-
Dynamic: requires-python
|
|
39
|
-
Dynamic: summary
|
|
40
29
|
|
|
41
30
|
Gambit is a package for representing, manuipulating, and analysing
|
|
42
31
|
finite noncooperative games in extensive and normal form.
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
**Gambit** is the package for doing computation in (non-cooperative) game theory.
|
|
15
15
|
|
|
16
|
+
- See our [documentation](https://gambitproject.readthedocs.io/)
|
|
17
|
+
- Check our [project website](https://www.gambit-project.org/)
|
|
18
|
+
|
|
16
19
|
Gambit provides:
|
|
17
20
|
|
|
18
21
|
- Structures to represent games in extensive and strategic form
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "wheel", "Cython"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pygambit"
|
|
7
|
+
version = "16.4.1"
|
|
8
|
+
description = "The package for computation in game theory"
|
|
9
|
+
readme = "src/README.rst"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "GPL-2.0-or-later"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Theodore Turocy", email = "ted.turocy@gmail.com"},
|
|
14
|
+
{name = "Rahul Savani", email = "rahul.savani@liverpool.ac.uk"}
|
|
15
|
+
]
|
|
16
|
+
keywords = ["game theory", "Nash equilibrium"]
|
|
17
|
+
classifiers=[
|
|
18
|
+
"Development Status :: 5 - Production/Stable",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
26
|
+
"Topic :: Scientific/Engineering :: Mathematics"
|
|
27
|
+
]
|
|
28
|
+
dependencies = [
|
|
29
|
+
"numpy",
|
|
30
|
+
"scipy",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://www.gambit-project.org"
|
|
35
|
+
Documentation = "https://gambitproject.readthedocs.io"
|
|
36
|
+
Repository = "https://github.com/gambitproject/gambit.git"
|
|
37
|
+
Issues = "https://github.com/gambitproject/gambit/issues"
|
|
38
|
+
Changelog = "https://github.com/gambitproject/gambit/blob/master/ChangeLog"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
[tool.ruff]
|
|
42
|
+
line-length = 99
|
|
43
|
+
indent-width = 4
|
|
44
|
+
target-version = "py39"
|
|
45
|
+
include = ["setup.py", "src/pygambit/**/*.py", "tests/**/*.py"]
|
|
46
|
+
exclude = ["contrib/**.py"]
|
|
47
|
+
|
|
48
|
+
[tool.ruff.lint]
|
|
49
|
+
select = [
|
|
50
|
+
"E", # pycodestyle
|
|
51
|
+
"F", # pyflakes
|
|
52
|
+
"UP", # pyupgrade
|
|
53
|
+
"B", # flake8-bugbear
|
|
54
|
+
"SIM", # flake8-simplify
|
|
55
|
+
"I", # isort
|
|
56
|
+
"Q", # prefer double quotes
|
|
57
|
+
]
|
|
58
|
+
ignore = []
|
|
59
|
+
|
|
60
|
+
fixable = ["ALL"]
|
|
61
|
+
unfixable = []
|
|
62
|
+
|
|
63
|
+
# Allow unused variables when underscore-prefixed.
|
|
64
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
65
|
+
|
|
66
|
+
[tool.ruff.format]
|
|
67
|
+
quote-style = "double"
|
|
68
|
+
indent-style = "space"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
[tool.cython-lint]
|
|
72
|
+
max-line-length = 99
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
[tool.pytest.ini_options]
|
|
76
|
+
addopts = "--strict-markers"
|
|
77
|
+
markers = [
|
|
78
|
+
"nash_enummixed_strategy: tests of enummixed_solve in strategies",
|
|
79
|
+
"nash_lcp_strategy: tests of lcp_solve in strategies",
|
|
80
|
+
"nash_lcp_behavior: tests of lcp_solve in behaviors",
|
|
81
|
+
"nash_lp_strategy: tests of lp_solve in strategies",
|
|
82
|
+
"nash_lp_behavior: tests of lp_solve in behaviors",
|
|
83
|
+
"nash: all tests of Nash equilibrium solvers",
|
|
84
|
+
"slow: all time-consuming tests",
|
|
85
|
+
]
|
|
@@ -99,44 +99,7 @@ libgambit = setuptools.Extension(
|
|
|
99
99
|
)
|
|
100
100
|
)
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
def readme():
|
|
104
|
-
with open("src/README.rst") as f:
|
|
105
|
-
return f.read()
|
|
106
|
-
|
|
107
|
-
|
|
108
102
|
setuptools.setup(
|
|
109
|
-
name="pygambit",
|
|
110
|
-
version="16.3.2",
|
|
111
|
-
description="The package for computation in game theory",
|
|
112
|
-
long_description=readme(),
|
|
113
|
-
classifiers=[
|
|
114
|
-
"Development Status :: 5 - Production/Stable",
|
|
115
|
-
"Intended Audience :: Science/Research",
|
|
116
|
-
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
|
|
117
|
-
"Programming Language :: Python :: 3.9",
|
|
118
|
-
"Programming Language :: Python :: 3.10",
|
|
119
|
-
"Programming Language :: Python :: 3.11",
|
|
120
|
-
"Programming Language :: Python :: 3.12",
|
|
121
|
-
"Programming Language :: Python :: Implementation :: CPython",
|
|
122
|
-
"Topic :: Scientific/Engineering :: Mathematics"
|
|
123
|
-
],
|
|
124
|
-
keywords="game theory Nash equilibrium",
|
|
125
|
-
license="GPL2+",
|
|
126
|
-
author="Theodore Turocy",
|
|
127
|
-
author_email="ted.turocy@gmail.com",
|
|
128
|
-
url="https://www.gambit-project.org",
|
|
129
|
-
project_urls={
|
|
130
|
-
"Documentation": "https://gambitproject.readthedocs.io/",
|
|
131
|
-
"Source": "https://github.com/gambitproject/gambit",
|
|
132
|
-
"Tracker": "https://github.com/gambitproject/gambit/issues",
|
|
133
|
-
},
|
|
134
|
-
python_requires=">=3.9",
|
|
135
|
-
install_requires=[
|
|
136
|
-
"numpy",
|
|
137
|
-
"scipy",
|
|
138
|
-
"deprecated",
|
|
139
|
-
],
|
|
140
103
|
libraries=[cppgambit_bimatrix, cppgambit_liap, cppgambit_logit, cppgambit_simpdiv,
|
|
141
104
|
cppgambit_gtracer, cppgambit_enumpoly,
|
|
142
105
|
cppgambit_games, cppgambit_core],
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//
|
|
2
|
+
// This file is part of Gambit
|
|
3
|
+
// Copyright (c) 1994-2025, The Gambit Project (https://www.gambit-project.org)
|
|
4
|
+
//
|
|
5
|
+
// FILE: src/core/array.h
|
|
6
|
+
// A basic bounds-checked array type
|
|
7
|
+
//
|
|
8
|
+
// This program is free software; you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU General Public License as published by
|
|
10
|
+
// the Free Software Foundation; either version 2 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
//
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU General Public License for more details.
|
|
17
|
+
//
|
|
18
|
+
// You should have received a copy of the GNU General Public License
|
|
19
|
+
// along with this program; if not, write to the Free Software
|
|
20
|
+
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
21
|
+
//
|
|
22
|
+
|
|
23
|
+
#ifndef GAMBIT_CORE_ARRAY_H
|
|
24
|
+
#define GAMBIT_CORE_ARRAY_H
|
|
25
|
+
|
|
26
|
+
#include <vector>
|
|
27
|
+
#include <iterator>
|
|
28
|
+
|
|
29
|
+
#include "util.h"
|
|
30
|
+
|
|
31
|
+
namespace Gambit {
|
|
32
|
+
|
|
33
|
+
/// An extension of std::vector with an arbitrary offset index
|
|
34
|
+
///
|
|
35
|
+
/// This is a variation on std::vector, which allows for the index of the first
|
|
36
|
+
/// element to be something other than zero.
|
|
37
|
+
template <class T> class Array {
|
|
38
|
+
protected:
|
|
39
|
+
int m_offset;
|
|
40
|
+
std::vector<T> m_data;
|
|
41
|
+
|
|
42
|
+
public:
|
|
43
|
+
using iterator = typename std::vector<T>::iterator;
|
|
44
|
+
using const_iterator = typename std::vector<T>::const_iterator;
|
|
45
|
+
using reference = typename std::vector<T>::reference;
|
|
46
|
+
using const_reference = typename std::vector<T>::const_reference;
|
|
47
|
+
|
|
48
|
+
explicit Array(size_t len = 0) : m_offset(1), m_data(len) {}
|
|
49
|
+
Array(int lo, int hi) : m_offset(lo), m_data(hi - lo + 1) {}
|
|
50
|
+
Array(const Array<T> &) = default;
|
|
51
|
+
~Array() = default;
|
|
52
|
+
|
|
53
|
+
Array<T> &operator=(const Array<T> &) = default;
|
|
54
|
+
|
|
55
|
+
bool operator==(const Array<T> &a) const { return m_offset == a.m_offset && m_data == a.m_data; }
|
|
56
|
+
|
|
57
|
+
bool operator!=(const Array<T> &a) const { return m_offset != a.m_offset || m_data != a.m_data; }
|
|
58
|
+
|
|
59
|
+
const_reference operator[](int index) const
|
|
60
|
+
{
|
|
61
|
+
if (index < m_offset || index > back_index()) {
|
|
62
|
+
throw std::out_of_range("Index out of range in Array");
|
|
63
|
+
}
|
|
64
|
+
return m_data.at(index - m_offset);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
reference operator[](int index)
|
|
68
|
+
{
|
|
69
|
+
if (index < m_offset || index > back_index()) {
|
|
70
|
+
throw std::out_of_range("Index out of range in Array");
|
|
71
|
+
}
|
|
72
|
+
return m_data[index - m_offset];
|
|
73
|
+
}
|
|
74
|
+
const T &front() const { return m_data.front(); }
|
|
75
|
+
T &front() { return m_data.front(); }
|
|
76
|
+
const T &back() const { return m_data.back(); }
|
|
77
|
+
T &back() { return m_data.back(); }
|
|
78
|
+
|
|
79
|
+
iterator begin() { return m_data.begin(); }
|
|
80
|
+
const_iterator begin() const { return m_data.begin(); }
|
|
81
|
+
iterator end() { return m_data.end(); }
|
|
82
|
+
const_iterator end() const { return m_data.end(); }
|
|
83
|
+
const_iterator cbegin() const { return m_data.cbegin(); }
|
|
84
|
+
const_iterator cend() const { return m_data.cend(); }
|
|
85
|
+
|
|
86
|
+
bool empty() const { return m_data.empty(); }
|
|
87
|
+
size_t size() const { return m_data.size(); }
|
|
88
|
+
int front_index() const { return m_offset; }
|
|
89
|
+
int back_index() const { return m_offset + m_data.size() - 1; }
|
|
90
|
+
|
|
91
|
+
void clear() { m_data.clear(); }
|
|
92
|
+
void insert(const_iterator pos, const T &value) { m_data.insert(pos, value); }
|
|
93
|
+
void erase(iterator pos) { m_data.erase(pos); }
|
|
94
|
+
void push_back(const T &value) { m_data.push_back(value); }
|
|
95
|
+
void pop_back() { m_data.pop_back(); }
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/// Convenience function to erase the element at `p_index`
|
|
99
|
+
template <class T> void erase_atindex(Array<T> &p_array, int p_index)
|
|
100
|
+
{
|
|
101
|
+
p_array.erase(std::next(p_array.begin(), p_index - p_array.front_index()));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
} // end namespace Gambit
|
|
105
|
+
|
|
106
|
+
#endif // GAMBIT_CORE_ARRAY_H
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// This file is part of Gambit
|
|
3
|
+
// Copyright (c) 1994-2025, The Gambit Project (https://www.gambit-project.org)
|
|
4
|
+
//
|
|
5
|
+
// FILE: src/core/core.h
|
|
6
|
+
// Core (game theory-independent) declarations and utilities for Gambit
|
|
7
|
+
//
|
|
8
|
+
// This program is free software; you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU General Public License as published by
|
|
10
|
+
// the Free Software Foundation; either version 2 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
//
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU General Public License for more details.
|
|
17
|
+
//
|
|
18
|
+
// You should have received a copy of the GNU General Public License
|
|
19
|
+
// along with this program; if not, write to the Free Software
|
|
20
|
+
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
21
|
+
//
|
|
22
|
+
|
|
23
|
+
#ifndef GAMBIT_CORE_CORE_H
|
|
24
|
+
#define GAMBIT_CORE_CORE_H
|
|
25
|
+
|
|
26
|
+
#include "util.h"
|
|
27
|
+
#include "array.h"
|
|
28
|
+
#include "list.h"
|
|
29
|
+
#include "recarray.h"
|
|
30
|
+
#include "vector.h"
|
|
31
|
+
#include "matrix.h"
|
|
32
|
+
#include "rational.h"
|
|
33
|
+
|
|
34
|
+
#endif // GAMBIT_CORE_CORE_H
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file is part of Gambit
|
|
3
3
|
// Copyright (c) 1994-2025, The Gambit Project (https://www.gambit-project.org)
|
|
4
4
|
//
|
|
5
|
-
// FILE: src/
|
|
5
|
+
// FILE: src/core/function.cc
|
|
6
6
|
// Implementation of function and function minimization routines
|
|
7
7
|
//
|
|
8
8
|
// These routines derive from the N-dimensional function minimization
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
//
|
|
29
29
|
|
|
30
30
|
#include <cmath>
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
#include "function.h"
|
|
33
33
|
|
|
34
34
|
using namespace Gambit;
|
|
@@ -46,7 +46,7 @@ using namespace Gambit;
|
|
|
46
46
|
void FunctionOnSimplices::Project(Vector<double> &x, const Array<int> &lengths) const
|
|
47
47
|
{
|
|
48
48
|
int index = 1;
|
|
49
|
-
for (
|
|
49
|
+
for (size_t part = 1; part <= lengths.size(); part++) {
|
|
50
50
|
double avg = 0.0;
|
|
51
51
|
int j;
|
|
52
52
|
for (j = 1; j <= lengths[part]; j++, index++) {
|
|
@@ -70,7 +70,7 @@ void FunctionOnSimplices::Project(Vector<double> &x, const Array<int> &lengths)
|
|
|
70
70
|
|
|
71
71
|
void ConjugatePRMinimizer::AlphaXPlusY(double alpha, const Vector<double> &x, Vector<double> &y)
|
|
72
72
|
{
|
|
73
|
-
for (
|
|
73
|
+
for (size_t i = 1; i <= y.size(); i++) {
|
|
74
74
|
y[i] += alpha * x[i];
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -96,7 +96,7 @@ void ConjugatePRMinimizer::IntermediatePoint(const Function &fdf, const Vector<d
|
|
|
96
96
|
double stepb, fb;
|
|
97
97
|
|
|
98
98
|
trial:
|
|
99
|
-
double u = fabs(pg * lambda * stepc);
|
|
99
|
+
const double u = fabs(pg * lambda * stepc);
|
|
100
100
|
if ((fc - fa) + u == 0) {
|
|
101
101
|
// TLT: Added this check 2002/08/31 due to floating point exceptions
|
|
102
102
|
// under MSW. Not really sure how to handle this correctly.
|
|
@@ -160,12 +160,12 @@ mid_trial:
|
|
|
160
160
|
return; /* MAX ITERATIONS */
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
double dw = w - u;
|
|
164
|
-
double dv = v - u;
|
|
163
|
+
const double dw = w - u;
|
|
164
|
+
const double dv = v - u;
|
|
165
165
|
double du = 0.0;
|
|
166
166
|
|
|
167
|
-
double e1 = ((fv - fu) * dw * dw + (fu - fw) * dv * dv);
|
|
168
|
-
double e2 = 2.0 * ((fv - fu) * dw + (fu - fw) * dv);
|
|
167
|
+
const double e1 = ((fv - fu) * dw * dw + (fu - fw) * dv * dv);
|
|
168
|
+
const double e2 = 2.0 * ((fv - fu) * dw + (fu - fw) * dv);
|
|
169
169
|
|
|
170
170
|
if (e2 != 0.0) {
|
|
171
171
|
du = e1 / e2;
|
|
@@ -272,7 +272,7 @@ void ConjugatePRMinimizer::Set(const Function &fdf, const Vector<double> &x, dou
|
|
|
272
272
|
p = gradient;
|
|
273
273
|
g0 = gradient;
|
|
274
274
|
|
|
275
|
-
double gnorm = std::sqrt(gradient.NormSquared());
|
|
275
|
+
const double gnorm = std::sqrt(gradient.NormSquared());
|
|
276
276
|
pnorm = gnorm;
|
|
277
277
|
g0norm = gnorm;
|
|
278
278
|
}
|
|
@@ -282,9 +282,12 @@ void ConjugatePRMinimizer::Restart() { iter = 0; }
|
|
|
282
282
|
bool ConjugatePRMinimizer::Iterate(const Function &fdf, Vector<double> &x, double &f,
|
|
283
283
|
Vector<double> &gradient, Vector<double> &dx)
|
|
284
284
|
{
|
|
285
|
-
double fa = f
|
|
285
|
+
const double fa = f;
|
|
286
|
+
double fb, fc;
|
|
286
287
|
double dir;
|
|
287
|
-
double stepa = 0.0
|
|
288
|
+
const double stepa = 0.0;
|
|
289
|
+
double stepb;
|
|
290
|
+
const double stepc = step, tol = m_tol;
|
|
288
291
|
|
|
289
292
|
double g1norm;
|
|
290
293
|
double pg;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file is part of Gambit
|
|
3
3
|
// Copyright (c) 1994-2025, The Gambit Project (https://www.gambit-project.org)
|
|
4
4
|
//
|
|
5
|
-
// FILE: src/
|
|
5
|
+
// FILE: src/core/function.h
|
|
6
6
|
// Interface to function and function minimization routines
|
|
7
7
|
//
|
|
8
8
|
// This program is free software; you can redistribute it and/or modify
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
21
21
|
//
|
|
22
22
|
|
|
23
|
-
#ifndef
|
|
24
|
-
#define
|
|
23
|
+
#ifndef GAMBIT_CORE_FUNCTION_H
|
|
24
|
+
#define GAMBIT_CORE_FUNCTION_H
|
|
25
25
|
|
|
26
|
-
#include "
|
|
26
|
+
#include "vector.h"
|
|
27
27
|
|
|
28
28
|
namespace Gambit {
|
|
29
29
|
|
|
@@ -45,10 +45,10 @@ protected:
|
|
|
45
45
|
void Project(Vector<double> &x, const Array<int> &lengths) const;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
class FunctionMinimizerError : public
|
|
48
|
+
class FunctionMinimizerError : public std::runtime_error {
|
|
49
49
|
public:
|
|
50
|
+
FunctionMinimizerError() : std::runtime_error("Internal error in function minimization") {}
|
|
50
51
|
~FunctionMinimizerError() noexcept override = default;
|
|
51
|
-
const char *what() const noexcept override { return "Internal error in function minimization"; }
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
// An abstract base class for function minimization
|
|
@@ -106,4 +106,4 @@ private:
|
|
|
106
106
|
|
|
107
107
|
} // end namespace Gambit
|
|
108
108
|
|
|
109
|
-
#endif //
|
|
109
|
+
#endif // GAMBIT_CORE_FUNCTION_H
|