Add native MarlGrid environments with prestige coloring - #419
Merged
Conversation
tortoise10101
force-pushed
the
feature/marlgrid-env
branch
from
May 25, 2026 07:33
41cdc3f to
4ac2c4d
Compare
Trinkle23897
added a commit
that referenced
this pull request
Jul 17, 2026
## Summary - add semantic `matrix` and `full_matrix` observation formats for MarlGrid - keep existing pixel observations as the default via `observation_format="pixels"` - add direct MarlGrid tests for partial and full matrix observation shapes and channels - replace the `.dockerignore` symlink with explicit Docker ignore rules - fix property docstrings that fail the current ruff lint rule ## Tests - make bazel-test BAZEL_TEST_TARGETS=//envpool/marlgrid:marlgrid_test - uvx ruff check envpool/python/envpool.py envpool/python/protocol.py scripts/coverage_summary.py - uvx ruff format --check envpool/python/envpool.py envpool/python/protocol.py scripts/coverage_summary.py envpool/marlgrid/marlgrid_test.py - uvx clang-format --style=file -i envpool/marlgrid/marlgrid.h -n --Werror - git diff --check origin/main..HEAD Note: the branch was rebuilt on top of current `origin/main` after native MarlGrid prestige coloring landed upstream in #419. --------- Co-authored-by: Jiayi Weng <jiayi@openai.com>
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.
Description
Add native C++ EnvPool support for MarlGrid, pinned to the official
kandouss/marlgridimplementation at commite88c40bad07653575ac11fe2f3a115e4de3d13e9.MarlGrid's GoalCycle environments are the environments used in Ndousse and coauthors' 2021 paper, Emergent Social Learning via Multi-agent Reinforcement Learning. The official reference repository is
kandouss/marlgrid.This PR also adds the optional
prestige_coloringcue for GoalCycle-style rendering. It defaults toFalsefor backward compatibility. When enabled, positive rewards move each agent's color from red toward blue, negative rewards reset prestige to red, and prestige decays after each active agent step.Motivation and Context
This brings MarlGrid into EnvPool with native runtime stepping, registration, rendering, documentation, deterministic tests, and oracle alignment against the pinned upstream implementation. The prestige cue reproduces the reward-history color signal used by the official MarlGrid implementation while keeping existing fixed-color behavior as the default.
Types of changes
Implemented Tasks
kandouss/marlgridupstream archive wiring underthird_party/marlgrid.prestige_coloring,prestige_beta, andprestige_scaleconfig keys.Checklist
make format(required)make lint(required)make bazel-testpass. (required)Local validation
make lint BAZELOPT="--action_env=PATH=$PATH"make bazel-test BAZEL_TEST_TARGETS=//envpool/marlgrid:marlgrid_testmake docstylemake spellinggit diff --check