@@ -98,7 +98,7 @@ public void CopyActions(ActionBuffers actionBuffers)
98
98
/// * <see cref="BehaviorType.InferenceOnly"/>: decisions are always made using the trained
99
99
/// model specified in the <see cref="BehaviorParameters"/> component.
100
100
/// * <see cref="BehaviorType.HeuristicOnly"/>: when a decision is needed, the agent's
101
- /// <see cref="Heuristic"/> function is called. Your implementation is responsible for
101
+ /// <see cref="Heuristic(in ActionBuffers) "/> function is called. Your implementation is responsible for
102
102
/// providing the appropriate action.
103
103
///
104
104
/// To trigger an agent decision automatically, you can attach a <see cref="DecisionRequester"/>
@@ -109,7 +109,7 @@ public void CopyActions(ActionBuffers actionBuffers)
109
109
/// can only take an action when it touches the ground, so several frames might elapse between
110
110
/// one decision and the need for the next.
111
111
///
112
- /// Use the <see cref="OnActionReceived(float[] )"/> function to implement the actions your agent can take,
112
+ /// Use the <see cref="OnActionReceived(ActionBuffers )"/> function to implement the actions your agent can take,
113
113
/// such as moving to reach a goal or interacting with its environment.
114
114
///
115
115
/// When you call <see cref="EndEpisode"/> on an agent or the agent reaches its <see cref="MaxStep"/> count,
@@ -125,7 +125,7 @@ public void CopyActions(ActionBuffers actionBuffers)
125
125
/// only use the [MonoBehaviour.Update] function for cosmetic purposes. If you override the [MonoBehaviour]
126
126
/// methods, [OnEnable()] or [OnDisable()], always call the base Agent class implementations.
127
127
///
128
- /// You can implement the <see cref="Heuristic"/> function to specify agent actions using
128
+ /// You can implement the <see cref="Heuristic(in ActionBuffers) "/> function to specify agent actions using
129
129
/// your own heuristic algorithm. Implementing a heuristic function can be useful
130
130
/// for debugging. For example, you can use keyboard input to select agent actions in
131
131
/// order to manually control an agent's behavior.
@@ -293,7 +293,7 @@ internal struct AgentParameters
293
293
294
294
/// <summary>
295
295
/// VectorActuator which is used by default if no other sensors exist on this Agent. This VectorSensor will
296
- /// delegate its actions to <see cref="OnActionReceived(float[] )"/> by default in order to keep backward compatibility
296
+ /// delegate its actions to <see cref="OnActionReceived(ActionBuffers )"/> by default in order to keep backward compatibility
297
297
/// with the current behavior of Agent.
298
298
/// </summary>
299
299
IActuator m_VectorActuator ;
@@ -630,7 +630,7 @@ public int CompletedEpisodes
630
630
/// Use <see cref="AddReward(float)"/> to incrementally change the reward rather than
631
631
/// overriding it.
632
632
///
633
- /// Typically, you assign rewards in the Agent subclass's <see cref="OnActionReceived(float[] )"/>
633
+ /// Typically, you assign rewards in the Agent subclass's <see cref="OnActionReceived(ActionBuffers )"/>
634
634
/// implementation after carrying out the received action and evaluating its success.
635
635
///
636
636
/// Rewards are used during reinforcement learning; they are ignored during inference.
@@ -859,11 +859,12 @@ public virtual void Initialize() { }
859
859
/// You can also use the [Input System package], which provides a more flexible and
860
860
/// configurable input system.
861
861
/// <code>
862
- /// public override void Heuristic(ActionBuffers actionsOut)
862
+ /// public override void Heuristic(in ActionBuffers actionsOut)
863
863
/// {
864
- /// actionsOut.ContinuousActions[0] = Input.GetAxis("Horizontal");
865
- /// actionsOut.ContinuousActions[1] = Input.GetKey(KeyCode.Space) ? 1.0f : 0.0f;
866
- /// actionsOut.ContinuousActions[2] = Input.GetAxis("Vertical");
864
+ /// var continuousActionsOut = actionsOut.ContinuousActions;
865
+ /// continuousActionsOut[0] = Input.GetAxis("Horizontal");
866
+ /// continuousActionsOut[1] = Input.GetKey(KeyCode.Space) ? 1.0f : 0.0f;
867
+ /// continuousActionsOut[2] = Input.GetAxis("Vertical");
867
868
/// }
868
869
/// </code>
869
870
/// [Input Manager]: https://docs.unity3d.com/Manual/class-InputManager.html
0 commit comments