ray/rllib/examples/env/dm_control_suite.py

132 lines
2.8 KiB
Python
Raw Normal View History

from ray.rllib.env.wrappers.dm_control_wrapper import DMCEnv
"""
8 Environments from Deepmind Control Suite
"""
def acrobot_swingup(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
return DMCEnv(
"acrobot",
"swingup",
2020-08-26 04:24:05 -07:00
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)
2020-08-26 04:24:05 -07:00
def walker_walk(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
2020-08-26 04:24:05 -07:00
return DMCEnv(
"walker",
"walk",
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)
2020-08-26 04:24:05 -07:00
def hopper_hop(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
return DMCEnv(
"hopper",
"hop",
2020-08-26 04:24:05 -07:00
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)
2020-08-26 04:24:05 -07:00
def hopper_stand(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
return DMCEnv(
"hopper",
"stand",
2020-08-26 04:24:05 -07:00
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)
2020-08-26 04:24:05 -07:00
def cheetah_run(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
return DMCEnv(
"cheetah",
"run",
2020-08-26 04:24:05 -07:00
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)
2020-08-26 04:24:05 -07:00
def walker_run(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
return DMCEnv(
"walker",
"run",
2020-08-26 04:24:05 -07:00
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)
2020-08-26 04:24:05 -07:00
def pendulum_swingup(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
return DMCEnv(
"pendulum",
"swingup",
2020-08-26 04:24:05 -07:00
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)
2020-08-26 04:24:05 -07:00
def cartpole_swingup(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
return DMCEnv(
"cartpole",
"swingup",
2020-08-26 04:24:05 -07:00
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)
2020-08-26 04:24:05 -07:00
def humanoid_walk(
from_pixels=True, height=64, width=64, frame_skip=2, channels_first=True
):
return DMCEnv(
"humanoid",
"walk",
2020-08-26 04:24:05 -07:00
from_pixels=from_pixels,
height=height,
width=width,
frame_skip=frame_skip,
channels_first=channels_first,
)