docs.unity3d.com
    Show / Hide Table of Contents

    Class BehaviorParameters

    A component for setting an Agent instance's behavior and brain properties.

    Inheritance
    Object
    BehaviorParameters
    Namespace: Unity.MLAgents.Policies
    Syntax
    public class BehaviorParameters : MonoBehaviour
    Remarks

    At runtime, this component generates the agent's policy objects according to the settings you specified in the Editor.

    Fields

    TeamId

    The team ID for this behavior.

    Declaration
    public int TeamId
    Field Value
    Type Description
    Int32

    Properties

    BehaviorName

    The name of this behavior, which is used as a base name. See FullyQualifiedBehaviorName for the full name. This should not be set at runtime; use SetModel(String, NNModel, InferenceDevice) to set it instead.

    Declaration
    public string BehaviorName { get; set; }
    Property Value
    Type Description
    String

    BehaviorType

    The BehaviorType for the Agent.

    Declaration
    public BehaviorType BehaviorType { get; set; }
    Property Value
    Type Description
    BehaviorType

    BrainParameters

    The associated BrainParameters for this behavior.

    Declaration
    public BrainParameters BrainParameters { get; }
    Property Value
    Type Description
    BrainParameters

    FullyQualifiedBehaviorName

    Returns the behavior name, concatenated with any other metadata (i.e. team id).

    Declaration
    public string FullyQualifiedBehaviorName { get; }
    Property Value
    Type Description
    String

    InferenceDevice

    How inference is performed for this Agent's model. This should not be set at runtime; use SetModel(String, NNModel, InferenceDevice) to set it instead.

    Declaration
    public InferenceDevice InferenceDevice { get; set; }
    Property Value
    Type Description
    InferenceDevice

    Model

    The neural network model used when in inference mode. This should not be set at runtime; use SetModel(String, NNModel, InferenceDevice) to set it instead.

    Declaration
    public NNModel Model { get; set; }
    Property Value
    Type Description
    NNModel

    ObservableAttributeHandling

    Determines how the Agent class is searched for ObservableAttributes.

    Declaration
    public ObservableAttributeOptions ObservableAttributeHandling { get; set; }
    Property Value
    Type Description
    ObservableAttributeOptions

    UseChildActuators

    Whether or not to use all the actuator components attached to child GameObjects of the agent. Note that changing this after the Agent has been initialized will not have any effect.

    Declaration
    public bool UseChildActuators { get; set; }
    Property Value
    Type Description
    Boolean

    UseChildSensors

    Whether or not to use all the sensor components attached to child GameObjects of the agent. Note that changing this after the Agent has been initialized will not have any effect.

    Declaration
    public bool UseChildSensors { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    IsInHeuristicMode()

    Query the behavior parameters in order to see if the Agent is running in Heuristic Mode.

    Declaration
    public bool IsInHeuristicMode()
    Returns
    Type Description
    Boolean

    true if the Agent is running in Heuristic mode.

    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