Skip to content

Bug: Plate pickup shaped reward never triggers in Overcooked environment #167

@HeavyCrab

Description

@HeavyCrab

Description

The plate pickup shaped reward in the Overcooked environment (v1) is broken due to two bugs in jaxmarl/environments/overcooked/overcooked.py.

Bug 1: Incorrect dimension comparison (Line 617)

Current code:
plate_loc_layer = jnp.array(maze_map == OBJECT_TO_INDEX["plate"], dtype=jnp.uint8)
no_plates_on_counters = jnp.sum(plate_loc_layer) == 0
Problem:

  • Compares against the entire 3D maze_map instead of just the object channel
  • Since OBJECT_TO_INDEX["plate"] = 5 and COLOR_TO_INDEX["grey"] = 5, all walls [2, 5, 0] match on the color channel
  • This causes no_plates_on_counters to always be False, completely disabling the reward

Bug 2: Wrong inventory scope (Line 611)

Current code:
num_plates_in_inv = jnp.sum(inventory == OBJECT_TO_INDEX["plate"])
Problem:

  • Only counts plates held by the current agent, not all agents
  • Should check total plates across all agents like OvercookedV2 does

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions