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

add simultaneous node support in policy_aggregator.py and exploitability.py #1034

Merged
merged 7 commits into from
Mar 27, 2023

Conversation

rezunli96
Copy link
Contributor

Hi, I found several algorithms like the ones in policy_aggregator.py and exploitability.py didn't handle cases for simultaneous nodes. So this PR is to address this issue.

Copy link
Member

@lukemarris lukemarris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass

open_spiel/python/algorithms/policy_aggregator.py Outdated Show resolved Hide resolved
open_spiel/python/algorithms/policy_aggregator_joint.py Outdated Show resolved Hide resolved
open_spiel/python/algorithms/policy_aggregator.py Outdated Show resolved Hide resolved
open_spiel/python/algorithms/policy_aggregator.py Outdated Show resolved Hide resolved
@@ -228,13 +246,10 @@ def assert_type(cond, msg):
if pid == turn_player:
# update the current node
# will need the observation to query the policies
if state not in self._policy:
if state_key not in self._policy:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this fixing a bug that existed in the code previously?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I believe this should be state_key instead of state. Because state is a pyspiel.state object which doesn't seem right to be a key.

open_spiel/python/algorithms/policy_aggregator_joint.py Outdated Show resolved Hide resolved
open_spiel/python/algorithms/policy_aggregator_joint.py Outdated Show resolved Hide resolved
@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 Mar 24, 2023
@lanctot lanctot merged commit 181aca5 into google-deepmind:master Mar 27, 2023
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.

3 participants