Navigation
API > API/Plugins > API/Plugins/LearningAgentsTraining > API/Plugins/LearningAgentsTraining/UPlanarPositionDifferencePenalty
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&40;BlueprintCallable, Category&61;"LearningAgents", Meta&61;&40;DefaultToSelf&61;"InAgentTrainer"&41;&41;
static UPlanarPositionDifferencePenalty &42; AddPlanarPositionDifferencePenalty
&40;
ULearningAgentsTrainer &42; InAgentTrainer,
const FName Name,
const float Weight,
const float Scale,
const float Threshold,
const FVector Axis0,
const FVector Axis1
&41;
Remarks
Adds a new planar difference penalty to the given trainer. The axis parameters define the plane. Call during ULearningAgentsTrainer::SetupRewards event. The newly created reward.
Parameters
| Name | Description |
|---|---|
| InAgentTrainer | The trainer to add this penalty to. |
| Name | The name of this new penalty. Used for debugging. |
| Weight | Multiplier for this penalty when being summed up for the total reward. |
| Scale | Used to normalize the data for the penalty. |
| Threshold | Minimal distance to apply this penalty. |
| Axis0 | The forward axis of the plane. |
| Axis1 | The right axis of the plane. |