Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

game_theory: Add lemke_howson #268

Merged
merged 4 commits into from
Nov 17, 2016
Merged

game_theory: Add lemke_howson #268

merged 4 commits into from
Nov 17, 2016

Conversation

oyamad
Copy link
Member

@oyamad oyamad commented Nov 7, 2016

Implement the Lemke-Howson algorithm.

  1. Implemented with floating point arithmetic. I also tried integer pivoting (as described in von Stengel 2007), but overflow easily occurs with np.int64. In a Julia version we may want to try with BigInt.

  2. The full_output option mimics root finding routines in scipy such as brentq.

  3. sicpy.optimize.OptimizeResult is used again as in DPSolveResult (but with sort in __repr__). Maybe we should put it in util for example, to be inherited by DPSolveResult and NashResult here to get rid of duplicates in the code.

Cc: @kevtimova @arnavsood @shizejin

@arnavs
Copy link
Member

arnavs commented Nov 7, 2016

@oyamad: Thanks for notifying me about this.

Is the Julia analog already being worked on? If not, I'd be happy to attempt it.

@jstac
Copy link
Contributor

jstac commented Nov 7, 2016

@oyamad It's beautiful code, as usual.

The failing tests seem to be spread across the library -- perhaps due to changes in Numba?

@cc7768
Copy link
Member

cc7768 commented Nov 7, 2016

I can confirm it is due to changes in numba -- I was trying to run some of the linear state space code and had issues until I downgraded to numba 0.28.

I'll raise a separate issue so we can address this.

@jstac
Copy link
Contributor

jstac commented Nov 7, 2016

@cc7768 Thanks, that would be helpful. I saw somewhere that numba expects new style classes now. Could that be the issue? (In other words, classes shouldn't inherit from object.)

@oyamad
Copy link
Member Author

oyamad commented Nov 8, 2016

@arnavsood No I don't have a Julia version. You can continue your work in Julia.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.1%) to 84.615% when pulling ebdc888 on lemke_howson into 120ab73 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.1%) to 84.615% when pulling 7867fad on lemke_howson into 120ab73 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.006%) to 83.37% when pulling 6202d16 on lemke_howson into e0bdaa7 on master.

@oyamad
Copy link
Member Author

oyamad commented Nov 15, 2016

Rebased on master.

@jstac
Copy link
Contributor

jstac commented Nov 17, 2016

The code is beautifully written, everything works as advertised and the documentation is good. Thanks!

@mmcky My view is that this can be merged.

@oyamad Might you or one of your students be willing to add a notebook to the notebook site giving a couple of examples, or, alternatively, update this notebook accordingly?

@mmcky
Copy link
Contributor

mmcky commented Nov 17, 2016

Thanks @oyamad and @jstac. I will merge this PR now.

@mmcky mmcky merged commit 72f9034 into master Nov 17, 2016
@mmcky mmcky deleted the lemke_howson branch November 17, 2016 23:21
@oyamad
Copy link
Member Author

oyamad commented Nov 18, 2016

Sure, I will update the game theory notebook.

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.

6 participants