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

pure nash brute force method #7

Closed
shizejin opened this issue Nov 24, 2016 · 5 comments
Closed

pure nash brute force method #7

shizejin opened this issue Nov 24, 2016 · 5 comments

Comments

@shizejin
Copy link

Dear professor Oyama,

I've pushed pure nash brute force method to my fork "QuantEcon.py" repository. It would be great if you could help me check it at your convenience.

I just slightly added something to the codes in your "Tools for Game Theory" notebook, and write the descriptions and test file.

Best, Zejin

@oyamad
Copy link
Owner

oyamad commented Nov 25, 2016

@shizejin Very good!

Some thoughts/comments:

  • Maybe better to code a generator version too.
  • I don't think verbose mode is necessary.
  • An empty list should be returned when the game has no pure Nash.
  • Check the code with pep8.
  • Add to the test a game with more than two players.

Can we talk at the office hours today?

@shizejin
Copy link
Author

Thank you very much for your suggestions! Today I have no econometrics class so see you at 2pm!

@oyamad
Copy link
Owner

oyamad commented Nov 25, 2016

NEs = [(0,)*N]
for k in range(2, N-2+1):
    for ind in itertools.combinations(range(N), k):
        a = np.ones(N, dtype=int)
        a[[ind]] = 0
        NEs.append(tuple(a))
NEs.append((1,)*N)

@shizejin
Copy link
Author

Dear professor Oyama,

I've made a pull request here.

After leaving your office I tried some squashed commitment and force pushing, and sadly messes up my forked repository in final... So I deleted the old repository and tried again.

@oyamad
Copy link
Owner

oyamad commented Nov 26, 2016

@shizejin Congratulations, your first PR has been merged.

@oyamad oyamad closed this as completed Nov 26, 2016
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

No branches or pull requests

2 participants