#16333: Game Theory: build capacity to use gambit to solve Normal Form Games.
-------------------------------------+-------------------------------------
       Reporter:  vinceknight        |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  game theory        |   Resolution:
       Keywords:  Game Theory,       |    Merged in:
  Normal Form Games                  |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  b336d6f789904a19a5f6a6d1335533948e9a1227
  u/vinceknight/gambit_integration   |     Stopgaps:
   Dependencies:  #16466             |
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Without `gambit` installed:
 {{{
 sage -t --long src/sage/game_theory/normal_form_game.py
 **********************************************************************
 File "src/sage/game_theory/normal_form_game.py", line 632, in
 sage.game_theory.normal_form_game.NormalFormGame.__init__
 Failed example:
     error = NormalFormGame({4:6, 6:9})
 Expected:
     Traceback (most recent call last):
     ...
     TypeError: Generator function must be a list, gambit game or nothing
 Got:
     <BLANKLINE>
     Traceback (most recent call last):
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 488, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 850, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 sage.game_theory.normal_form_game.NormalFormGame.__init__[35]>", line 1,
 in <module>
         error = NormalFormGame({Integer(4):Integer(6),
 Integer(6):Integer(9)})
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/game_theory/normal_form_game.py", line 652, in __init__
         raise TypeError("Generator function must be a list or nothing")
     TypeError: Generator function must be a list or nothing
 **********************************************************************
 File "src/sage/game_theory/normal_form_game.py", line 1154, in
 sage.game_theory.normal_form_game.NormalFormGame.obtain_nash
 Failed example:
     g.obtain_nash(algorithm='lrs')
 Exception raised:
     Traceback (most recent call last):
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 488, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 850, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 sage.game_theory.normal_form_game.NormalFormGame.obtain_nash[11]>", line
 1, in <module>
         g.obtain_nash(algorithm='lrs')
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/game_theory/normal_form_game.py", line 1236, in obtain_nash
         raise NotImplementedError("lrs is not installed")
     NotImplementedError: lrs is not installed
 **********************************************************************
 File "src/sage/game_theory/normal_form_game.py", line 1156, in
 sage.game_theory.normal_form_game.NormalFormGame.obtain_nash
 Failed example:
     g.obtain_nash(algorithm='LCP')
 Exception raised:
     Traceback (most recent call last):
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 488, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 850, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 sage.game_theory.normal_form_game.NormalFormGame.obtain_nash[12]>", line
 1, in <module>
         g.obtain_nash(algorithm='LCP')
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/game_theory/normal_form_game.py", line 1242, in obtain_nash
         raise NotImplementedError("gambit is not installed")
     NotImplementedError: gambit is not installed
 **********************************************************************
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/16333#comment:48>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to