Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EHN: Add qhull_options to game_theory.vertex_enumeration #421

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

oyamad
Copy link
Member

@oyamad oyamad commented Jul 21, 2018

For some degenerate games, qhull_options='QJ' helps to identify all the Nash equilibria:

bimatrix = [[(0, 3), (6, 1)],
            [(2, 2), (5, 6)],
            [(3, 3), (3, 3)]]
g = gt.NormalFormGame(bimatrix)
gt.vertex_enumeration(g)
[(array([0.66666667, 0.33333333, 0.        ]),
  array([0.33333333, 0.66666667]))]
gt.vertex_enumeration(g, qhull_options='QJ')
[(array([0., 0., 1.]), array([1., 0.])),
 (array([0.0000000e+00, 3.9409863e-11, 1.0000000e+00]),
  array([0.66666667, 0.33333333])),
 (array([0.66666667, 0.33333333, 0.        ]),
  array([0.33333333, 0.66666667]))]

but not always:

g = gt.NormalFormGame((2, 2))  # payoffs all zero
gt.vertex_enumeration(g)
[(array([1., 0.]), array([1., 0.]))]
gt.vertex_enumeration(g, qhull_options='QJ')
[(array([1., 0.]), array([0., 1.]))]

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 95.117% when pulling 463d05e on qhull_options into 4b94234 on master.

@mmcky mmcky merged commit 2a612cc into master Jul 24, 2018
@mmcky mmcky deleted the qhull_options branch July 24, 2018 06:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants