gym_os2r.common

gym_os2r.common.make_env_from_id(env_id, **kwargs)

Utility function for making a single gym env from id.

Parameters

env_id (str) – Environment ID

Returns

environment made from env_id

Return type

env

gym_os2r.common.make_mp_envs(env_id, nenvs, seed, randomizer, start_idx=0, **kwargs)

Utility function for making a vec_env from id for multiprocessing.

Parameters
  • env_id (str) – Environment ID

  • nenvs (int) – the number of environment you wish to have in subprocesses

  • seed (int) – the inital seed for RNG

  • randomizer (class, 'SupportedRandomizers') – the env randomizer

  • rank (int) – index of the subprocess

Returns

multiprocessing vectorized environment made from env_id

Return type

(gym_os2r.common.vec_env.SubprocVecEnv)