diff --git a/com.unity.ml-agents/Runtime/DecisionRequester.cs b/com.unity.ml-agents/Runtime/DecisionRequester.cs index bee232f5746..cf2ae5dc718 100644 --- a/com.unity.ml-agents/Runtime/DecisionRequester.cs +++ b/com.unity.ml-agents/Runtime/DecisionRequester.cs @@ -64,7 +64,7 @@ public Agent Agent internal void Awake() { - Debug.Assert(DecisionStep < DecisionPeriod, "DecisionStep must be between 0 than DecisionPeriod - 1."); + Debug.Assert(DecisionStep < DecisionPeriod, "DecisionStep must be between 0 and DecisionPeriod - 1."); m_Agent = gameObject.GetComponent(); Debug.Assert(m_Agent != null, "Agent component was not found on this gameObject and is required."); Academy.Instance.AgentPreStep += MakeRequests; diff --git a/docs/Learning-Environment-Design-Agents.md b/docs/Learning-Environment-Design-Agents.md index 411103b462d..667d8d03ff3 100644 --- a/docs/Learning-Environment-Design-Agents.md +++ b/docs/Learning-Environment-Design-Agents.md @@ -106,9 +106,12 @@ intervals, add a `Decision Requester` component to the Agent's GameObject. Making decisions at regular step intervals is generally most appropriate for physics-based simulations. For example, an agent in a robotic simulator that must provide fine-control of joint torques should make its decisions every step -of the simulation. On the other hand, an agent that only needs to make decisions -when certain game or simulation events occur, such as in a turn-based game, -should call `Agent.RequestDecision()` manually. +of the simulation. In games such as real-time strategy, where many agents make +their decisions at regular intervals, the decision timing for each agent can be +staggered by setting the `DecisionStep` parameter in the `Decision Requester` +component for each agent. On the other hand, an agent that only needs to make +decisions when certain game or simulation events occur, such as in a turn-based +game, should call `Agent.RequestDecision()` manually. ## Observations and Sensors In order for an agent to learn, the observations should include all the