Class IScholaEnvironment
Class IScholaEnvironment
- Defined in File EnvironmentInterface.h
Inheritance Relationships
Derived Type
public TScholaEnvironment< T >(Template Class TScholaEnvironment)
class IScholaEnvironmentSource: 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
| Symbol | Details |
|---|---|
InitializeEnvironment | Initialize the environment and retrieve agent definitions. |
SeedEnvironment | Set the random seed for the environment. |
SetEnvironmentOptions | Configure the environment with custom options. |
Reset | Reset the environment to its initial state. |
Step | Execute one step in the environment with the given actions. |
~IScholaEnvironment | Virtual destructor for proper cleanup of derived classes. |
InitializeEnvironment
virtual void InitializeEnvironment( TMap<FString, FInteractionDefinition> &OutAgentDefinitions) = 0Initialize the environment and retrieve agent definitions.
Parameters
OutAgentDefinitions – [out] Map of agent names to their interaction definitions (observation/action spaces).
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutAgentDefinitions | TMap< 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) = 0Set the random seed for the environment.
Parameters
Seed – [in] The random seed value to use for reproducibility.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Seed | int | The 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) = 0Configure 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.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Options | const 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) = 0Reset the environment to its initial state.
Parameters
OutAgentState – [out] Map of agent names to their initial states after reset.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutAgentState | TMap< 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) = 0Execute 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.).
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InActions | const TMap< FString, TInstancedStruct< FPoint > > & | Map of agent names to their selected actions. |
| 2 | — | OutAgentStates | TMap< 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() = defaultVirtual destructor for proper cleanup of derived classes.
Attributes: virtual
Source: Source/Schola/Training/Public/Environment/EnvironmentInterface.h