Navigation
API > API/Plugins > API/Plugins/MLAdapter
Inference agents have a neural network that can process senses and output actuations via their Think method. You can create a blueprint of this class to easily wire-up an agent that functions entirely inside the Unreal Engine.
| Name | UMLAdapterAgent_Inference |
| Type | class |
| Header File | /Engine/Plugins/AI/MLAdapter/Source/MLAdapter/Public/Agents/MLAdapterAgent_Inference.h |
| Include Path | #include "Agents/MLAdapterAgent_Inference.h" |
Syntax
UCLASS (Blueprintable, EditInlineNew)
class UMLAdapterAgent_Inference : public UMLAdapterAgent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UMLAdapterAgent → UMLAdapterAgent_Inference
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Brain | TSharedPtr< UE::NNE::IModelInstanceCPU > | The neural network controlling this agent. | Agents/MLAdapterAgent_Inference.h | |
| ModelData | TObjectPtr< UNNEModelData > | Reference to neural network asset data. | Agents/MLAdapterAgent_Inference.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| InputTensorSizeInBytes | uint32 | Agents/MLAdapterAgent_Inference.h | ||
| OutputTensorSizeInBytes | uint32 | Agents/MLAdapterAgent_Inference.h |
Functions
Public
Overridden from UMLAdapterAgent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Think
(
const float DeltaTime |
Process observations from the sensors with the neural network and populate the actuators with data. | Agents/MLAdapterAgent_Inference.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostInitProperties() |
Tries to load the neural network from the ModelDataPath. | Agents/MLAdapterAgent_Inference.h |
See Also
- UMLAdapterNoRPCManager - we do not usually need to open the RPC interface if we are exclusively using inference agents.