-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Conversation
@oyamad: Thanks for notifying me about this. Is the Julia analog already being worked on? If not, I'd be happy to attempt it. |
@oyamad It's beautiful code, as usual. The failing tests seem to be spread across the library -- perhaps due to changes in Numba? |
I can confirm it is due to changes in I'll raise a separate issue so we can address this. |
@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 |
@arnavsood No I don't have a Julia version. You can continue your work in Julia. |
Always execute lex_min_ratio_test
Rebased on |
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? |
Sure, I will update the game theory notebook. |
Implement the Lemke-Howson algorithm.
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 withBigInt
.The
full_output
option mimics root finding routines in scipy such asbrentq
.sicpy.optimize.OptimizeResult
is used again as inDPSolveResult
(but withsort
in__repr__
). Maybe we should put it inutil
for example, to be inherited byDPSolveResult
andNashResult
here to get rid of duplicates in the code.Cc: @kevtimova @arnavsood @shizejin