Skip to content

Class IMultiAgentScholaEnvironment

Class IMultiAgentScholaEnvironment

  • Defined in File MultiAgentEnvironmentInterface.h

Inheritance Relationships

Base Type

class IMultiAgentScholaEnvironment : public IBaseScholaEnvironment

Source: 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

SymbolDetails
InitializeEnvironmentInitialize the environment and define all agents’ observation and action spaces.
SeedEnvironmentSet the random seed for reproducible environment behavior.
SetEnvironmentOptionsConfigure the environment with custom options.
ResetReset the environment to its initial state for all agents.
StepExecute 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.

#DirectionNameTypeDescription
1OutAgentDefinitionsTMap< 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.

#DirectionNameTypeDescription
1SeedintThe 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.

#DirectionNameTypeDescription
1Optionsconst 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.

#DirectionNameTypeDescription
1OutAgentStateTMap< 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.

#DirectionNameTypeDescription
1InActionsconst TMap< FString, FInstancedStruct > &Map of agent IDs to their selected actions.
2OutAgentStatesTMap< FString, FAgentState > &Map of agent IDs to their resulting states.

Source: Source/Schola/Training/Public/Environment/MultiAgentEnvironmentInterface.h


Public Static Functions

SymbolDetails
Execute_StepType-safe adapter method for executing steps with typed actions.

Execute_Step

static inline void
Execute_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.

#DirectionNameTypeDescription
1ObjUObject *The environment object.
2InActionsconst TMap< FString, TInstancedStruct< FPoint > > &Map of agent IDs to their typed actions.
3OutAgentStatesTMap< FString, FAgentState > &Map of agent IDs to their resulting states.

Attributes: inline, static

Source: Source/Schola/Training/Public/Environment/MultiAgentEnvironmentInterface.h