Dummy Vectorization¶
Single-Agent¶
- class xuance.environment.vector_envs.dummy.dummy_vec_env.DummyVecEnv(env_fns, env_seed)[源代码]¶
基类:
VecEnvVecEnv that does runs multiple environments sequentially, that is, the step and reset commands are send to one environment at a time. Useful when debugging and when num_env == 1 (in the latter case, avoids communication overhead) :param env_fns: environment function. :param env_seed: the random seed for the first environment.
- close_extras()[源代码]¶
Clean up the extra resources, beyond what’s in this base class. Only runs when not self.closed.
- reset()[源代码]¶
Reset all the environments and return an array of observations, or a dict of observation arrays. If step_async is still doing work, that work will be cancelled and step_wait() should not be called until step_async() is invoked again.
- class xuance.environment.vector_envs.dummy.dummy_vec_env.DummyVecEnv_Atari(env_fns, env_seed)[源代码]¶
基类:
DummyVecEnv
Multi-Agent¶
- class xuance.environment.vector_envs.dummy.dummy_vec_maenv.DummyVecEnv_Football(env_fns, env_seed)[源代码]¶
- class xuance.environment.vector_envs.dummy.dummy_vec_maenv.DummyVecEnv_StarCraft2(env_fns, env_seed)[源代码]¶
- class xuance.environment.vector_envs.dummy.dummy_vec_maenv.DummyVecMultiAgentEnv(env_fns, env_seed)[源代码]¶
基类:
VecEnvVecEnv that does runs multiple environments sequentially, that is, the step and reset commands are send to one environment at a time. Useful when debugging and when num_env == 1 (in the latter case, avoids communication overhead) :param env_fns – environment function.: