Navigation
API > API/Plugins > API/Plugins/LearningAgentsTraining > API/Plugins/LearningAgentsTraining/ULearningAgentsRewards
References
| Module | LearningAgentsTraining |
| Header | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgentsTraining/Public/LearningAgentsRewards.h |
| Include | #include "LearningAgentsRewards.h" |
| Source | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgentsTraining/Private/LearningAgentsRewards.cpp |
UFUNCTION (BlueprintPure, Category="LearningAgents",
Meta=(AdvancedDisplay=3, DefaultToSelf="VisualLoggerListener", DirectionA="1.0,0.0,0.0", DirectionB="1.0,0.0,0.0"))
static float MakeRewardFromDirectionSimilarity
(
const FVector DirectionA,
const FVector DirectionB,
const float RewardScale,
const FName Tag,
const bool bVisualLoggerEnabled,
ULearningAgentsManagerListener * VisualLoggerListener,
const int32 VisualLoggerAgentId,
const FVector VisualLoggerDirectionLocationA,
const FVector VisualLoggerDirectionLocationB,
const FVector VisualLoggerLocation,
const float VisualLoggerArrowLength,
const FLinearColor VisualLoggerColor
)
Remarks
Make a reward based on how similar two directions are. The resulting reward value.
Parameters
| Name | Description |
|---|---|
| DirectionA | The first direction. |
| DirectionB | The second direction. |
| RewardScale | The scale of the reward. Use a negative scale to create a penalty. |
| Tag | The tag for the reward. Used for debugging. |
| bVisualLoggerEnabled | When true, debug data will be sent to the visual logger. |
| VisualLoggerListener | The listener object which is making this reward. This must be set to use logging. |
| VisualLoggerAgentId | The agent id associated with this reward. |
| VisualLoggerDirectionLocationA | A location for the visual logger to display the first direction in the world. |
| VisualLoggerDirectionLocationB | A location for the visual logger to display the second direction in the world. |
| VisualLoggerLocation | A location for the visual logger information in the world. |
| VisualLoggerArrowLength | The length of the arrow to display for the directions. |
| VisualLoggerColor | The color for the visual logger display. |