Skip to content

Class UExternalGymConnector

Class UExternalGymConnector

  • Defined in File ExternalGymConnector.h

Inheritance Relationships

Base Type

Derived Type

class UExternalGymConnector : public UAbstractGymConnector

Source: Source/Schola/Training/Public/GymConnectors/ExternalGymConnector.h

Dependencies: FExternalGymConnectorSettings, FTrainingStateUpdate

Abstract class for connectors that communicate with external training processes.

Provides asynchronous communication with external training systems running in separate processes. Derived classes implement specific communication protocols (e.g., sockets, HTTP).

Subclassed by URPCGymConnector


Public Functions

SymbolDetails
UExternalGymConnectorDefault constructor for external gym connectors.
RequestStateUpdateRequest the next training state update from the external process.
ResolveEnvironmentStateUpdateResolve the environment state update, blocking if necessary.

UExternalGymConnector

UExternalGymConnector()

Default constructor for external gym connectors.

Source: Source/Schola/Training/Public/GymConnectors/ExternalGymConnector.h

Implementation: Source/Schola/Training/Private/GymConnectors/ExternalGymConnector.cpp

RequestStateUpdate

inline virtual TFuture<FTrainingStateUpdate *> RequestStateUpdate()

Request the next training state update from the external process.

This function is asynchronous and returns immediately. The future resolves when the external process provides the next action or reset command. Must be implemented by derived classes.

Returns:

A future that will eventually contain the training update (actions or resets).

Attributes: inline, virtual

Source: Source/Schola/Training/Public/GymConnectors/ExternalGymConnector.h

ResolveEnvironmentStateUpdate

virtual FTrainingStateUpdate *ResolveEnvironmentStateUpdate() override

Resolve the environment state update, blocking if necessary.

Waits for the async request to complete and returns the result.

Returns:

Pointer to the resolved training state update.

Attributes: virtual

Source: Source/Schola/Training/Public/GymConnectors/ExternalGymConnector.h

Implementation: Source/Schola/Training/Private/GymConnectors/ExternalGymConnector.cpp


Public Members

SymbolDetails
ExternalSettingsSettings for external communication (timeouts, etc.).
bFirstStepFlag to track if this is the first step after connection/reconnection.

ExternalSettings

FExternalGymConnectorSettings ExternalSettings

Settings for external communication (timeouts, etc.).


bFirstStep

bool bFirstStep = true

Flag to track if this is the first step after connection/reconnection.