docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023