unreal.LearningAgentsCommunicatorLibrary¶
- class unreal.LearningAgentsCommunicatorLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryContains functions for starting external trainers and communicating with them.
C++ Source:
Plugin: LearningAgents
Module: LearningAgentsTraining
File: LearningAgentsCommunicator.h
Create a communicator which can be used to interact with a previously started shared memory trainer process.
- Parameters:
trainer_process (LearningAgentsTrainerProcess) – The shared memory trainer process to communicate with.
shared_memory_settings (LearningAgentsSharedMemoryCommunicatorSettings)
- Return type:
- classmethod make_socket_communicator(trainer_process, socket_settings=[]) LearningAgentsCommunicator¶
Create a communicator which can be used to interact with a previously started socket trainer process.
- Parameters:
trainer_process (LearningAgentsTrainerProcess) – The socket trainer process to communicate with (optional).
socket_settings (LearningAgentsSocketCommunicatorSettings)
- Return type:
Start a local python 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!
- Parameters:
trainer_process_settings (LearningAgentsTrainerProcessSettings) – Settings universal to all trainer processes.
shared_memory_settings (LearningAgentsSharedMemoryCommunicatorSettings)
- Return type:
- classmethod spawn_socket_training_process(trainer_process_settings=[], socket_settings=[]) LearningAgentsTrainerProcess¶
Start a local python training sub-process which will communicate via sockets. Sockets have some overhead compared to shared memory but can work over networked connects. This provides no encryption so do not use on public internet if privacy is a concern.
This must be called on game thread!
- Parameters:
trainer_process_settings (LearningAgentsTrainerProcessSettings) – Settings universal to all trainer processes.
socket_settings (LearningAgentsSocketCommunicatorSettings)
- Return type: