Added DecisionStep parameter to the decision requester #5939
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change(s)
I propose to introduce a new parameter, named DecisionStep, into the DecisionRequester module. This addition will allow the staggering of execution timing for each agent. This would be useful for developers when using multi-agents, leading to more stable performance. Otherwise, you would experience significant processing time spikes every DecisionPeriod step.
The default value of DecisionStep is set to zero, which means it will behave exactly the same as the default DecisionRequester when not adjusted.
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
This is a proposal from our experience developing a multi-agent game, we believe it would be beneficial to allow manual setting of DecisionStep for each agent rather than automatic/random adjustment because it allows to specify which agents to run in batch as efficiently as possible.
This feature is a generalized implementation of the one used in the demo we presented and showcased at GDC2023. An overview of the presentation and demo can be found at the following link:
Types of change(s)
Checklist
Other comments