Skip to content

Template Class TScholaEnvironment

Template Class TScholaEnvironment

  • Defined in File EnvironmentInterface.h

Inheritance Relationships

Base Types

template <typename T>
class TScholaEnvironment : public TScriptInterface<T>, public IScholaEnvironment

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

Dependencies: FAgentState, FInitialAgentState, FInteractionDefinition, FPoint, IScholaEnvironment, ISingleAgentScholaEnvironment

Template wrapper that bridges Blueprint-implementable interfaces to the type-erased IScholaEnvironment.

This template allows Blueprint-implemented environments to be used through the generic IScholaEnvironment interface, enabling polymorphic environment handling in C++.

Template Parameters:

T – The specific environment interface type (e.g., ISingleAgentScholaEnvironment).


Public Functions

SymbolDetails
~TScholaEnvironmentVirtual destructor for proper cleanup.
TScholaEnvironmentConstruct a typed environment wrapper from a UObject.
InitializeEnvironmentInitialize the environment through the Blueprint interface.
SeedEnvironmentSet the random seed through the Blueprint interface.
SetEnvironmentOptionsSet environment options through the Blueprint interface.
ResetReset the environment through the Blueprint interface.
StepExecute a step through the Blueprint interface.

~TScholaEnvironment

~TScholaEnvironment() = default

Virtual destructor for proper cleanup.

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

TScholaEnvironment

inline TScholaEnvironment(UObject *InObject)

Construct a typed environment wrapper from a UObject.

Parameters

InObject – [in] The UObject implementing the environment interface.

#DirectionNameTypeDescription
1InObjectUObject *The UObject implementing the environment interface.

Attributes: inline

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

InitializeEnvironment

inline virtual void InitializeEnvironment(
TMap<FString, FInteractionDefinition> &OutAgentDefinitions) override

Initialize the environment through the Blueprint interface.

Parameters

OutAgentDefinitions – [out] Map of agent names to their interaction definitions.

#DirectionNameTypeDescription
1OutAgentDefinitionsTMap< FString, FInteractionDefinition > &Map of agent names to their interaction definitions.

Attributes: inline, virtual

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

SeedEnvironment

inline virtual void SeedEnvironment(int Seed) override

Set the random seed through the Blueprint interface.

Parameters

Seed – [in] The random seed value.

#DirectionNameTypeDescription
1SeedintThe random seed value.

Attributes: inline, virtual

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

SetEnvironmentOptions

inline virtual void
SetEnvironmentOptions(const TMap<FString, FString> &Options) override

Set environment options through the Blueprint interface.

Parameters

Options – [in] Map of configuration options.

#DirectionNameTypeDescription
1Optionsconst TMap< FString, FString > &Map of configuration options.

Attributes: inline, virtual

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

Reset

inline virtual void
Reset(TMap<FString, FInitialAgentState> &OutAgentState) override

Reset the environment through the Blueprint interface.

Parameters

OutAgentState – [out] Map of agent names to their initial states.

#DirectionNameTypeDescription
1OutAgentStateTMap< FString, FInitialAgentState > &Map of agent names to their initial states.

Attributes: inline, virtual

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

Step

inline virtual void
Step(const TMap<FString, TInstancedStruct<FPoint>> &InActions,
TMap<FString, FAgentState> &OutAgentStates) override

Execute a step through the Blueprint interface.

Parameters

  • InActions – [in] Map of agent names to their actions.

  • OutAgentStates – [out] Map of agent names to their resulting states.

#DirectionNameTypeDescription
1InActionsconst TMap< FString, TInstancedStruct< FPoint > > &Map of agent names to their actions.
2OutAgentStatesTMap< FString, FAgentState > &Map of agent names to their resulting states.

Attributes: inline, virtual

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