garage.sampler.env_update module

A callable that “updates” an environment.

class EnvUpdate[source]

Bases: object

A callable that “updates” an environment.

Implementors of this interface can be called on environments to update them. The passed in environment should then be ignored, and the returned one used instead.

Since no new environment needs to be passed in, this type can also be used to construct new environments.

class ExistingEnvUpdate(env)[source]

Bases: garage.sampler.env_update.EnvUpdate

~EnvUpdate that carries an already constructed environment.

Parameters:env (gym.Env) – The environment.
class NewEnvUpdate(env_constructor)[source]

Bases: garage.sampler.env_update.EnvUpdate

~EnvUpdate that creates a new environment every update.

Parameters:env_constructor (Callable[gym.Env]) – Callable that constructs an environment.
class SetTaskUpdate(env_constructor, task)[source]

Bases: garage.sampler.env_update.EnvUpdate

~EnvUpdate that calls set_task with the provided task.

Parameters:
  • env_constructor (Callable[gym.Env]) – Callable that constructs an environment.
  • task (object) – Opaque task type.