Method AddGroupReward
AddGroupReward(float)
Increments the group rewards for all agents in this MultiAgentGroup.
Declaration
public void AddGroupReward(float reward)
Parameters
| Type | Name | Description |
|---|---|---|
| float | reward | Incremental group reward value. |
Remarks
This function increases or decreases the group rewards by a given amount for all agents in the group. Use SetGroupReward(float) to set the group reward assigned to the current step with a specific value rather than increasing or decreasing it.
A positive group reward indicates the whole group's accomplishments or desired behaviors. Every agent in the group will receive the same group reward no matter whether the agent's act directly leads to the reward. Group rewards are meant to reinforce agents to act in the group's best interest instead of individual ones. Group rewards are treated differently than individual agent rewards during training, so calling AddGroupReward() is not equivalent to calling agent.AddReward() on each agent in the group.