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"))
static float MakeRewardFromRotationSimilarity
(
const FRotator RotationA,
const FRotator RotationB,
const float RewardScale,
const FName Tag,
const bool bVisualLoggerEnabled,
ULearningAgentsManagerListener * VisualLoggerListener,
const int32 VisualLoggerAgentId,
const FVector VisualLoggerRotationLocationA,
const FVector VisualLoggerRotationLocationB,
const FVector VisualLoggerLocation,
const FLinearColor VisualLoggerColor
)
Remarks
Make a reward based on how similar two rotations are. The resulting reward value.
Parameters
| Name | Description |
|---|---|
| RotationA | The first rotation. |
| RotationB | The second rotation. |
| 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. |
| VisualLoggerRotationLocationA | A location for the visual logger to display the first rotation in the world. |
| VisualLoggerRotationLocationB | A location for the visual logger to display the second rotation in the world. |
| VisualLoggerLocation | A location for the visual logger information in the world. |
| VisualLoggerColor | The color for the visual logger display. |