gym-dmc is a gym wrapper around DeepMind Control Suite domains.
Project description
Link to other OpenAI Gym Plugins:
gym-sawyer
gym-toy-nav
Usage pattern:
import gym
env = gym.make("dmc:Pendulum-swingup-v1")
For the full list of environments, you can print:
from dm_control.suite import ALL_TASKS
print(*ALL_TASKS, sep="\n")
# Out[2]: ('acrobot', 'swingup')
# ('acrobot', 'swingup_sparse')
...
We register all of these environments using the following pattern:
acrobot task “swingup_sparse” becomes dmc:Acrobot-swingup_sparse-v1
You can see the usage patten in https://github.com/geyang/gym_dmc/blob/master/specs/test_gym_dmc.py:
env = gym.make('dmc:Walker-walk-v1', frame_skip=4)
assert env._max_episode_steps == 250
assert env.reset().shape == (24,)
env = gym.make('dmc:Walker-walk-v1', from_pixels=True, frame_skip=4)
assert env._max_episode_steps == 250
env = gym.make('dmc:Cartpole-balance-v1', from_pixels=True, frame_skip=8)
assert env._max_episode_steps == 125
assert env.reset().shape == (3, 84, 84)
env = gym.make('dmc:Cartpole-balance-v1', from_pixels=True, frame_skip=8, channels_first=False)
assert env._max_episode_steps == 125
assert env.reset().shape == (84, 84, 3)
env = gym.make('dmc:Cartpole-balance-v1', from_pixels=True, frame_skip=8, channels_first=False, gray_scale=True)
assert env._max_episode_steps == 125
assert env.reset().shape == (84, 84, 1)
Note, the ``max_episode_steps`` is calculated based on the ``frame_skip``. All DeepMind control domains terminate after 1000 simulation steps. So for frame_skip=4, the max_episode_steps should be 250.
Built with :heart: by Ge Yang
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for gym_dmc-0.2.0rc3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddc900256a08db57e0c0d8766b596f59ab453ca218f6779d514714e786801eb6 |
|
MD5 | b74b650b92f1200de2dd51864a401bc0 |
|
BLAKE2b-256 | ca37400c3a62dbdd602ea382ac6f2b2ae54775d4f8abb814b8315624d1254164 |