Struct ActionBuffers
A structure that wraps the ActionSegment<T>s for a particular IActionReceiver and is used when OnActionReceived(ActionBuffers) is called.
Inherited Members
Namespace: Unity.MLAgents.Actuators
Assembly: solution.dll
Syntax
public readonly struct ActionBuffers
Constructors
| Name | Description |
|---|---|
| ActionBuffers(float[], int[]) | Construct an ActionBuffers instance with the continuous and discrete actions that will be used. /// |
| ActionBuffers(ActionSegment<float>, ActionSegment<int>) | Construct an ActionBuffers instance with the continuous and discrete actions that will be used. |
| ActionBuffers(ActionSpec) | Construct an ActionBuffers instance with ActionSpec. All values are initialized to zeros. /// |
Fields
| Name | Description |
|---|---|
| Empty | An empty action buffer. |
Properties
| Name | Description |
|---|---|
| ContinuousActions | Holds the Continuous ActionSegment<T> to be used by an IActionReceiver. |
| DiscreteActions | Holds the Discrete ActionSegment<T> to be used by an IActionReceiver. |
Methods
| Name | Description |
|---|---|
| Clear() | Clear the ContinuousActions and DiscreteActions segments to be all zeros. |
| Equals(object) | Indicates whether the current ActionBuffers is equal to another ActionBuffers. |
| FromDiscreteActions(float[]) | Create an ActionBuffers instance with discrete actions stored as a float array. This exists to achieve backward compatibility with the former Agent methods which used a float array for both continuous and discrete actions. |
| GetHashCode() | Computes the hash code of the ActionBuffers. |
| IsEmpty() | Check if the ActionBuffers is empty. |