Skip to content

Commit

Permalink
move registration of alternative column height all to full registration
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasSchaefer committed Oct 22, 2021
1 parent 2828901 commit 367c4f3
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions rware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,27 @@
},
)

_perms = itertools.product(_sizes.keys(), _difficulty, range(1, 20), range(2, 11),)
for size, diff, agents, column_height in _perms:
# normal tasks with modified column height
gym.register(
id=f"rware-{size}-{column_height}h-{agents}ag{diff}-v1",
entry_point="rware.warehouse:Warehouse",
kwargs={
"column_height": column_height,
"shelf_rows": _sizes[size][0],
"shelf_columns": _sizes[size][1],
"n_agents": agents,
"msg_bits": 0,
"sensor_range": 1,
"request_queue_size": int(agents * _difficulty[diff]),
"max_inactivity_steps": None,
"max_steps": 500,
"reward_type": RewardType.INDIVIDUAL,
},
)


def full_registration():
_perms = itertools.product(_sizes.keys(), _difficulty, range(1, 20), range(2, 11),)
for size, diff, agents, column_height in _perms:
# normal tasks with modified column height
gym.register(
id=f"rware-{size}-{column_height}h-{agents}ag{diff}-v1",
entry_point="rware.warehouse:Warehouse",
kwargs={
"column_height": column_height,
"shelf_rows": _sizes[size][0],
"shelf_columns": _sizes[size][1],
"n_agents": agents,
"msg_bits": 0,
"sensor_range": 1,
"request_queue_size": int(agents * _difficulty[diff]),
"max_inactivity_steps": None,
"max_steps": 500,
"reward_type": RewardType.INDIVIDUAL,
},
)

_perms = itertools.product(
range(1, 5),
range(3, 10, 2),
Expand Down

0 comments on commit 367c4f3

Please sign in to comment.