Class BrainParameters
Holds information about the brain. It defines what are the inputs and outputs of the decision process.
Inherited Members
Namespace: Unity.MLAgents.Policies
Syntax
[Serializable]
public class BrainParameters : ISerializationCallbackReceiver
Remarks
Set brain parameters for an Agent instance using the BehaviorParameters component attached to the agent's GameObject.
Fields
NumStackedVectorObservations
Stacking refers to concatenating the observations across multiple frames. This field indicates the number of frames to concatenate across.
Declaration
[FormerlySerializedAs("numStackedVectorObservations")]
[Range(1F, 50F)]
public int NumStackedVectorObservations
Field Value
Type | Description |
---|---|
Int32 |
VectorActionDescriptions
The list of strings describing what the actions correspond to.
Declaration
[FormerlySerializedAs("vectorActionDescriptions")]
public string[] VectorActionDescriptions
Field Value
Type | Description |
---|---|
String[] |
VectorActionSize
(Deprecated) The number of possible actions.
Declaration
[Obsolete("VectorActionSize has been deprecated, please use ActionSpec instead.")]
[FormerlySerializedAs("vectorActionSize")]
public int[] VectorActionSize
Field Value
Type | Description |
---|---|
Int32[] | For the continuous actions: the length of the float vector that represents the action. For the discrete actions: the number of branches. |
Remarks
The size specified is interpreted differently depending on whether the agent uses the continuous or the discrete actions.
VectorActionSpaceType
(Deprecated) Defines if the action is discrete or continuous.
Declaration
[Obsolete("VectorActionSpaceType has been deprecated, please use ActionSpec instead.")]
[FormerlySerializedAs("vectorActionSpaceType")]
public SpaceType VectorActionSpaceType
Field Value
Type | Description |
---|---|
SpaceType |
VectorObservationSize
The number of the observations that are added in CollectObservations(VectorSensor)
Declaration
[FormerlySerializedAs("vectorObservationSize")]
public int VectorObservationSize
Field Value
Type | Description |
---|---|
Int32 | The length of the vector containing observation values. |
Properties
ActionSpec
The specification of the Actions for the BrainParameters.
Declaration
public ActionSpec ActionSpec { get; set; }
Property Value
Type | Description |
---|---|
ActionSpec |
NumActions
(Deprecated) The number of actions specified by this Brain.
Declaration
[Obsolete("NumActions has been deprecated, please use ActionSpec instead.")]
public int NumActions { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Clone()
Deep clones the BrainParameter object.
Declaration
public BrainParameters Clone()
Returns
Type | Description |
---|---|
BrainParameters | A new BrainParameter object with the same values as the original. |
OnAfterDeserialize()
Called by Unity immediately after deserializing this object.
Declaration
public void OnAfterDeserialize()
Implements
OnBeforeSerialize()
Called by Unity immediately before serializing this object.
Declaration
public void OnBeforeSerialize()