Put near
PutNear (issue #178): a single room scattered with n_objects
Key/Ball/Box instances; two distinct ones are chosen as the
per-episode "move" (State.mission[0] - the object to carry) and
"target" (State.mission[1] - the object to drop near) objects. The
agent must pick up the move object and drop it within Chebyshev
distance 1 of the target. Verified against MiniGrid's actual
PutNearEnv.step: picking up the wrong object ends the episode
immediately (0 reward); any genuine drop attempt (was holding
something) also ends the episode, success determined by whether it
landed near the target.
Each object's type is drawn independently (matching MiniGrid's own
types = ["key", "ball", "box"] sampled per object, checked directly
against source) - see go_to_object.py's module docstring for the
padding-sentinel implementation this shares.
Registers with transitions_fn=transitions.deterministic_transition -
see go_to_object.py's module docstring for why (the default
stochastic_transition would otherwise walk every Ball entity a
random step each turn, which real MiniGrid's Ball doesn't do outside
DynamicObstacles).
PutNear
Bases: Environment
Navix-PutNear-*. A room scattered with n_objects coloured
Key/Ball/Box objects; two are named in State.mission - one to
carry (mission[0]) and one to drop it next to (mission[1]).
Success: pick up the carry object and drop it within Chebyshev
distance 1 of the target. Picking up the wrong object, or any drop
attempt, ends the episode (reward 1 only on a correct near-drop).
Attributes:
| Name | Type | Description |
|---|---|---|
n_objects |
int
|
how many objects to scatter. |