Skip to content

Add MarlGrid matrix observations - #424

Merged
Trinkle23897 merged 9 commits into
sail-sg:mainfrom
tortoise10101:feature/marlgrid-prestige-cue
Jul 17, 2026
Merged

Add MarlGrid matrix observations#424
Trinkle23897 merged 9 commits into
sail-sg:mainfrom
tortoise10101:feature/marlgrid-prestige-cue

Conversation

@tortoise10101

@tortoise10101 tortoise10101 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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.

@tortoise10101
tortoise10101 force-pushed the feature/marlgrid-prestige-cue branch from f953a37 to c701140 Compare July 15, 2026 07:16
@tortoise10101 tortoise10101 changed the title Add MarlGrid prestige cue and matrix observations Add MarlGrid matrix observations Jul 15, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review


P2 Badge Match the pinned upstream grid size

For this exact public ID, the pinned upstream marlgrid/envs/__init__.py registers MarlGrid-1AgentCluttered15x15-v0 with grid_size=11 despite the name. Setting it to 15 here changes reset distribution, full renders, and full_matrix observation shape relative to the declared oracle; the current alignment test syncs the oracle from EnvPool's rendered frame, so it will not catch this mismatch.


if (cell.type != detail::CellType::kEmpty) {
continue;

P2 Badge Allow agents to spawn on overlapable objects

In the pinned upstream place_obj path, agents can be placed on cells whose object can_overlap() (for example goal and bonus tiles), with the object kept underneath the agent. This check restricts resets to empty cells only, so GoalCycle and cluttered tasks never produce official starts where an agent begins on a goal/bonus tile, changing the reset-state distribution and the initial observations for those seeds.


DecayPrestige(&agent);

P2 Badge Decay prestige only after bonus-tile visits

When prestige_coloring=True, this call decays prestige after every action, including turns and moves onto empty cells. The pinned upstream GridAgentInterface.on_step applies prestige_beta only when the moved-onto object is a BonusTile, so after a rewarded bonus visit EnvPool colors fade during unrelated actions while the oracle's prestige color remains stable until the next bonus interaction.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@Trinkle23897

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: e436ab8e73

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Trinkle23897
Trinkle23897 merged commit 6d9e1a2 into sail-sg:main Jul 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants