Skip to content

AsyncBaseRLProtocol

Full path: schola.core.protocols.async_base_protocol.AsyncBaseRLProtocol

Async base class for reinforcement learning protocols.

AsyncBaseRLProtocol

Bases: AsyncBaseProtocol

Methods

get_definition

get_definition()

Get the environment definition from Unreal Engine.

Returns

A tuple containing: - List of agent IDs per environment - List of agent groups per environment (used for grouping agents) - Observation spaces for each environment and agent - Action spaces for each environment and agent


send_action_msg

send_action_msg(actions, action_space)

Send actions to the environment and receive the next state.

Parameters

  • actions (Dict) - Actions to take, indexed by environment ID and agent ID.

  • action_space (Dict) - The action spaces used to serialize the actions.


send_reset_msg

send_reset_msg(seeds = None, options = None)

Send a reset message to restart the environment.

Parameters

  • seeds (List) - List of random seeds for each environment.

  • options (List) - List of reset options for each environment.


send_startup_msg

send_startup_msg(auto_reset_type = AutoResetType.SAME_STEP)

Send the startup message with auto-reset configuration.

Parameters

  • auto_reset_type (AutoResetType) - The type of auto-reset behavior to use when episodes end.