Class IMultiAgentScholaEnvironment
Class IMultiAgentScholaEnvironment
- Defined in File MultiAgentEnvironmentInterface.h
Inheritance Relationships
Base Type
public IBaseScholaEnvironment(Class IBaseScholaEnvironment)
class IMultiAgentScholaEnvironment : public IBaseScholaEnvironmentSource: Source/Schola/Training/Public/Environment/MultiAgentEnvironmentInterface.h
Dependencies: FAgentState, FInitialAgentState, FInteractionDefinition, FPoint
Interface for multi-agent reinforcement learning environments.
Implement this interface in your environment class to create a multi-agent RL environment. All methods are Blueprint Native Events, allowing implementation in either C++ or Blueprint. Each agent is identified by a unique string ID.
Public Functions
| Symbol | Details |
|---|---|
InitializeEnvironment | Initialize the environment and define all agents’ observation and action spaces. |
SeedEnvironment | Set the random seed for reproducible environment behavior. |
SetEnvironmentOptions | Configure the environment with custom options. |
Reset | Reset the environment to its initial state for all agents. |
Step | Execute one environment step with actions from all agents. |
InitializeEnvironment
void InitializeEnvironment( TMap<FString, FInteractionDefinition> &OutAgentDefinitions)Initialize the environment and define all agents’ observation and action spaces.
Parameters
OutAgentDefinitions – [out] Map of agent IDs to their interaction definitions.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutAgentDefinitions | TMap< FString, FInteractionDefinition > & | Map of agent IDs to their interaction definitions. |
Source: Source/Schola/Training/Public/Environment/MultiAgentEnvironmentInterface.h
SeedEnvironment
void SeedEnvironment(int Seed)Set the random seed for reproducible environment behavior.
This seed is used to initialize the environment’s random number generator. Only invoked when the environment is reset and a seed is provided.
Parameters
Seed – [in] The random seed value.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Seed | int | The random seed value. |
Source: Source/Schola/Training/Public/Environment/MultiAgentEnvironmentInterface.h
SetEnvironmentOptions
void SetEnvironmentOptions(const TMap<FString, FString> &Options)Configure the environment with custom options.
These options are specific to the environment implementation and are used to configure the environment. Only invoked when the environment is reset and Options are provided.
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/MultiAgentEnvironmentInterface.h
Reset
void Reset(TMap<FString, FInitialAgentState> &OutAgentState)Reset the environment to its initial state for all agents.
Parameters
OutAgentState – [out] Map of agent IDs to their initial states after reset.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutAgentState | TMap< FString, FInitialAgentState > & | Map of agent IDs to their initial states after reset. |
Source: Source/Schola/Training/Public/Environment/MultiAgentEnvironmentInterface.h
Step
void Step(const TMap<FString, FInstancedStruct> &InActions, TMap<FString, FAgentState> &OutAgentStates)Execute one environment step with actions from all agents.
Parameters
-
InActions – [in] Map of agent IDs to their selected actions.
-
OutAgentStates – [out] Map of agent IDs to their resulting states.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InActions | const TMap< FString, FInstancedStruct > & | Map of agent IDs to their selected actions. |
| 2 | — | OutAgentStates | TMap< FString, FAgentState > & | Map of agent IDs to their resulting states. |
Source: Source/Schola/Training/Public/Environment/MultiAgentEnvironmentInterface.h
Public Static Functions
| Symbol | Details |
|---|---|
Execute_Step | Type-safe adapter method for executing steps with typed actions. |
Execute_Step
static inline voidExecute_Step(UObject *Obj, const TMap<FString, TInstancedStruct<FPoint>> &InActions, TMap<FString, FAgentState> &OutAgentStates)Type-safe adapter method for executing steps with typed actions.
Parameters
-
Obj – [in] The environment object.
-
InActions – [in] Map of agent IDs to their typed actions.
-
OutAgentStates – [out] Map of agent IDs to their resulting states.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Obj | UObject * | The environment object. |
| 2 | — | InActions | const TMap< FString, TInstancedStruct< FPoint > > & | Map of agent IDs to their typed actions. |
| 3 | — | OutAgentStates | TMap< FString, FAgentState > & | Map of agent IDs to their resulting states. |
Attributes: inline, static
Source: Source/Schola/Training/Public/Environment/MultiAgentEnvironmentInterface.h