[0, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 0, 0, 0, 0], ]) super().__init__(size=10, bit_map=bit_map, start_pos=start_pos, goal_pos=goal_pos, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-Maze-v0', entry_point=module_path + ':MazeEnv') register(env_id='MultiGrid-MiniMaze-v0', entry_point=module_path + ':MiniMazeEnv') register(env_id='MultiGrid-MediumMaze-v0', entry_point=module_path + ':MediumMazeEnv') register(env_id='MultiGrid-Maze2-v0', entry_point=module_path + ':HorizontalMazeEnv') register(env_id='MultiGrid-Maze3-v0', entry_point=module_path + ':Maze3Env') register(env_id='MultiGrid-Labyrinth-v0', entry_point=module_path + ':LabyrinthEnv')
class EmptyRandomEnv15x15Minigrid(EmptyEnv): def __init__(self, **kwargs): super().__init__(n_agents=1, size=15, agent_view_size=5, agent_start='random', randomize_goal=True, minigrid_mode=True) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-Empty-5x5-v0', entry_point=module_path + ':EmptyEnv') register(env_id='MultiGrid-Empty-Random-5x5-v0', entry_point=module_path + ':EmptyRandomEnv5x5') register(env_id='MultiGrid-Empty-8x8-v0', entry_point=module_path + ':EmptyEnv8x8') register(env_id='MultiGrid-Empty-Random-8x8-v0', entry_point=module_path + ':EmptyRandomEnv8x8') register(env_id='MultiGrid-Empty-16x16-v0', entry_point=module_path + ':EmptyEnv16x16') register(env_id='MultiGrid-Empty-Random-16x16-v0', entry_point=module_path + ':EmptyRandomEnv16x16')
class EmptyColorGatherEnv15x15(GatherEnv): def __init__(self, **kwargs): super().__init__(size=15, n_agents=3, n_goals=12, n_clutter=0, n_colors=4, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-Gather-v0', entry_point=module_path + ':GatherEnv') register(env_id='MultiGrid-Gather-Empty-6x6-v0', entry_point=module_path + ':EmptyGatherEnv6x6') register(env_id='MultiGrid-Gather-Random-8x8-v0', entry_point=module_path + ':RandomGatherEnv8x8') register(env_id='MultiGrid-Gather-Random-10x10-v0', entry_point=module_path + ':RandomGatherEnv10x10') register(env_id='MultiGrid-Color-Gather-Empty-6x6-v0', entry_point=module_path + ':EmptyColorGatherEnv6x6') register(env_id='MultiGrid-Color-Gather-Random-8x8-v0', entry_point=module_path + ':RandomColorGatherEnv8x8')
n_agents=1, n_goals=2, n_colors=2, n_clutter=0, minigrid_mode=True, **kwargs) class EmptyCoinGameEnv10x10(CoinGameEnv): def __init__(self, **kwargs): super().__init__(size=10, n_agents=2, n_goals=12, n_clutter=0, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-CoinGame-v0', entry_point=module_path + ':CoinGameEnv') register(env_id='MultiGrid-CoinGame-Empty-6x6-Minigrid-v0', entry_point=module_path + ':EmptyCoinGameEnv10x10Minigrid') register(env_id='MultiGrid-CoinGame-Empty-10x10-v0', entry_point=module_path + ':EmptyCoinGameEnv10x10')
super().__init__(size=8, n_agents=2, n_stags=3, n_plants=0, **kwargs) class EmptyStagHuntEnv10x10(StagHuntEnv): def __init__(self, **kwargs): super().__init__( size=10, n_agents=2, n_stags=2, n_plants=3, n_clutter=0, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register( env_id='MultiGrid-StagHunt-v0', entry_point=module_path + ':StagHuntEnv') register( env_id='MultiGrid-StagHunt-Empty-6x6-v0', entry_point=module_path + ':EmptyStagHuntEnv6x6') register( env_id='MultiGrid-StagHunt-Empty-8x8-v0', entry_point=module_path + ':EmptyStagHuntEnv8x8') register( env_id='MultiGrid-StagHunt-NoStag-8x8-v0', entry_point=module_path + ':NoStagHuntEnv8x8') register( env_id='MultiGrid-StagHunt-AllStag-8x8-v0',
class MiniFourRoomsEnvMinigrid(FourRoomsEnv): def __init__(self, **kwargs): super().__init__(grid_size=6, agent_view_size=5, minigrid_mode=True, n_agents=1, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-FourRooms-v0', entry_point=module_path + ':FourRoomsEnv') register(env_id='MultiGrid-FourRooms-15x15-v0', entry_point=module_path + ':FourRoomsEnv15x15') register(env_id='MultiGrid-FourRooms-Single-v0', entry_point=module_path + ':FourRoomsEnvSingle') register(env_id='MultiGrid-TwoRooms-Minigrid-v0', entry_point=module_path + ':TwoRoomsEnvMinigrid') register(env_id='MultiGrid-FourRooms-Minigrid-v0', entry_point=module_path + ':FourRoomsEnvMinigrid') register(env_id='MultiGrid-MiniTwoRooms-Minigrid-v0', entry_point=module_path + ':MiniTwoRoomsEnvMinigrid')
class TaskListEnv8x8Minigrid(TaskListEnv): def __init__(self, **kwargs): super().__init__(size=8, n_agents=1, reward_shaping=1, minigrid_mode=True, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register( env_id='MultiGrid-TaskList-8x8-v0', entry_point=module_path + ':TaskListEnv8x8' ) register( env_id='MultiGrid-TaskList-Sparse-8x8-v0', entry_point=module_path + ':TaskListEnvSparse8x8' ) register( env_id='MultiGrid-TaskList-8x8-Minigrid-v0', entry_point=module_path + ':TaskListEnv8x8Minigrid' )
class SingleMeetupEnv12x12(MeetupEnv): def __init__(self, **kwargs): super().__init__(size=12, n_agents=3, n_goals=1, n_clutter=0, **kwargs) class MultiMeetupEnv12x12(MeetupEnv): def __init__(self, **kwargs): super().__init__(size=12, n_agents=3, n_goals=5, n_clutter=0, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-Meetup-v0', entry_point=module_path + ':MeetupEnv') register(env_id='MultiGrid-Meetup-Empty-6x6-v0', entry_point=module_path + ':EmptyMeetupEnv6x6') register(env_id='MultiGrid-Meetup-SingleTarget-6x6-Minigrid-v0', entry_point=module_path + ':SingleTargetMeetupEnv6x6Minigrid') register(env_id='MultiGrid-Meetup-Empty-6x6-Minigrid-v0', entry_point=module_path + ':EmptyMeetupEnv6x6Minigrid') register(env_id='MultiGrid-Meetup-Single-6x6-v0', entry_point=module_path + ':SingleMeetupEnv6x6') register(env_id='MultiGrid-Meetup-Random-8x8-v0', entry_point=module_path + ':RandomMeetupEnv8x8')
class DoorKeyEnv8x8Single(DoorKeyEnv): def __init__(self, **kwargs): super().__init__(size=8, n_agents=1, **kwargs) class DoorKeyEnv16x16Single(DoorKeyEnv): def __init__(self, **kwargs): super().__init__(size=16, n_agents=1, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-DoorKey-6x6-v0', entry_point=module_path + ':DoorKeyEnv6x6') register(env_id='MultiGrid-DoorKey-8x8-v0', entry_point=module_path + ':DoorKeyEnv') register(env_id='MultiGrid-DoorKey-16x16-v0', entry_point=module_path + ':DoorKeyEnv16x16') register(env_id='MultiGrid-DoorKey-5x5-Single-v0', entry_point=module_path + ':DoorKeyEnv5x5Single') register(env_id='MultiGrid-DoorKey-6x6-Single-v0', entry_point=module_path + ':DoorKeyEnv6x6Single') register(env_id='MultiGrid-DoorKey-8x8-Single-v0', entry_point=module_path + ':DoorKeyEnv8x8Single')
class MiniGoalLastAdversarialEnv(AdversarialEnv): def __init__(self): super().__init__(n_clutter=7, size=6, agent_view_size=5, max_steps=50, choose_goal_last=True) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-Adversarial-v0', entry_point=module_path + ':AdversarialEnv') register(env_id='MultiGrid-ReparameterizedAdversarial-v0', entry_point=module_path + ':ReparameterizedAdversarialEnv') register(env_id='MultiGrid-MiniAdversarial-v0', entry_point=module_path + ':MiniAdversarialEnv') register(env_id='MultiGrid-MiniReparameterizedAdversarial-v0', entry_point=module_path + ':MiniReparameterizedAdversarialEnv') register(env_id='MultiGrid-NoisyAdversarial-v0', entry_point=module_path + ':NoisyAdversarialEnv') register(env_id='MultiGrid-MediumAdversarial-v0', entry_point=module_path + ':MediumAdversarialEnv')
class Cluttered15MinigridMedium(ClutteredMultiGrid): def __init__(self, **kwargs): super().__init__(n_agents=1, n_clutter=15, minigrid_mode=True, size=10, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-Cluttered-v0', entry_point=module_path + ':ClutteredMultiGrid') register(env_id='MultiGrid-Cluttered-Single-v0', entry_point=module_path + ':ClutteredMultiGridSingle') register(env_id='MultiGrid-Cluttered-Single-6x6-v0', entry_point=module_path + ':ClutteredMultiGridSingle6x6') register(env_id='MultiGrid-Cluttered40-Minigrid-v0', entry_point=module_path + ':Cluttered40Minigrid') register(env_id='MultiGrid-Cluttered10-Minigrid-v0', entry_point=module_path + ':Cluttered10Minigrid') register(env_id='MultiGrid-Cluttered50-Minigrid-v0', entry_point=module_path + ':Cluttered50Minigrid')
agent_view_size=agent_view_size, **kwargs) def _gen_grid(self, width, height): self.grid = multigrid.Grid(width, height) self.grid.wall_rect(0, 0, width, height) if self.randomize_goal: self.place_obj(minigrid.Goal(), max_tries=100) else: self.put_obj(minigrid.Goal(), width - 2, height - 2) for _ in range(self.n_clutter): self.place_obj(LavaWall(), max_tries=100) self.place_agent() self.mission = 'get to the green square' def step(self, action): obs, reward, done, info = multigrid.MultiGridEnv.step(self, action) return obs, reward, done, info if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-WallsAreLava-v0', entry_point=module_path + ':WallsAreLavaMultiGrid')
class RandomTagEnv6x6(TagEnv): def __init__(self, **kwargs): super().__init__(size=6, hide_agents=1, seek_agents=1, n_clutter=5, **kwargs) class RandomTagEnv8x8(TagEnv): def __init__(self, **kwargs): super().__init__(size=8, hide_agents=2, seek_agents=3, n_clutter=10, **kwargs) if hasattr(__loader__, 'name'): module_path = __loader__.name elif hasattr(__loader__, 'fullname'): module_path = __loader__.fullname register(env_id='MultiGrid-Tag-v0', entry_point=module_path + ':TagEnv') register(env_id='MultiGrid-Tag-Random-6x6-v0', entry_point=module_path + ':RandomTagEnv6x6') register(env_id='MultiGrid-Tag-Random-8x8-v0', entry_point=module_path + ':RandomTagEnv8x8')