EnvironmentWrapper class provides a common interface for interacting with environments, whether they are local (LocalEnvironmentWrapper) or remote (RemoteEnvironmentWrapper).
Properties
observation_space
Get the observation space (last response data).
Returns:
FrameDataRaworNone: TheFrameDataRawobject from the last response, orNoneif no response has been set yet.
action_space
Get the action space (available actions).
Returns:
list[GameAction]: A list ofGameActionobjects representing available actions. Returns an empty list if no response has been set yet.
info
Get the environment information.
Returns:
EnvironmentInfo: TheEnvironmentInfoobject for this environment.
Methods
reset()
Reset the environment and return the initial frame data.
Returns:
FrameDataRaworNone:FrameDataRawobject with initial game state, orNoneif reset failed.
step()
Perform a step in the environment.
Signature: step(action, data=None, reasoning=None)
Parameters:
action(GameAction): The game action to perform (e.g.,GameAction.ACTION1,GameAction.ACTION2).data(dict[str, Any], optional): Optional action data dictionary. For complex actions, should contain"x"and"y"coordinates.reasoning(dict[str, Any], optional): Optional reasoning dictionary to include in recordings.
FrameDataRaworNone:FrameDataRawobject with updated game state, orNoneif step failed.

