BaseDistributedEnv¶
-
class
maze.train.parallelization.distributed_env.distributed_env.
BaseDistributedEnv
(num_envs: int)¶ Abstract base class for distributed environments.
- Param
num_envs: the number of distributed environments.
-
abstract
reset
()¶ Reset all the environments and return respective observations in env-aggregated form.
- Returns
observations in env-aggregated form.
-
abstract
seed
(seed: int = None) → None¶ Sets the seed for this distributed env’s random number generator(s) and its contained parallel envs.
-
abstract
step
(actions: Iterable[Any]) → Tuple[Dict[str, numpy.ndarray], numpy.ndarray, numpy.ndarray, Iterable[Dict[Any, Any]]]¶ Step the environments with the given actions.
- Parameters
actions – the list of actions for the respective envs.
- Returns
observations, rewards, dones, information-dicts all in env-aggregated form.