docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct AgentInfo

    Struct that contains all the information for an Agent, including its observations, actions and current status.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.MLAgents
    Assembly: Unity.ML-Agents.dll
    Syntax
    public struct AgentInfo

    Fields

    discreteActionMasks

    For discrete control, specifies the actions that the agent cannot take. An element of the mask array is true if the action is prohibited.

    Declaration
    public bool[] discreteActionMasks
    Field Value
    Type Description
    bool[]

    done

    Whether the agent is done or not.

    Declaration
    public bool done
    Field Value
    Type Description
    bool

    episodeId

    Episode identifier each agent receives at every reset. It is used to separate between different agents in the environment.

    Declaration
    public int episodeId
    Field Value
    Type Description
    int

    groupId

    MultiAgentGroup identifier.

    Declaration
    public int groupId
    Field Value
    Type Description
    int

    groupReward

    The current group reward received by the agent.

    Declaration
    public float groupReward
    Field Value
    Type Description
    float

    maxStepReached

    Whether the agent has reached its max step count for this episode.

    Declaration
    public bool maxStepReached
    Field Value
    Type Description
    bool

    reward

    The current agent reward.

    Declaration
    public float reward
    Field Value
    Type Description
    float

    storedActions

    Keeps track of the last actions taken by the Brain.

    Declaration
    public ActionBuffers storedActions
    Field Value
    Type Description
    ActionBuffers

    Methods

    ClearActions()

    Clear stored actions.

    Declaration
    public void ClearActions()

    CopyActions(ActionBuffers)

    Copy actions.

    Declaration
    public void CopyActions(ActionBuffers actionBuffers)
    Parameters
    Type Name Description
    ActionBuffers actionBuffers

    The ActionBuffers to copy from.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)