Environments

MetaEnv (Interface)

class meta_policy_search.envs.base.MetaEnv(*args, **kwargs)[source]

Wrapper around OpenAI gym environments, interface for meta learning

get_task()[source]

Gets the task that the agent is performing in the current environment

Returns:task of the meta-learning environment
Return type:task
log_diagnostics(paths, prefix)[source]

Logs env-specific diagnostic information

Parameters:
  • paths (list) – list of all paths collected with this env during this iteration
  • prefix (str) – prefix for logger
sample_tasks(n_tasks)[source]

Samples task of the meta-environment

Parameters:n_tasks (int) – number of different meta-tasks needed
Returns:an (n_tasks) length list of tasks
Return type:tasks (list)
set_task(task)[source]

Sets the specified task to the current environment

Parameters:task – task of the meta-learning environment