garage.sampler.env_update

A callable that “updates” an environment.

class EnvUpdate[source]

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 NewEnvUpdate(env_constructor)[source]

Bases: garage.sampler.env_update.EnvUpdate

Inheritance diagram of garage.sampler.env_update.NewEnvUpdate

EnvUpdate that creates a new environment every update.

Parameters

env_constructor (Callable[Environment]) – Callable that constructs an environment.

class SetTaskUpdate(env_type, task, wrapper_constructor)[source]

Bases: garage.sampler.env_update.EnvUpdate

Inheritance diagram of garage.sampler.env_update.SetTaskUpdate

EnvUpdate that calls set_task with the provided task.

Parameters
  • env_type (type) – Type of environment.

  • task (object) – Opaque task type.

  • wrapper_constructor (Callable[garage.Env, garage.Env] or None) – Callable that wraps constructed environments.

class ExistingEnvUpdate(env)[source]

Bases: garage.sampler.env_update.EnvUpdate

Inheritance diagram of garage.sampler.env_update.ExistingEnvUpdate

EnvUpdate that carries an already constructed environment.

Parameters

env (Environment) – The environment.