Class ISingleAgentScholaEnvironment
Class ISingleAgentScholaEnvironment
- Defined in File SingleAgentEnvironmentInterface.h
Inheritance Relationships
Base Type
public IBaseScholaEnvironment(Class IBaseScholaEnvironment)
class ISingleAgentScholaEnvironment : public IBaseScholaEnvironmentSource: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h
Dependencies: FAgentState, FInitialAgentState, FInteractionDefinition, FPoint
Interface for single-agent reinforcement learning environments.
Implement this interface in your environment class to create a single-agent RL environment. All methods are Blueprint Native Events, allowing implementation in either C++ or Blueprint.
Public Functions
| Symbol | Details |
|---|---|
InitializeEnvironment | Initialize the environment and define the agent’s observation and action spaces. |
Reset | Reset the environment to its initial state. |
Step | Execute one environment step with the given action. |
SeedEnvironment | Set the random seed for reproducible environment behavior. |
SetEnvironmentOptions | Configure the environment with custom options. |
InitializeEnvironment
void InitializeEnvironment(FInteractionDefinition &OutAgentDefinition)Initialize the environment and define the agent’s observation and action spaces.
Parameters
OutAgentDefinition – [out] The interaction definition containing observation/action space information.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutAgentDefinition | FInteractionDefinition & | The interaction definition containing observation/action space information. |
Source: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h
Reset
void Reset(FInitialAgentState &OutAgentState)Reset the environment to its initial state.
Parameters
OutAgentState – [out] The initial agent state after reset, including the first observation.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutAgentState | FInitialAgentState & | The initial agent state after reset, including the first observation. |
Source: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h
Step
void Step(const FInstancedStruct &InAction, FAgentState &OutAgentState)Execute one environment step with the given action.
Parameters
-
InAction – [in] The action selected by the agent for this step.
-
OutAgentState – [out] The resulting agent state (observation, reward, done flags, info).
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InAction | const FInstancedStruct & | The action selected by the agent for this step. |
| 2 | — | OutAgentState | FAgentState & | The resulting agent state (observation, reward, done flags, info). |
Source: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h
SeedEnvironment
void SeedEnvironment(int Seed)Set the random seed for reproducible environment behavior.
Parameters
Seed – [in] The random seed value.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Seed | int | The random seed value. |
Source: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h
SetEnvironmentOptions
void SetEnvironmentOptions(const TMap<FString, FString> &Options)Configure the environment with custom options.
Parameters
Options – [in] Map of configuration option names to values.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Options | const TMap< FString, FString > & | Map of configuration option names to values. |
Source: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h
Public Static Functions
| Symbol | Details |
|---|---|
Execute_InitializeEnvironment | Adapter method to convert single-agent initialization to multi-agent format. |
Execute_Reset | Adapter method to convert single-agent reset to multi-agent format. |
Execute_Step | Adapter method to convert single-agent step to multi-agent format. |
Execute_InitializeEnvironment
static inline void Execute_InitializeEnvironment( UObject *Obj, TMap<FString, FInteractionDefinition> &OutAgentDefinitions)Adapter method to convert single-agent initialization to multi-agent format.
Parameters
-
Obj – [in] The environment object.
-
OutAgentDefinitions – [out] Map of agent IDs to definitions (will contain one entry “SingleAgent”).
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Obj | UObject * | The environment object. |
| 2 | — | OutAgentDefinitions | TMap< FString, FInteractionDefinition > & | Map of agent IDs to definitions (will contain one entry “SingleAgent”). |
Attributes: inline, static
Source: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h
Execute_Reset
static inline voidExecute_Reset(UObject *Obj, TMap<FString, FInitialAgentState> &OutAgentState)Adapter method to convert single-agent reset to multi-agent format.
Parameters
-
Obj – [in] The environment object.
-
OutAgentState – [out] Map of agent IDs to states (will contain one entry “SingleAgent”).
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Obj | UObject * | The environment object. |
| 2 | — | OutAgentState | TMap< FString, FInitialAgentState > & | Map of agent IDs to states (will contain one entry “SingleAgent”). |
Attributes: inline, static
Source: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h
Execute_Step
static inline voidExecute_Step(UObject *Obj, const TMap<FString, TInstancedStruct<FPoint>> &InActions, TMap<FString, FAgentState> &OutAgentStates)Adapter method to convert single-agent step to multi-agent format.
Parameters
-
Obj – [in] The environment object.
-
InActions – [in] Map of agent IDs to actions (expects one entry “SingleAgent”).
-
OutAgentStates – [out] Map of agent IDs to states (will contain one entry “SingleAgent”).
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Obj | UObject * | The environment object. |
| 2 | — | InActions | const TMap< FString, TInstancedStruct< FPoint > > & | Map of agent IDs to actions (expects one entry “SingleAgent”). |
| 3 | — | OutAgentStates | TMap< FString, FAgentState > & | Map of agent IDs to states (will contain one entry “SingleAgent”). |
Attributes: inline, static
Source: Source/Schola/Training/Public/Environment/SingleAgentEnvironmentInterface.h