IInferenceAgent
class IInferenceAgentDependencies
This type depends on:
- FActTickFunction
- FThinkTickFunction
- UAbstractBrain
- UAbstractObserver
- UAbstractPolicy
- UActuator
- UInteractionManager
Subclassed by: AInferenceController, AInferencePawn, UBTTask_AgentStep, UInferenceComponent
Public Interface
Public Functions:
GetControlledPawn
inline virtual APawn * GetControlledPawn()Get the controlled pawn of the agent.
Returns: A pointer to a controlled pawn object.
Returns: APawn *
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 41, column 15)
GetInteractionManager
inline virtual UInteractionManager * GetInteractionManager()Get the interaction manager for collecting actuators and observations.
Returns: A pointer to an interaction manager object.
Returns: UInteractionManager *
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 47, column 29)
GetBrain
inline virtual UAbstractBrain * GetBrain()Get the brain of the agent.
Returns: A pointer to a brain object.
Returns: UAbstractBrain *
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 53, column 24)
GetPolicy
inline virtual UAbstractPolicy * GetPolicy()Get the policy of the agent.
Returns: A pointer to a policy object.
Returns: UAbstractPolicy *
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 59, column 25)
GetAllObservers
inline virtual TArray<UAbstractObserver *> GetAllObservers()Get both the observers attached to the controlled pawn and the observers attached to the agent.
Returns: An array of observer objects.
Returns: TArray<UAbstractObserver *>
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 65, column 16)
GetAllActuators
inline virtual TArray<UActuator *> GetAllActuators()Get both the actuators attached to the controlled pawn and the actuators attached to the agent.
Returns: An array of actuator objects.
Returns: TArray<UActuator *>
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 71, column 16)
GetStatus
inline virtual EAgentStatus GetStatus()Get the status of the agent.
Returns: The status of the agent.
Returns: EAgentStatus
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 77, column 22)
SetStatus
inline virtual void SetStatus(EAgentStatus NewStatus)Set the status of the agent.
Parameters:
NewStatus(EAgentStatus) – The new status to set.
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 83, column 14)
GetObserversFromPawn
TArray<UAbstractObserver *> GetObserversFromPawn()Get all observers attached to a pawn.
Returns: An array of observer objects.
Returns: TArray<UAbstractObserver *>
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 89, column 8)
Implementation: Schola/Source/Schola/Private/Inference/IInferenceAgent.cpp (lines 5-15)
GetActuatorsFromPawn
TArray<UActuator *> GetActuatorsFromPawn()Get all actuators attached to a pawn.
Returns: An array of actuator objects.
Returns: TArray<UActuator *>
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 95, column 8)
Implementation: Schola/Source/Schola/Private/Inference/IInferenceAgent.cpp (lines 17-27)
GetAgentName
FString GetAgentName()Get the name of the agent.
Returns: The name of the agent.
Returns: FString
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 101, column 9)
Implementation: Schola/Source/Schola/Private/Inference/IInferenceAgent.cpp (lines 29-32)
Initialize
bool Initialize()Initialize this agent after play has begun.
Returns: True if initialization was successful, false otherwise.
Returns: bool
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 107, column 6)
Implementation: Schola/Source/Schola/Private/Inference/IInferenceAgent.cpp (lines 34-71)
Act
void Act()The agent retrieves an action from the brain before taking an action.
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 112, column 6)
Implementation: Schola/Source/Schola/Private/Inference/IInferenceAgent.cpp (lines 95-119)
Think
void Think()Update the state of the agent.
This checks if the agent is done, what its reward should be, and does any observation collection before requesting a decision.
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 117, column 6)
Implementation: Schola/Source/Schola/Private/Inference/IInferenceAgent.cpp (lines 73-93)
SetupDefaultTicking
virtual void SetupDefaultTicking(FThinkTickFunction &OutThinkTickFunction, FActTickFunction &OutActTickFunction, AActor *InTargetActor=nullptr)Register default tick functions for Think and Act.
Parameters:
| Name | Type | Default |
|---|---|---|
OutThinkTickFunction | FThinkTickFunction & | “ |
OutActTickFunction | FActTickFunction & | “ |
InTargetActor | AActor * | nullptr |
Attributes: virtual
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 122, column 14)
Implementation: Schola/Source/Schola/Private/Inference/IInferenceAgent.cpp (lines 121-133)
Used By
This type is used by:
- AInferenceController
- AInferencePawn
- FActTickFunction
- FThinkTickFunction
- UBTTask_AgentStep
- UInferenceComponent
Source: Schola/Source/Schola/Public/Inference/IInferenceAgent.h (line 32, column 1)