Navigation
API > API/Plugins > API/Plugins/LearningAgentsTraining > API/Plugins/LearningAgentsTraining/ULearningAgentsCommunicatorLibra-
Description
Start and connect to a training sub-process which will communicate via shared memory. Shared memory has the least communication overhead so prefer this for local development.
This must be called on game thread!
You can use this in place of calling "SpawnSharedMemoryTrainingProcess" followed by "MakeSharedMemoryCommunicator" for most use-cases.
If you wish to connect to an externally launched trainer (for debugging or scale-out reasons, etc.), you can use the following command-line options to override some settings: -LearningAgentsUseExternalTrainingProcess If present, spawning a sub-process will be skipped. -LearningAgentsControlsGuid={guid} This optional guid will override the SharedMemorySettings, so you can attach to shared memory control created by the trainer.
| Name | MakeSharedMemoryTrainingProcess |
| Type | function |
| Header File | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgentsTraining/Public/LearningAgentsCommunicator.h |
| Include Path | #include "LearningAgentsCommunicator.h" |
| Source | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgentsTraining/Private/LearningAgentsCommunicator.cpp |
UFUNCTION (BlueprintCallable, Category="LearningAgents",
Meta=(AutoCreateRefTerm="TrainerProcessSettings,SharedMemorySettings"))
static FLearningAgentsCommunicator MakeSharedMemoryTrainingProcess
(
const FLearningAgentsTrainerProcessSettings & TrainerProcessSettings,
const FLearningAgentsSharedMemoryCommunicatorSettings & SharedMemorySettings
)
Parameters
| Name | Remarks |
|---|---|
| TrainerProcessSettings | Settings universal to all trainer processes. |
| FLearningAgentsSharedMemoryCommunicatorSettings | Settings specific to shared memory communicators. |