-
Notifications
You must be signed in to change notification settings - Fork 88
Added Connect4 Env wrapped on Gym #96
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
base: main
Are you sure you want to change the base?
Added Connect4 Env wrapped on Gym #96
Conversation
|
Hi @VivekHaridas-01! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if you would like to add this env docker image build to the github workflows.
Hi @pankit-eng |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this contribution! Your code quality is excellent and shows good understanding of OpenSpiel.
However, we already have a generic OpenSpiel environment wrapper at src/envs/openspiel_env/ that supports 6 games (Catch, Tic-Tac-Toe, Kuhn Poker, Cliff Walking, 2048, Blackjack) and properly follows OpenEnv architectural patterns.
Your PR creates a separate connect_four environment that:
- Uses different patterns (Pydantic models instead of OpenEnv base classes)
- Duplicates the OpenSpiel integration approach
- Would mean we have TWO ways to wrap OpenSpiel games in the codebase
This creates architectural inconsistency that we want to avoid in the reference examples we have here.
Compare your PR:
class ConnectFourAction(BaseModel): # Pydantic
column: int = Field(...)... to the existing openspiel_env:
@dataclass
class OpenSpielAction(Action): # Extends OpenEnv base class
action_id: int
Incidentally, we also have #101 as another Connect4 environment but I don't think these two are conflicting: that is an implementation without OpenSpiel, and this is an OpenSpiel-based implementation. Both make sense to me.
Below is a copypasta of what Claude recommends to do if you want to make it available via OpenSpiel:
If you'd like to make Connect4 available via OpenSpiel, the right approach would be to:
- Add "connect_four" to the supported games list in src/envs/openspiel_env/
- Update the README with Connect4-specific documentation
- Follow the existing patterns (see how Tic-Tac-Toe is implemented)
This would give users a choice:
- Simple Connect4: PR #101 (custom, lightweight)
- OpenSpiel Connect4: via openspiel_env (research-grade, works with OpenSpiel algorithms)
Let us know if you'd like to pursue the OpenSpiel integration approach! We'd welcome that contribution to openspiel_env.
No description provided.