Skip to content

FTrainerState

struct FTrainerState

A Struct representing the state of the agent given by a Reward, a vector observation and a status.

Dependencies: FDictPoint

Public Interface

Public Functions:

ToProto

inline void ToProto(Schola::AgentState &OutState) const const

Fill a protobuf message (Schola::AgentState) with the agent’s state.

Parameters:

  • OutState (Schola::AgentState &) – [out] The protobuf message reference to fill

Attributes: const, inline

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 74, column 6)

Reset

inline void Reset()

Reset the Trainer State at the end of an episode.

Attributes: inline

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 105, column 6)

ToProto

inline void ToProto(Schola::AgentState *OutState) const const

Fill a protobuf message (Schola::AgentState) with the agent’s state.

Parameters:

  • OutState (Schola::AgentState *) – [out] The protobuf message ptr to fill

Attributes: const, inline

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 116, column 6)

ToProto

inline Schola::AgentState * ToProto() const const

Convert this object to a protobuf message (Schola::AgentState)

Returns: A new protobuf message containing the contents of this object

Returns: Schola::AgentState *

Attributes: const, inline

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 125, column 20)

IsDone

inline bool IsDone() const const

Is this agent done the current episode of training.

Returns: true iff the agent is done it’s current episode.

Returns: bool

Attributes: const, inline

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 136, column 6)

ToResetProto

inline void ToResetProto(Schola::InitialAgentState &OutState) const const

Create a protobuf message (Schola::InitialAgentState) corresponding to the initial state of the agent after a reset.

Parameters:

  • OutState (Schola::InitialAgentState &) – [out] The protobuf message reference to fill

Attributes: const, inline

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 145, column 6)

Public Members:

float Reward

float Reward = = 0.0

The reward received by the agent in the last step.

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 45, column 7)

EAgentTrainingStatus LastStatus

EAgentTrainingStatus LastStatus = = EAgentTrainingStatus::Running

Whether we have sent out our last message after completing an episode.

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 49, column 22)

FDictPoint * Observations

FDictPoint * Observations

The vector observation of the agent in the last step.

Not a UProperty because FDictPoint is not blueprintable

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 52, column 12)

TMap<FString, FString> Info

TMap<FString, FString> Info

A map of key-value pairs containing additional information about the agent from the last step.

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 56, column 6)

EAgentTrainingStatus TrainingStatus

EAgentTrainingStatus TrainingStatus = = EAgentTrainingStatus::Running

The status of the agent in the last step.

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 60, column 22)

bool bExists

bool bExists = = false

Does the trainer associated with this state exist.

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 64, column 6)

int Step

int Step = = 0

The current step of the agent.

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 68, column 5)

Used By

This type is used by:

Source: Schola/Source/Schola/Public/Training/StateStructs/TrainerState.h (line 39, column 1)