Skip to content

Conversation

mitsunami
Copy link
Contributor

@mitsunami mitsunami commented Jun 20, 2023

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)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

* Updated com.unity.ml-agents/Runtime/DecisionRequester.cs
@CLAassistant
Copy link

CLAassistant commented Jun 20, 2023

CLA assistant check
All committers have signed the CLA.

@mitsunami mitsunami marked this pull request as ready for review June 20, 2023 14:16
Copy link
Contributor

@miguelalonsojr miguelalonsojr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@miguelalonsojr miguelalonsojr merged commit 8c6629f into Unity-Technologies:develop Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants