Skip to content

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
1 participant