Implementation of the game "Skull" from Issue #1559 - #1560
Open
Popret wants to merge 2 commits into
Open
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Author
|
Hey, just saw the workflow was run and failed because of a goofy typo, sorry about that... Just pushed again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here's a first crack at implementing #1559 , with a couple of lingering questions:
Most importantly, I'd like some help implementing
MakeObserver(). I'm rather new to large-codebase C++, being more used to plain C. Right now I am creating the Observers manually in the constructor, but if I do the same via MakeObserver I get heap corruption errors. Actually I get those when an implementationMakeObserver()exists, I think regardless of if I call it in theSkullGameconstructor. I've tried, and my attempt is commented out right now, but any guidance here would be much appreciated.I'd also love feedback on the structure of
Returns(). Especially on how best to add intermediate rewards without incentivizing some suboptimal behaviour. I'm going to do some literature review in general, to try to understand in what situations it matters. I was considering implementing akReturnsTypesimilar to how goofspiel currently does it, but I wanted to get a better understanding for for the reasons behind any approach before implementing any specifics.A note on the Tests, they could be cleaned up somewhat but before committing to any approach I had some lingering questions regarding policies. I am using preferred action policy and custom policies in
skull_test.ccbecause depending on the game parameters skull can be a rather large game (e.g. many players, and perfect recall) that doesn't lend itself to a full tabular policy.PreferredActionPolicyworks:open_spiel/open_spiel/policy.cc
Lines 533 to 542 in 6c8edc8
PartialTabularPolicyopen_spiel/open_spiel/policy.cc
Lines 255 to 263 in 6c8edc8
Overall, I tried to be relatively thoughtful with my implementation, and tried to keep it simple. If there's any places stylistically that could be improved as well I'd welcome any feedback.
The next steps from my end would be to properly implement
MakeObserver(), adapt this to use the new ActionStructs instead of this flat representation, and adapt the policies / bots into their own file after hearing back what path you recommend.