garage.envs.dm_control

Wrappers for the DeepMind Control Suite.

See https://github.com/deepmind/dm_control

class DMControlEnv(env, name=None)

Bases: garage.Environment

Inheritance diagram of garage.envs.dm_control.DMControlEnv

Binding for dm_control <https://arxiv.org/pdf/1801.00690.pdf>.

action_space

The action space specification.

Type:akro.Space
observation_space

The observation space specification.

Type:akro.Space
spec

The environment specification.

Type:EnvSpec
render_modes

A list of string representing the supported render modes.

Type:list
classmethod from_suite(cls, domain_name, task_name)

Create a DmControl task given the domain name and task name.

Parameters:
  • domain_name (str) – Domain name
  • task_name (str) – Task name
Returns:

the dm_control task environment

Return type:

dm_control.suite.Task

reset(self)

Resets the environment.

Returns:
The first observation conforming to
observation_space.
dict: The episode-level information.
Note that this is not part of env_info provided in step(). It contains information of he entire episode, which could be needed to determine the first action (e.g. in the case of goal-conditioned or MTRL.)
Return type:numpy.ndarray
step(self, action)

Steps the environment with the action and returns a EnvStep.

Parameters:action (object) – input action
Returns:The environment step resulting from the action.
Return type:EnvStep
Raises:RuntimeError – if step() is called after the environment has been constructed and reset() has not been called.
render(self, mode)

Render the environment.

Parameters:mode (str) – render mode.
Returns:if mode is ‘rgb_array’, else return None.
Return type:np.ndarray
Raises:ValueError – if mode is not supported.
visualize(self)

Creates a visualization of the environment.

close(self)

Close the environment.

class DmControlViewer

Bases: dm_control.viewer.application.Application

Inheritance diagram of garage.envs.dm_control.DmControlViewer
render(self)
launch(self, environment_loader, policy=None)
close(self)