Dummy Vectorized Environments¶
Lightweight wrappers that expose a single environment through a
VectorEnv-like API, adding a leading batch dimension of size 1.
- class agilerl.vector.dummy_vec_env.DummyVecEnv(env: Env)¶
Wraps a single
gymnasium.Envwith aVectorEnv-like API.Observations returned by
reset()andstep()always carry a leading batch dimension of size 1, and actions are expected to have the same leading dimension (which is stripped before forwarding to the underlying environment).Episodes auto-reset following the gymnasium >= 1.0 next-step convention (matching
gymnasium.vector.SyncVectorEnv): the step after a termination/truncation resets the environment and returns the reset observation with zero reward and both done flagsFalse.- Parameters:
env (gymnasium.Env) – The environment to wrap.
- render() Any¶
Render the environment.
- Returns:
Render output from the wrapped environment.
- Return type:
Any
- reset(*, seed: int | None = None, options: dict[str, Any] | None = None) tuple[ndarray, dict[str, Any]]¶
Reset the environment and return batched observation.