diff --git a/build/pkgs/gambit/SPKG.rst b/build/pkgs/gambit/SPKG.rst deleted file mode 100644 index f266379f6ff..00000000000 --- a/build/pkgs/gambit/SPKG.rst +++ /dev/null @@ -1,30 +0,0 @@ -gambit: Computations on finite, noncooperative games -==================================================== - -Description ------------ - -Gambit is a set of software tools for doing computation on finite, -noncooperative games. The Gambit Project was founded in the mid-1980s by -Richard McKelvey at the California Institute of Technology. - -License -------- - -GPL v2+ - - -Upstream Contact ----------------- - -- Website: http://www.gambit-project.org/ -- Mailing List: http://sourceforge.net/p/gambit/mailman/gambit-devel/ - -Dependencies ------------- - -- python -- cython -- setuptools -- IPython -- scipy diff --git a/build/pkgs/gambit/checksums.ini b/build/pkgs/gambit/checksums.ini deleted file mode 100644 index 132796d9573..00000000000 --- a/build/pkgs/gambit/checksums.ini +++ /dev/null @@ -1,4 +0,0 @@ -tarball=gambit-VERSION.tar.gz -sha1=603dd52e8c0c2881bc2fdc8523bd8cbd9106b36f -md5=db47a02f66644806dbd43f77dc41ebeb -cksum=2352708160 diff --git a/build/pkgs/gambit/dependencies b/build/pkgs/gambit/dependencies deleted file mode 100644 index e026bfaacf9..00000000000 --- a/build/pkgs/gambit/dependencies +++ /dev/null @@ -1,4 +0,0 @@ -cython | $(PYTHON_TOOLCHAIN) $(PYTHON) - ----------- -All lines of this file are ignored except the first. diff --git a/build/pkgs/gambit/distros/homebrew.txt b/build/pkgs/gambit/distros/homebrew.txt deleted file mode 100644 index c08942b85ca..00000000000 --- a/build/pkgs/gambit/distros/homebrew.txt +++ /dev/null @@ -1 +0,0 @@ -gambit diff --git a/build/pkgs/gambit/distros/repology.txt b/build/pkgs/gambit/distros/repology.txt deleted file mode 100644 index 748786b4f51..00000000000 --- a/build/pkgs/gambit/distros/repology.txt +++ /dev/null @@ -1 +0,0 @@ -gambit-game-theory diff --git a/build/pkgs/gambit/math b/build/pkgs/gambit/math deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/build/pkgs/gambit/package-version.txt b/build/pkgs/gambit/package-version.txt deleted file mode 100644 index 1b67f294f5f..00000000000 --- a/build/pkgs/gambit/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -15.1.1.p0 diff --git a/build/pkgs/gambit/patches/b91115633dbf6f64745fda2db7fbb83f918dd500.patch b/build/pkgs/gambit/patches/b91115633dbf6f64745fda2db7fbb83f918dd500.patch deleted file mode 100644 index f99d88daa7f..00000000000 --- a/build/pkgs/gambit/patches/b91115633dbf6f64745fda2db7fbb83f918dd500.patch +++ /dev/null @@ -1,24 +0,0 @@ -From b91115633dbf6f64745fda2db7fbb83f918dd500 Mon Sep 17 00:00:00 2001 -From: Ted Turocy -Date: Fri, 7 Jul 2017 12:56:56 +0100 -Subject: [PATCH] Const-correctness fix in shared_ptr.h - -This corrects the parameter to weak_ptr::swap(), which had been -incorrectly labeled as const. ---- - src/libgambit/shared_ptr.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libgambit/shared_ptr.h b/src/libgambit/shared_ptr.h -index 959510e5..4379840e 100644 ---- a/src/libgambit/shared_ptr.h -+++ b/src/libgambit/shared_ptr.h -@@ -131,7 +131,7 @@ template class weak_ptr { - long use_count(void) const { return *m_count; } - bool expired(void) const { return *m_count == 0; } - -- void swap(const weak_ptr &other) // never throws -+ void swap(weak_ptr &other) // never throws - { - std::swap(m_ptr, other.m_ptr); - std::swap(m_count, other.m_count); diff --git a/build/pkgs/gambit/spkg-install.in b/build/pkgs/gambit/spkg-install.in deleted file mode 100644 index 61b6e43c0d4..00000000000 --- a/build/pkgs/gambit/spkg-install.in +++ /dev/null @@ -1,15 +0,0 @@ -cd src - -sdh_configure --disable-gui -sdh_make -sdh_make_install - - -cd src/python - -# Remove outdated source file (https://github.com/gambitproject/gambit/pull/232) -rm gambit/lib/libgambit.cpp - -# pip doesn't work (https://github.com/gambitproject/gambit/issues/207) -sdh_setup_bdist_wheel -sdh_store_and_pip_install_wheel . diff --git a/build/pkgs/gambit/type b/build/pkgs/gambit/type deleted file mode 100644 index 9839eb20815..00000000000 --- a/build/pkgs/gambit/type +++ /dev/null @@ -1 +0,0 @@ -experimental diff --git a/src/doc/en/reference/game_theory/index.rst b/src/doc/en/reference/game_theory/index.rst index eb7dab7193c..8b2fe6f250b 100644 --- a/src/doc/en/reference/game_theory/index.rst +++ b/src/doc/en/reference/game_theory/index.rst @@ -8,7 +8,6 @@ Game Theory sage/game_theory/matching_game sage/game_theory/normal_form_game sage/game_theory/catalog_normal_form_games - sage/game_theory/gambit_docs sage/game_theory/parser .. include:: ../footer.txt diff --git a/src/sage/game_theory/gambit_docs.py b/src/sage/game_theory/gambit_docs.py deleted file mode 100644 index b2d8af991e9..00000000000 --- a/src/sage/game_theory/gambit_docs.py +++ /dev/null @@ -1,139 +0,0 @@ -""" -Using Gambit as a standalone package - -This file contains some information and tests for the use of -`Gambit `_ as a stand alone package. - -To install gambit as an optional package run (from root of Sage):: - - $ sage -i gambit - -The `python API documentation for gambit -`_ shows various examples -that can be run easily in IPython. To run the IPython packaged with Sage run -(from root of Sage):: - - $ ./sage --ipython - -Here is an example that constructs the Prisoner's Dilemma:: - - In [1]: import gambit - In [2]: g = gambit.Game.new_table([2,2]) - In [3]: g.title = "A prisoner's dilemma game" - In [4]: g.players[0].label = "Alphonse" - In [5]: g.players[1].label = "Gaston" - In [6]: g - Out[6]: - NFG 1 R "A prisoner's dilemma game" { "Alphonse" "Gaston" } - - { { "1" "2" } - { "1" "2" } - } - "" - - { - { "" 0, 0 } - { "" 0, 0 } - { "" 0, 0 } - { "" 0, 0 } - } - 1 2 3 4 - - In [7]: g.players[0].strategies - Out[7]: [, - ] - In [8]: len(g.players[0].strategies) - Out[8]: 2 - - In [9]: g.players[0].strategies[0].label = "Cooperate" - In [10]: g.players[0].strategies[1].label = "Defect" - In [11]: g.players[0].strategies - Out[11]: [, - ] - - In [12]: g[0,0][0] = 8 - In [13]: g[0,0][1] = 8 - In [14]: g[0,1][0] = 2 - In [15]: g[0,1][1] = 10 - In [16]: g[1,0][0] = 10 - In [17]: g[1,1][1] = 2 - In [18]: g[1,0][1] = 2 - In [19]: g[1,1][0] = 5 - In [20]: g[1,1][1] = 5 - -Here is a list of the various solvers available in gambit: - -- ExternalEnumPureSolver -- ExternalEnumMixedSolver -- ExternalLPSolver -- ExternalLCPSolver -- ExternalSimpdivSolver -- ExternalGlobalNewtonSolver -- ExternalEnumPolySolver -- ExternalLyapunovSolver -- ExternalIteratedPolymatrixSolver -- ExternalLogitSolver - -Here is how to use the ``ExternalEnumPureSolver``:: - - In [21]: solver = gambit.nash.ExternalEnumPureSolver() - In [22]: solver.solve(g) - Out[22]: [] - -Note that the above finds the equilibria by investigating all potential pure -pure strategy pairs. This will fail to find all Nash equilibria in certain -games. For example here is an implementation of Matching Pennies:: - - In [1]: import gambit - In [2]: g = gambit.Game.new_table([2,2]) - In [3]: g[0, 0][0] = 1 - In [4]: g[0, 0][1] = -1 - In [5]: g[0, 1][0] = -1 - In [6]: g[0, 1][1] = 1 - In [7]: g[1, 0][0] = -1 - In [8]: g[1, 0][1] = 1 - In [9]: g[1, 1][0] = 1 - In [10]: g[1, 1][1] = -1 - In [11]: solver = gambit.nash.ExternalEnumPureSolver() - In [12]: solver.solve(g) - Out[12]: [] - -If we solve this with the ``LCP`` solver we get the expected Nash equilibrium:: - - In [13]: solver = gambit.nash.ExternalLCPSolver() - In [14]: solver.solve(g) - Out[14]: [] - -Note that the above examples only show how to build and find equilibria for -two player strategic form games. Gambit supports multiple player games as well -as extensive form games: for more details see http://www.gambit-project.org/. - -If one really wants to use gambit directly in Sage (without using the -``NormalFormGame`` class as a wrapper) then integers must first be -converted to Python integers (due to the preparser). Here is an example -showing the Battle of the Sexes:: - - sage: # optional - gambit - sage: import gambit - sage: g = gambit.Game.new_table([2,2]) - sage: g[int(0), int(0)][int(0)] = int(2) - sage: g[int(0), int(0)][int(1)] = int(1) - sage: g[int(0), int(1)][int(0)] = int(0) - sage: g[int(0), int(1)][int(1)] = int(0) - sage: g[int(1), int(0)][int(0)] = int(0) - sage: g[int(1), int(0)][int(1)] = int(0) - sage: g[int(1), int(1)][int(0)] = int(1) - sage: g[int(1), int(1)][int(1)] = int(2) - sage: solver = gambit.nash.ExternalLCPSolver() - sage: solver.solve(g) - [, - , - ] - -AUTHOR: - -- Vince Knight (11-2014): Original version - -""" diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py index b053f3160b8..470357077f4 100644 --- a/src/sage/game_theory/normal_form_game.py +++ b/src/sage/game_theory/normal_form_game.py @@ -236,8 +236,7 @@ `Gambit `_ [Gambit]_. At present this is the only gambit algorithm available in sage but further development will hope to implement more algorithms - (in particular for games with more than 2 players). To install it, - type ``sage -i gambit`` in the shell. + (in particular for games with more than 2 players). * ``'enumeration'``: Support enumeration for 2 player games. This algorithm is hard coded in Sage and checks through all potential