Skip to content

Add brute force method for finding pure nash equilibria. - #276

Merged
mmcky merged 1 commit into
QuantEcon:masterfrom
shizejin:brute_force_pure_nash
Nov 25, 2016
Merged

mmcky merged 1 commit into
QuantEcon:masterfrom
shizejin:brute_force_pure_nash

Conversation

@shizejin

@shizejin shizejin commented Nov 25, 2016 •

Copy link
Copy Markdown
Member

Based on #266.

Add a function pure_nash_brute to find all pure nash equilibria of a normal form game using brute force method.

For example, consider the Prisoners' Dilemma game.

>>> PD_bimatrix = [[(1, 1), (-2, 3)],
...                [(3, -2), (0, 0)]]
>>> g_PD = NormalFormGame(PD_bimatrix)
>>> pure_nash_brute(g_PD)
[(1, 1)]

Mainly referred to Tools for Game Theory. @oyamad

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 83.405% when pulling 1d709ab on shizejin:brute_force_pure_nash into 72f9034 on QuantEcon:master.

@oyamad

oyamad commented Nov 25, 2016

Copy link
Copy Markdown
Member

I have reviewed this, and it looks good to me.

@jstac

jstac commented Nov 25, 2016

Copy link
Copy Markdown
Contributor

It's a simple algorithm but a useful addition and very nicely written.

@shizejin Many thanks for your contribution.
@mmcky This looks good to me.

@mmcky

mmcky commented Nov 25, 2016

Copy link
Copy Markdown
Contributor

thanks @shizejin @oyamad @jstac. I will merge this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants