Skip to content

GymEnv

Full path: schola.gym.env.GymEnv

schola.gym.env.GymEnv

GymEnv

GymEnv(simulator, protocol, verbosity=0)

Bases: Env

A Gym 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)

Methods

ItemDescription
init
close
reset
stepExecute one step in the environment.

init

__init__(simulator, protocol, verbosity=0)

Parameters

simulator (BaseSimulator)

protocol (BaseRLProtocol)

verbosity (int)


close

close(**kwargs)

reset

reset(seed=None, options=None)

Parameters

seed (int | None)

options (Dict[str, str] | None)

Returns

Tuple[Dict[str, ndarray], Dict[int, Dict[str, str]]]


step

step(action)

Execute one step in the environment.

Parameters

action (Any) : The action to execute in the environment.

Returns

  • observations (Dict[str, np.ndarray]) - The observations from the environment after executing the action.
  • reward (float) - The reward received after executing the action.
  • terminated (bool) - Whether the episode has terminated (reached a terminal state).
  • truncated (bool) - Whether the episode was truncated (e.g., time limit reached).
  • info (Dict[str, str]) - Additional information about the step.

Return type: Tuple[Dict[str, ndarray], float, bool, bool, Dict[str, str]]