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

rewrite Stackelberg-eq solver in cvxpy; add degenerated test case #1123

Merged
merged 4 commits into from
Oct 17, 2023

Conversation

rezunli96
Copy link
Contributor

Just found the original lp solver using cvxopt may not handle the degenerated case very well. Rewrote them in cvxpy.

@lanctot
Copy link
Collaborator

lanctot commented Oct 14, 2023

Problem on MacOS-12:

24/262 Test #239: python/algorithms/stackelberg_lp_test.py ..................***Failed    3.25 sec
Traceback (most recent call last):
  File "/Users/runner/work/open_spiel/open_spiel/open_spiel/python/algorithms/stackelberg_lp_test.py", line 36, in <module>
    game2 = pyspiel.create_matrix_game([[3, 9], [9, 1],
TypeError: create_matrix_game(): incompatible function arguments. The following argument types are supported:
    1. (arg0: str, arg1: str, arg2: list[str], arg3: list[str], arg4: list[list[float]], arg5: list[list[float]]) -> pyspiel.MatrixGame
    2. (arg0: list[list[float]], arg1: list[list[float]]) -> pyspiel.MatrixGame
    3. (arg0: list[list[float]], arg1: list[list[float]]) -> pyspiel.MatrixGame

@lanctot
Copy link
Collaborator

lanctot commented Oct 14, 2023

You need the payoffs for the other player(s).

(Or, if it's a two-player zero-sum game, feel free to add a create_two_player_zero_sum_matrix_game that takes only the first player's payoffs)

@lanctot
Copy link
Collaborator

lanctot commented Oct 14, 2023

Test failed; add a numerical tolerance

@lanctot lanctot added imported This PR has been imported and awaiting internal review. Please avoid any more local changes, thanks! merged internally The code is now submitted to our internal repo and will be merged in the next github sync. labels Oct 16, 2023
@lanctot lanctot merged commit 411ad80 into google-deepmind:master Oct 17, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported This PR has been imported and awaiting internal review. Please avoid any more local changes, thanks! merged internally The code is now submitted to our internal repo and will be merged in the next github sync.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants