Locked room
LockedRoom (issue #179): six rooms - three stacked on the left of a
central north-south hallway, three stacked on the right - each opening
onto that hallway through its own door. One room is locked: its Goal
can only be reached by first finding a Key of the matching colour
hidden in one of the other five rooms, then unlocking that one door.
Faithful to MiniGrid's actual LockedRoomEnv._gen_grid: the six rooms'
positions, sizes and door cells are a fixed function of height/width
alone (not randomised, not retried - left_wall/right_wall/room_w/
room_h/the j + 3 per-room door-row offset all reproduced exactly,
checked directly against source). Only which room is locked, the six
doors' colours, which room hides the key, and every entity's exact
position within its own room are randomised per episode. That makes
this a much simpler generation problem than MultiRoom's (issue #182):
no jax.lax.while_loop retry search needed anywhere - every quantity
above is either a static Python value known at registration time or a
single vectorised random draw.
LockedRoom
Bases: Environment
Navix-LockedRoom-v0. Six rooms lining a central hallway, each
with its own coloured door onto the hallway. One room is locked and
holds the goal; the matching key is hidden in one of the other five.
The agent must find the key, unlock that door, and reach the goal.
Room geometry is a fixed function of the grid size; which room is
locked, the door colours, the key's room and every exact position
are randomised.
room_layout(height, width)
The six rooms' (top_row, top_col), (size_h, size_w) and door
(row, col) - a fixed function of height/width alone, verified
against MiniGrid's actual LockedRoomEnv._gen_grid. Rooms are
ordered left-row0, right-row0, left-row1, right-row1, left-row2,
right-row2, matching MiniGrid's own self.rooms append order - the
locked_room/key_room indices _reset draws index into this same
order.