Class BehaviorParameters
A component for setting an Agent instance's behavior and brain properties.
Inherited Members
Namespace: Unity.MLAgents.Policies
Syntax
[AddComponentMenu("ML Agents/Behavior Parameters", 0)]
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
[HideInInspector]
[SerializeField]
[FormerlySerializedAs("m_TeamID")]
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 |