Struct ActionSpec
Defines the structure of the actions to be used by the Actuator system.
Inherited Members
Namespace: Unity.MLAgents.Actuators
Assembly: solution.dll
Syntax
[Serializable]
public struct ActionSpec
Constructors
| Name | Description |
|---|---|
| ActionSpec(int, int[]) | Create an ActionSpec initialized with the specified action sizes. |
Fields
| Name | Description |
|---|---|
| BranchSizes | An array of branch sizes for discrete actions. For an IActuator that uses discrete actions, the number of branches is the Length of the Array and each index contains the branch size. The cumulative sum of the total number of discrete actions can be retrieved by the SumOfDiscreteBranchSizes property. For an IActuator with a Continuous it will be null. |
Properties
| Name | Description |
|---|---|
| NumContinuousActions | The number of continuous actions that an Agent can take. |
| NumDiscreteActions | The number of branches for discrete actions that an Agent can take. |
| SumOfDiscreteBranchSizes | Get the total number of Discrete Actions that can be taken by calculating the Sum of all of the Discrete Action branch sizes. |
Methods
| Name | Description |
|---|---|
| Combine(params ActionSpec[]) | Combines a list of actions specs and allocates a new array of branch sizes if needed. |
| MakeContinuous(int) | Creates a Continuous ActionSpec with the number of actions available. |
| MakeDiscrete(params int[]) | Creates a Discrete ActionSpec with the array of branch sizes that represents the action space. |