Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix action assignment bug in multi-dimensional action space #5889

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

MortalreminderPT
Copy link

@MortalreminderPT MortalreminderPT commented Mar 29, 2023

Proposed change(s)

This PR fixes a bug that causes all actions to be assigned to the first dimension in a multi-dimensional action space. I modified the action assignment logic to handle different types of action spaces, such as discrete, continuous, and hybrid. I tested my code on three environments: SoccerTwo, FoodCollector, and 3DBall, and verified that it can correctly assign actions in each case.

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

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

Modify self._current_action[current_behavior] so that actions can be passed to Unity exactly.
MultiDiscrete actions in Unity cannot be executed correctly, so you need to assign action.discrete directly to self._current_action[current_behavior].discrete
verified that it can correctly assign actions in each case
@MortalreminderPT MortalreminderPT changed the title MultiDiscrete actions bug solving multi-dimensional action space Mar 30, 2023
@MortalreminderPT MortalreminderPT changed the title multi-dimensional action space Fix action assignment bug in multi-dimensional action space Mar 30, 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.

1 participant