Navigation
API > API/Plugins > API/Plugins/LearningAgentsTraining > API/Plugins/LearningAgentsTraining/UConditionalReward
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 UConditionalReward &42; AddConditionalReward
&40;
ULearningAgentsTrainer &42; InAgentTrainer,
const FName Name,
const float Value
&41;
Remarks
Adds a new conditional reward to the given trainer. Call during ULearningAgentsTrainer::SetupRewards event. The newly created reward.
Parameters
| Name | Description |
|---|---|
| InAgentTrainer | The trainer to add this reward to. |
| Name | The name of this new reward. Used for debugging. |
| Value | The amount of reward to give the agent when the provided condition is true. |