Skip to content

Commit

Permalink
register AntMaze-v5 environments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kallinteris-Andreas committed Jun 3, 2024
1 parent acefb5e commit d68b981
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 240 deletions.
359 changes: 120 additions & 239 deletions gymnasium_robotics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,245 +835,126 @@ def _merge(a, b):

# ----- AntMaze -----

register(
id=f"AntMaze_UMaze{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.U_MAZE,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_UMaze{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.U_MAZE,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open_Diverse_G{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN_DIVERSE_G,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open_Diverse_G{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN_DIVERSE_G,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open_Diverse_GR{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open_Diverse_GR{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Medium{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Medium{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Medium_Diverse_G{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE_DIVERSE_G,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Medium_Diverse_G{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE_DIVERSE_G,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Medium_Diverse_GR{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Medium_Diverse_GR{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large_Diverse_G{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE_DIVERSE_G,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large_Diverse_G{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE_DIVERSE_G,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large_Diverse_GR{suffix}-v3",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large_Diverse_GR{suffix}-v4",
entry_point="gymnasium_robotics.envs.maze.ant_maze_v4:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=1000,
)
for version in ["v3", "v4", "v5"]:
register(
id=f"AntMaze_UMaze{suffix}-{version}",
entry_point=f"gymnasium_robotics.envs.maze.ant_maze_{version}:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.U_MAZE,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open_Diverse_G{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN_DIVERSE_G,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Open_Diverse_GR{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.OPEN_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=700,
)

register(
id=f"AntMaze_Medium{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Medium_Diverse_G{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE_DIVERSE_G,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Medium_Diverse_GR{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.MEDIUM_MAZE_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large_Diverse_G{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE_DIVERSE_G,
},
kwargs,
),
max_episode_steps=1000,
)

register(
id=f"AntMaze_Large_Diverse_GR{suffix}-{version}",
entry_point="gymnasium_robotics.envs.maze.ant_maze:AntMazeEnv",
kwargs=_merge(
{
"maze_map": maps.LARGE_MAZE_DIVERSE_GR,
},
kwargs,
),
max_episode_steps=1000,
)

# ----- PointMaze -----

Expand Down
2 changes: 1 addition & 1 deletion gymnasium_robotics/envs/maze/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from gymnasium_robotics.envs.maze.ant_maze import AntMazeEnv
from gymnasium_robotics.envs.maze.ant_maze_v3 import AntMazeEnv
from gymnasium_robotics.envs.maze.point_maze import PointMazeEnv
File renamed without changes.

0 comments on commit d68b981

Please sign in to comment.