garage.sampler.env_update

A callable that “updates” an environment.

class EnvUpdate

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)

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_constructor, task)

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_constructor (Callable[Environment]) – Callable that constructs an environment.
  • task (object) – Opaque task type.
class ExistingEnvUpdate(env)

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.