GymVectorEnv
Full path:
schola.gym.env.GymVectorEnv
schola.gym.env.GymVectorEnv
GymVectorEnv
GymVectorEnv(simulator, protocol, verbosity=0, autoreset_mode=<AutoresetMode SAME_STEP>)Bases: VectorEnv
A Gym Vector Environment that wraps a Schola Environment.
Parameters
unreal_connection (UnrealConnection)
: The connection to the Unreal Engine.
verbosity (int, default=0)
: The verbosity level for the environment.
simulator (BaseSimulator)
protocol (BaseRLProtocol)
autoreset_mode (str | MockAutoresetMode)
reset_infos
reset_infosThe information returned from the last reset.
Type
- List[Dict[str,str]]
Methods
| Item | Description |
|---|---|
| init | — |
| close | — |
| get_attr | Get an attribute from the environment. |
| reset | — |
| step | — |
| unbatch_actions | Unbatch actions from Dict[ObsID,Batched] to a nested Dict[EnvId,Dict[AgentId,Dict[ObsId,Value]]], effectively moving the env, and agent dimensions into Dictionaries. |
Attributes
| Item | Description |
|---|---|
| action_space | — |
| observation_space | — |
| single_action_space | — |
| single_observation_space | — |
init
__init__(simulator, protocol, verbosity=0, autoreset_mode=<AutoresetMode SAME_STEP>)Parameters
simulator (BaseSimulator)
protocol (BaseRLProtocol)
verbosity (int)
autoreset_mode (str | MockAutoresetMode)
action_space
action_space: Spaceclose
close(**kwargs)get_attr
get_attr(name)Get an attribute from the environment.
Parameters
name (str)
: The name of the attribute to get.
Returns
List[None]
Notes
This method is not implemented and will always return a list of None values, as sub-environments are not individually accessible.
observation_space
observation_space: Spacereset
reset(seed=None, options=None)Parameters
seed (None | List[int] | int)
options (Dict[str, List[str]] | None)
Returns
Tuple[Dict[str, ndarray], Dict[int, Dict[str, str]]]
single_action_space
single_action_space: Spacesingle_observation_space
single_observation_space: Spacestep
step(actions)Parameters
actions (Dict[int, ndarray])
Returns
Tuple[Dict[str, ndarray], ndarray, ndarray, ndarray, Dict[int, Dict[str, str]]]
unbatch_actions
unbatch_actions(actions)Unbatch actions from Dict[ObsID,Batched] to a nested Dict[EnvId,Dict[AgentId,Dict[ObsId,Value]]], effectively moving the env, and agent dimensions into Dictionaries.
Parameters
actions (Dict[int,np.ndarray])
: The batched actions to unbatch.
Returns
The unbatched actions.
Return type: Dict[int,Dict[int,Dict[str,np.ndarray]]]