Skip to content

Feature/moving walls Added Barrier with Button functionality#3

Open
SeanYeSchool wants to merge 19 commits intomainfrom
feature/moving-walls
Open

Feature/moving walls Added Barrier with Button functionality#3
SeanYeSchool wants to merge 19 commits intomainfrom
feature/moving-walls

Conversation

@SeanYeSchool
Copy link
Copy Markdown

No description provided.

e-ndorfin and others added 5 commits February 6, 2026 07:50
Implements two new environment features:
- Moving walls that travel in a direction each step, with optional
  bounce mode and agent-pushing behavior
- Buttons that agents can interact with to control linked walls
  (toggle pause, direction, bounce, or trigger single-step move)

Includes layout parsing (n/s/e/w for walls, ! for buttons), demo
layouts, visualizer sprites, and an interactive play script.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tton or by time and does not trap agents when activated on the same tile
Copilot AI review requested due to automatic review settings February 12, 2026 23:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds moving walls, buttons, and barrier mechanics to the Overcooked V3 environment, including new layouts and visualization support, plus demo/test scripts to exercise the new functionality.

Changes:

  • Extend Overcooked V3 state/layout parsing to include moving walls, buttons, and barriers (including timed barriers).
  • Add rendering support for the new static objects in OvercookedV3Visualizer.
  • Add demo/test scripts and interactive play entry points for exercising moving walls/barriers.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
jaxmarl/environments/overcooked_v3/common.py Adds StaticObject entries for moving walls/buttons/barriers and introduces ButtonAction.
jaxmarl/environments/overcooked_v3/settings.py Adds MAX_* limits and default barrier duration constant.
jaxmarl/environments/overcooked_v3/layouts.py Adds demo layouts and extends layout parsing/config to support walls/buttons/barriers.
jaxmarl/environments/overcooked_v3/overcooked.py Implements barrier blocking, button interactions, moving wall movement, and barrier timers; updates obs shape.
jaxmarl/viz/overcooked_v3_visualizer.py Renders moving walls/buttons/barriers and encodes barrier state for visualization.
jaxmarl/environments/overcooked_v3/interactive.py Adds a simple interactive runner for Overcooked V3.
play/play_moving_walls.py Adds a Pygame-based interactive demo for moving walls/buttons.
tests/overcooked_v3/test_barriers.py Adds barrier behavior “tests” (currently print-driven).
test_barrier_viz.py Adds a barrier visualization script (currently top-level executable).
test_barrier_progression.py Adds a barrier progression visualization script (currently top-level executable).
jaxmarl/environments/overcooked_v3/__init__.py Exports ButtonAction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +132 to +137
print(f"After button press:")
print(f" Barrier active: {state.barrier_active[0]}")
print(f" Barrier timer: {state.barrier_timer[0]}")
print(f" Expected timer: 29 (barrier_duration - 1, since timer decrements on same step)")

if not state.barrier_active[0] and state.barrier_timer[0] == 29:
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

barrier_duration is configured as 5 for this test, but the expected timer is hard-coded as 29 here. This is inconsistent/misleading and will confuse future debugging. Consider computing the expected timer from the configured barrier_duration (and assert against it).

Suggested change
print(f"After button press:")
print(f" Barrier active: {state.barrier_active[0]}")
print(f" Barrier timer: {state.barrier_timer[0]}")
print(f" Expected timer: 29 (barrier_duration - 1, since timer decrements on same step)")
if not state.barrier_active[0] and state.barrier_timer[0] == 29:
# Timer is initialized from barrier_duration, then decremented on the same step
expected_timer = int(state.barrier_duration[0]) - 1
print(f"After button press:")
print(f" Barrier active: {state.barrier_active[0]}")
print(f" Barrier timer: {state.barrier_timer[0]}")
print(f" Expected timer: {expected_timer} (barrier_duration - 1, since timer decrements on same step)")
if not state.barrier_active[0] and state.barrier_timer[0] == expected_timer:

Copilot uses AI. Check for mistakes.
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.

6 participants