GithubHelp home page GithubHelp logo

Comments (1)

drvinceknight avatar drvinceknight commented on August 15, 2024

Hi @alexalvis, I'm afraid I don't fully understand.

Here is what I get when I run the zero sum game with the matrix A you discussed:

>>> import nashpy as nash

>>> A = [[-100, 0, 0, -100],[0, 0, 0, -100],[-100, 0 ,0, 0],[0, 0, 0, -50]]
>>> game = nash.Game(A)
>>> list(game.support_enumeration())
[(array([0.00000000e+00, 8.43769499e-17, 3.33333333e-01, 6.66666667e-01]),
  array([0.33333333, 0.        , 0.        , 0.66666667]))]

If I include the second matrix B I get:

>>> B = [[-100, 0, 0, -100],[0, 0, 0, -100],[-100, 0 ,0, 0],[0, 0, 0, -33.3333333]]
>>> game = nash.Game(A, B)
>>> list(game.support_enumeration())
[(array([1., 0., 0., 0.]), array([0., 1., 0., 0.])),
 (array([1., 0., 0., 0.]), array([0., 0., 1., 0.])),
 (array([0., 1., 0., 0.]), array([1., 0., 0., 0.])),
 (array([0., 1., 0., 0.]), array([0., 1., 0., 0.])),
 (array([0., 1., 0., 0.]), array([0., 0., 1., 0.])),
 (array([0., 0., 1., 0.]), array([0., 1., 0., 0.])),
 (array([0., 0., 1., 0.]), array([0., 0., 1., 0.])),
 (array([0., 0., 1., 0.]), array([0., 0., 0., 1.])),
 (array([0., 0., 0., 1.]), array([1., 0., 0., 0.])),
 (array([0., 0., 0., 1.]), array([0., 1., 0., 0.])),
 (array([0., 0., 0., 1.]), array([0., 0., 1., 0.]))]

Note that this is using the latest version of Nashpy:

>>> nash.__version__
'0.0.18'

(You might need to update your Nashpy version by running pip install -U nashpy in your command line tool.)

I hope that helps, I'm closing this issue but feel free to reopen if you need to discuss this further.

from nashpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.