Navigation
API > API/Plugins > API/Plugins/LearningAgents
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- ULearningAgentsAction
- UFloatAction
- UFloatArrayAction
- UPlanarVelocityAction
- URotationAction
- URotationArrayAction
- UVectorAction
- UVectorArrayAction
References
| Module | LearningAgents |
| Header | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgents/Public/LearningAgentsActions.h |
| Include | #include "LearningAgentsActions.h" |
Syntax
UCLASS&40;Abstract, BlueprintType&41;
class ULearningAgentsAction : public UObject
Remarks
For functions in this file, we are favoring having more verbose names such as "AddFloatAction" vs simply "Add" in order to keep it easy to find the correct function in blueprints. The base class for all actions. Actions define the outputs from your agents. Action getters are marked non-pure by convention as many of them do non-trivial amounts of work that can cause performance issues when marked pure in blueprints.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TLearningArray< 1, uint64, TInlineAllocator< 32 > > | AgentGetIteration | Number of times this action has been got for all agents | |
| TLearningArray< 1, uint64, TInlineAllocator< 32 > > | AgentSetIteration | Number of times this action has been set for all agents | |
| TObjectPtr< ULearningAgentsInteractor > | Interactor | Reference to the Interactor this action is associated with. | |
| FLinearColor | VisualLogColor | Color used to draw this action in the visual log |
Functions
| Type | Name | Description | |
|---|---|---|---|
| uint64 | GetAgentGetIteration
(
const int32 AgentId |
Get the number of times an action has been got for the given agent id. | |
| uint64 | GetAgentSetIteration
(
const int32 AgentId |
Get the number of times an action has been set for the given agent id. | |
| void | Init
(
const int32 MaxAgentNum |
Initialize the internal state for a given maximum number of agents | |
| void | OnAgentsAdded
(
const TArray< int32 >& AgentIds |
Called whenever agents are added to the associated ULearningAgentsInteractor object. | |
| void | OnAgentsRemoved
(
const TArray< int32 >& AgentIds |
Called whenever agents are removed from the associated ULearningAgentsInteractor object. | |
| void | OnAgentsReset
(
const TArray< int32 >& AgentIds |
Called whenever agents are reset on the associated ULearningAgentsInteractor object. | |
| void | VisualLog
(
const UE::Learning::FIndexSet Instances |
Describes this action to the visual logger for debugging purposes. |