Navigation
API > API/Plugins > API/Plugins/LearningAgentsTraining > API/Plugins/LearningAgentsTraining/ULearningAgentsTrainingEnvironme-
Description
This callback can be overridden by the Trainer and gathers all the reward values for the given set of agents. By default this will call GatherAgentReward on each agent.
| Name | GatherAgentRewards |
| Type | function |
| Header File | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgentsTraining/Public/LearningAgentsTrainingEnvironment.h |
| Include Path | #include "LearningAgentsTrainingEnvironment.h" |
UFUNCTION (BlueprintNativeEvent, Category="LearningAgents", Meta=(ForceAsFunction))
void GatherAgentRewards
(
TArray < float > & OutRewards,
const TArray < int32 > & AgentIds
)
Parameters
| Name | Remarks |
|---|---|
| OutRewards | Output rewards for each agent in AgentIds |
| AgentIds | Agents to gather rewards for. |