Petting Zoo Vector Base Class¶
Base class for vectorized pettingzoo environments.
Parameters¶
- class agilerl.vector.pz_vec_env.PettingZooVecEnv(num_envs, possible_agents)¶
An abstract asynchronous, vectorized environment
- References:
https://github.com/openai/baselines/tree/master/baselines/common/vec_env https://github.com/Farama-Foundation/Gymnasium/blob/main/gymnasium/vector/vector_env.py
- Parameters:
- close(**kwargs)¶
Clean up the environments’ resources.
- render()¶
Returns the rendered frames from the parallel environments.
- reset(seed=None, options=None)¶
Reset all the environments and return two dictionaries of batched observations and infos.
- step(actions)¶
Take an action for each parallel environment
- step_async(actions)¶
Tell all the environments to start taking a step with the given actions. Call step_wait() to get the results of the step. You should not call this if a step_async run is already pending.
- step_wait()¶
Wait for the step taken with step_async().
- property unwrapped¶
Return the base environment.