Skip to content

Conversation

@cpich3g
Copy link

@cpich3g cpich3g commented Nov 1, 2025

This pull request introduces a new integration for Pokémon battles using the poke-env library, providing both client and server implementations for an HTTP-based reinforcement learning environment. It includes a Dockerized server setup, data models, and documentation for usage and deployment. The changes are grouped below by theme:

Environment Implementation

  • Added PokemonEnv HTTP client in client.py, enabling interaction with a Pokémon battle server via standardized methods (reset, step, etc.), and providing payload parsing and state management for reinforcement learning agents.
  • Defined clear data models for actions, observations, and state in models.py, supporting both move and switch actions, detailed Pokémon stats, and comprehensive battle state representation.

Server & Deployment

  • Added a FastAPI-based server in server/app.py to expose the Pokémon battle environment over HTTP, with configuration via environment variables for battle format, player username, and server URL.
  • Introduced a multi-service Dockerfile for running both the Pokémon Showdown server and the OpenEnv HTTP server in a single container, including supervisor configuration and health checks.
  • Provided utility scripts for building the Docker image (build_docker.sh) and manual entrypoint startup (entrypoint.sh) for flexible deployment and debugging. [1] [2]

Documentation

  • Added a comprehensive Markdown file (Poke-Env.MD) explaining the environment, installation, usage, and example teams for battles, making it easier for new users to get started.
  • Added module-level docstrings and a minimal server-side __init__.py for clarity and discoverability. [1] [2]

@meta-cla
Copy link

meta-cla bot commented Nov 1, 2025

Hi @cpich3g!

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 cla@meta.com. Thanks!

@meta-cla
Copy link

meta-cla bot commented Nov 1, 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 Nov 1, 2025
@init27 init27 merged commit 62bede1 into meta-pytorch:project-pikachu Nov 1, 2025
1 check passed
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants