Navigation
API > API/Plugins > API/Plugins/LearningTraining
Interface for communicating with an external trainer process.
| Name | IExternalTrainer |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/LearningAgents/Source/LearningTraining/Public/LearningExternalTrainer.h |
| Include Path | #include "LearningExternalTrainer.h" |
Syntax
struct IExternalTrainer
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IExternalTrainer() |
LearningExternalTrainer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 AddNetwork
(
const ULearningNeuralNetworkData& Network |
Adds the network to this external trainer. | LearningExternalTrainer.h | |
int32 AddReplayBuffer
(
const FReplayBuffer& ReplayBuffer |
Adds a named replay buffer to this external trainer. | LearningExternalTrainer.h | |
bool HasNetworkOrCompleted() |
Returns true if we can receive a network or training completed. Otherwise, false. | LearningExternalTrainer.h | |
bool IsValid() |
Returns true if this trainer is valid. Otherwise, false. | LearningExternalTrainer.h | |
ETrainerResponse ReceiveNetwork
(
const int32 NetworkId, |
Wait for the trainer to push an updated network. | LearningExternalTrainer.h | |
TArray< ETrainerResponse > ReceiveNetworks
(
const TArray< int32 >& NetworkIds, |
Wait for the trainer to push an array of updated networks. | LearningExternalTrainer.h | |
ETrainerResponse SendConfigs
(
const TSharedRef< FJsonObject >& DataConfigObject, |
Sends the given json configs to the trainer process. | LearningExternalTrainer.h | |
ETrainerResponse SendNetwork
(
const int32 NetworkId, |
Wait for the trainer to be ready and push the current policy network. | LearningExternalTrainer.h | |
ETrainerResponse SendReplayBuffer
(
const int32 ReplayBufferId, |
Wait for the trainer to be ready and send new experience. | LearningExternalTrainer.h | |
ETrainerResponse SendStop() |
Signal for the trainer to stop. | LearningExternalTrainer.h | |
void Terminate() |
Terminate the trainer immediately. | LearningExternalTrainer.h | |
ETrainerResponse Wait() |
Wait for the trainer to finish. | LearningExternalTrainer.h |