Environment Utils

Env Wrapper

class blackbox_mpc.environment_utils.EnvironmentWrapper[source]
__weakref__

list of weak references to the object (if defined)

static make_custom_gym_env(env_class, random_seed=0, num_of_agents=1)[source]

This is the make env function for custom gym envs which is responsible for creating the parallel environment. This takes care of custom gym and mujoco envs.

Parameters
  • env_class (gymEnv) – This specifies the class to be used in instantiating the envs.

  • random_seed (Int) – This specifies the seed to use.

  • num_of_agents (Int) – This specifies the number of agents to use.

Returns

env – A parellel environment for n agents running in parellel.

Return type

SubprocVecEnv

static make_standard_gym_env(env_name, random_seed=0, num_of_agents=1)[source]

This is the make env function for standard gym envs which is responsible for creating the parallel environment. This takes care of traditional gym and mujoco envs.

Parameters
  • env_name (String) – This specifies the standard env gym name.

  • random_seed (Int) – This specifies the seed to use.

  • num_of_agents (Int) – This specifies the number of agents to use.

Returns

env – A parellel environment for n agents running in parellel.

Return type

SubprocVecEnv