Skip to content

Commit 3fd3fdf

Browse files
authored
Updated document on DecisionStep feature in DecisionRequester (#5940)
* Updated docs/Learning-Environment-Design-Agents.md * Fixed a typo in comments in com.unity.ml-agents/Runtime/DecisioRequester.cs
1 parent 8c6629f commit 3fd3fdf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

com.unity.ml-agents/Runtime/DecisionRequester.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public Agent Agent
6464

6565
internal void Awake()
6666
{
67-
Debug.Assert(DecisionStep < DecisionPeriod, "DecisionStep must be between 0 than DecisionPeriod - 1.");
67+
Debug.Assert(DecisionStep < DecisionPeriod, "DecisionStep must be between 0 and DecisionPeriod - 1.");
6868
m_Agent = gameObject.GetComponent<Agent>();
6969
Debug.Assert(m_Agent != null, "Agent component was not found on this gameObject and is required.");
7070
Academy.Instance.AgentPreStep += MakeRequests;

docs/Learning-Environment-Design-Agents.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,12 @@ intervals, add a `Decision Requester` component to the Agent's GameObject.
106106
Making decisions at regular step intervals is generally most appropriate for
107107
physics-based simulations. For example, an agent in a robotic simulator that
108108
must provide fine-control of joint torques should make its decisions every step
109-
of the simulation. On the other hand, an agent that only needs to make decisions
110-
when certain game or simulation events occur, such as in a turn-based game,
111-
should call `Agent.RequestDecision()` manually.
109+
of the simulation. In games such as real-time strategy, where many agents make
110+
their decisions at regular intervals, the decision timing for each agent can be
111+
staggered by setting the `DecisionStep` parameter in the `Decision Requester`
112+
component for each agent. On the other hand, an agent that only needs to make
113+
decisions when certain game or simulation events occur, such as in a turn-based
114+
game, should call `Agent.RequestDecision()` manually.
112115

113116
## Observations and Sensors
114117
In order for an agent to learn, the observations should include all the

0 commit comments

Comments
 (0)