Skip to content

UInferenceComponent

class UInferenceComponent : public UActorComponent, public IInferenceAgent

A component that implements the IInferenceAgent interface, to control a Pawn with a Brain/Policy.

Dependencies

This type depends on:

Inherits from: public UActorComponent, public IInferenceAgent

Public Interface

Public Functions:

GetControlledPawn

inline virtual APawn * GetControlledPawn() override

Get the controlled pawn of the agent.

Returns: A pointer to the controlled pawn.

Returns: APawn *

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 61, column 15)

GetInteractionManager

inline virtual UInteractionManager * GetInteractionManager() override

Get the interaction manager for the agent.

Returns: A pointer to the interaction manager.

Returns: UInteractionManager *

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 70, column 29)

GetBrain

inline virtual UAbstractBrain * GetBrain() override

Get the brain of the agent.

Returns: A pointer to the brain.

Returns: UAbstractBrain *

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 79, column 24)

GetPolicy

inline virtual UAbstractPolicy * GetPolicy() override

Get the policy of the agent.

Returns: A pointer to the policy.

Returns: UAbstractPolicy *

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 88, column 25)

GetAllObservers

inline virtual TArray<UAbstractObserver *> GetAllObservers() override

Get all the observers attached to the agent.

Returns: An array of pointers to the observers.

Returns: TArray&lt;UAbstractObserver &#42;&gt;

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 97, column 16)

GetAllActuators

inline virtual TArray<UActuator *> GetAllActuators() override

Get all actuators of the agent.

Returns: An array of pointers to the actuators.

Returns: TArray&lt;UActuator &#42;&gt;

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 109, column 16)

GetStatus

inline virtual EAgentStatus GetStatus() override

Get the status of the agent.

Returns: The status of the agent.

Returns: EAgentStatus

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 123, column 22)

SetStatus

inline virtual void SetStatus(EAgentStatus NewStatus) override

Set the status of the agent.

Parameters:

  • NewStatus (EAgentStatus) – [in] The new status to set.

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 132, column 14)

RegisterComponentTickFunctions

inline void RegisterComponentTickFunctions(bool bRegister) override

Register or unregister the tick functions for the agent.

Parameters:

  • bRegister (bool) – [in] Whether to register the tick functions.

Attributes: inline

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 141, column 6)

BeginPlay

inline virtual void BeginPlay() override

Called when the game starts or when spawned.

Attributes: inline, virtual

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 160, column 14)

Public Members:

UInteractionManager * InteractionManager

UInteractionManager * InteractionManager = = CreateDefaultSubobject<UInteractionManager>(TEXT("InteractionManager"))

Object defining how the agent interacts with the environment.

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 23, column 21)

UAbstractPolicy * Policy

UAbstractPolicy * Policy

Object defining an asynchronous function f:Observations->Actions used to make decisions for the agent.

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 27, column 17)

UAbstractBrain * Brain

UAbstractBrain * Brain

Object defining how decision requests are synchronized.

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 31, column 16)

TArray<UAbstractObserver *> Observers

TArray<UAbstractObserver *> Observers

List of observers that collect observations for the agent.

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 35, column 8)

TArray<UActuator *> Actuators

TArray<UActuator *> Actuators

List of actuators that execute actions for the agent.

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 39, column 8)

EAgentStatus Status

EAgentStatus Status = = EAgentStatus::Stopped

The status of the agent.

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 43, column 14)

FThinkTickFunction ThinkTickFunction

FThinkTickFunction ThinkTickFunction = = FThinkTickFunction(this)

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 47, column 20)

FActTickFunction ActTickFunction

FActTickFunction ActTickFunction = = FActTickFunction(this)

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 51, column 18)

bool bRegisterAgentStep

bool bRegisterAgentStep = = true

Whether the agent should be set up to take actions automatically.

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 55, column 6)

Source: Schola/Source/Schola/Public/Inference/InferenceComponent.h (line 16, column 1)