Deepmind Control Suite
February 9, 2023 ยท View on GitHub
Tasks
We follow the settings in PAD and experiment with 8 tasks from DMControl. We measure generalization to (1) randomized colors of the background and robot itself, and (2) natural videos as dynamic background. SECANT significantly outperforms prior SOTA in all but one task, often by substantial margins up to 88.3%.
Installation
Please refer to Installation.
Usage
Use secant.envs.dm_control.make_dmc() to create a standardized DMControl Gym environment with image observation modality.
from secant.envs.dm_control import make_dmc
env = make_dmc(
task="walker_walk",
background="original",
)
env.reset()
done = False
while not done:
action = env.action_space.sample()
obs, reward, done, info = env.step(action)
Important Note:
-
taskcan be set to one of["cheetah_run", "ball_in_cup_catch", "cartpole_swingup", "cartpole_balance", "walker_walk", "walker_stand", "finger_spin", "reacher_easy"] -
backgroundcan be set to one of["original", "color_easy", "color_hard", "video[0-9]"]. -
The returned observation is a
uint8numpy array of the image observation. Don't forget to scale it to floats between[0., 1.) -
The created environment instance has properties
observation_spaceandaction_space. Please refer to OpenAI Gym's API. Don't forget to clamp your actions to fit the allowableaction_space. -
All supported tasks are recorded in
secant.envs.dm_control.ALL_TASKS. They can be specified either as a tuple("cartpole", "balance")or as a single string"cartpole_balance".