Skip to content

Class IScholaEnvironment

Class IScholaEnvironment

  • Defined in File EnvironmentInterface.h

Inheritance Relationships

Derived Type

class IScholaEnvironment

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

Dependencies: FAgentState, FInitialAgentState, FInteractionDefinition, FPoint

A type-erased interface for a variety of Schola Environments (e.g.

single and multi agent).

This interface provides a unified API for interacting with multiple flavors of reinforcement learning environments in Schola.

Subclassed by TScholaEnvironment< T >


Public Functions

SymbolDetails
InitializeEnvironmentInitialize the environment and retrieve agent definitions.
SeedEnvironmentSet the random seed for the environment.
SetEnvironmentOptionsConfigure the environment with custom options.
ResetReset the environment to its initial state.
StepExecute one step in the environment with the given actions.
~IScholaEnvironmentVirtual destructor for proper cleanup of derived classes.

InitializeEnvironment

virtual void InitializeEnvironment(
TMap<FString, FInteractionDefinition> &OutAgentDefinitions) = 0

Initialize the environment and retrieve agent definitions.

Parameters

OutAgentDefinitions – [out] Map of agent names to their interaction definitions (observation/action spaces).

#DirectionNameTypeDescription
1OutAgentDefinitionsTMap< FString, FInteractionDefinition > &Map of agent names to their interaction definitions (observation/action spaces).

Attributes: pure virtual

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

SeedEnvironment

virtual void SeedEnvironment(int Seed) = 0

Set the random seed for the environment.

Parameters

Seed – [in] The random seed value to use for reproducibility.

#DirectionNameTypeDescription
1SeedintThe random seed value to use for reproducibility.

Attributes: pure virtual

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

SetEnvironmentOptions

virtual void SetEnvironmentOptions(const TMap<FString, FString> &Options) = 0

Configure the environment with custom options.

These options are specific to the environment implementation and are used to configure the environment.

Parameters

Options – [in] Map of option names to values for environment configuration.

#DirectionNameTypeDescription
1Optionsconst TMap< FString, FString > &Map of option names to values for environment configuration.

Attributes: pure virtual

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

Reset

virtual void Reset(TMap<FString, FInitialAgentState> &OutAgentState) = 0

Reset the environment to its initial state.

Parameters

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

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

Attributes: pure virtual

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

Step

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

Execute one step in the environment with the given actions.

Parameters

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

  • OutAgentStates – [out] Map of agent names to their resulting states (observation, reward, done, etc.).

#DirectionNameTypeDescription
1InActionsconst TMap< FString, TInstancedStruct< FPoint > > &Map of agent names to their selected actions.
2OutAgentStatesTMap< FString, FAgentState > &Map of agent names to their resulting states (observation, reward, done, etc.).

Attributes: pure virtual

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


~IScholaEnvironment

virtual ~IScholaEnvironment() = default

Virtual destructor for proper cleanup of derived classes.

Attributes: virtual

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