Skip to content

Class IAgent

Class IAgent

  • Defined in File AgentInterface.h
class IAgent

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

SymbolDetails
GetStatusGets the current status of the agent.
SetStatusSets the status of the agent.
DefineDefines the observation and action spaces for this agent.
ActExecutes an action provided to the agent.
ObserveGathers 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.

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

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

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

#DirectionNameTypeDescription
1OutObservationsFInstancedStruct &The current observations from the agent’s perspective.

Source: Source/Schola/Public/Agent/AgentInterface.h


Public Static Functions

SymbolDetails
Execute_ActType-safe wrapper for executing an action with a strongly-typed Point.
Execute_ObserveType-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.

#DirectionNameTypeDescription
1ObjUObject *The object implementing the IAgent interface.
2InActionconst 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.

#DirectionNameTypeDescription
1ObjUObject *The object implementing the IAgent interface.
2OutObservationsTInstancedStruct< FPoint > &The observations as a strongly-typed Point.

Attributes: inline, static

Source: Source/Schola/Public/Agent/AgentInterface.h