Skip to content

Conversation

@VivekHaridas-01
Copy link

No description provided.

@meta-cla
Copy link

meta-cla bot commented Oct 26, 2025

Hi @VivekHaridas-01!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@meta-cla
Copy link

meta-cla bot commented Oct 26, 2025

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 26, 2025
Copy link
Contributor

@pankit-eng pankit-eng left a 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.

@VivekHaridas-01
Copy link
Author

Please check if you would like to add this env docker image build to the github workflows.

Hi @pankit-eng
I've replaced the previous connect4_env with a new, cleaner connect_four implementation — all files and logic have been rewritten.
This version includes updated server code, models, and documentation, aligned with the latest project conventions.
For now, I’ve kept the Docker image build out of the workflows to keep this PR focused.
Once this implementation is reviewed and merged, I can open a follow-up PR that adds the Docker image build to the GitHub workflows.

Copy link
Contributor

@Darktex Darktex left a 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:

  1. Uses different patterns (Pydantic models instead of OpenEnv base classes)
  2. Duplicates the OpenSpiel integration approach
  3. 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:

  1. Add "connect_four" to the supported games list in src/envs/openspiel_env/
  2. Update the README with Connect4-specific documentation
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. New Environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants