Class IAgent
Class IAgent
- Defined in File AgentInterface.h
class IAgentSource: Source/Schola/Public/Agent/AgentInterface.h
Dependencies: FInteractionDefinition, FPoint
Interface for inference agents in the Schola framework.
This interface defines the core functionality that all agents must implement, including status management, action space definition, action execution, and observation gathering.
Public Functions
| Symbol | Details |
|---|---|
GetStatus | Gets the current status of the agent. |
SetStatus | Sets the status of the agent. |
Define | Defines the observation and action spaces for this agent. |
Act | Executes an action provided to the agent. |
Observe | Gathers the current observations from the agent’s environment. |
GetStatus
EAgentStatus GetStatus()Gets the current status of the agent.
Returns:
The current agent status (Running, Stopped, or Error).
Source: Source/Schola/Public/Agent/AgentInterface.h
SetStatus
void SetStatus(EAgentStatus NewStatus)Sets the status of the agent.
Parameters
NewStatus – The new status to set for the agent.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | NewStatus | EAgentStatus | The new status to set for the agent. |
Source: Source/Schola/Public/Agent/AgentInterface.h
Define
void Define(FInteractionDefinition &OutInteractionDefinition)Defines the observation and action spaces for this agent.
This method should populate the output parameter with the observation and action space definitions that describe how this agent interacts with its environment.
Parameters
OutInteractionDefinition – [out] The interaction definition for this agent.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutInteractionDefinition | FInteractionDefinition & | The interaction definition for this agent. |
Source: Source/Schola/Public/Agent/AgentInterface.h
Act
void Act(const FInstancedStruct &InAction)Executes an action provided to the agent.
This method takes an action from the action space and executes it, causing the agent to perform the corresponding behavior.
Parameters
InAction – [in] The action to execute, represented as an instanced struct.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InAction | const FInstancedStruct & | The action to execute, represented as an instanced struct. |
Source: Source/Schola/Public/Agent/AgentInterface.h
Observe
void Observe(FInstancedStruct &OutObservations)Gathers the current observations from the agent’s environment.
This method populates the output parameter with the current state observations from the agent’s environment.
Parameters
OutObservations – [out] The current observations from the agent’s perspective.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutObservations | FInstancedStruct & | The current observations from the agent’s perspective. |
Source: Source/Schola/Public/Agent/AgentInterface.h
Public Static Functions
| Symbol | Details |
|---|---|
Execute_Act | Type-safe wrapper for executing an action with a strongly-typed Point. |
Execute_Observe | Type-safe wrapper for gathering observations with a strongly-typed Point. |
Execute_Act
static inline void Execute_Act(UObject *Obj, const TInstancedStruct<FPoint> &InAction)Type-safe wrapper for executing an action with a strongly-typed Point.
Parameters
-
Obj – [in] The object implementing the IAgent interface.
-
InAction – [in] The action to execute, as a strongly-typed Point instance.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Obj | UObject * | The object implementing the IAgent interface. |
| 2 | — | InAction | const TInstancedStruct< FPoint > & | The action to execute, as a strongly-typed Point instance. |
Attributes: inline, static
Source: Source/Schola/Public/Agent/AgentInterface.h
Execute_Observe
static inline void Execute_Observe(UObject *Obj, TInstancedStruct<FPoint> &OutObservations)Type-safe wrapper for gathering observations with a strongly-typed Point.
Parameters
-
Obj – [in] The object implementing the IAgent interface.
-
OutObservations – [out] The observations as a strongly-typed Point.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Obj | UObject * | The object implementing the IAgent interface. |
| 2 | — | OutObservations | TInstancedStruct< FPoint > & | The observations as a strongly-typed Point. |
Attributes: inline, static