Skip to content

Actuator Module self contained without other changes. #4297

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

Merged
merged 22 commits into from
Aug 6, 2020

Conversation

surfnerd
Copy link
Contributor

@surfnerd surfnerd commented Aug 3, 2020

Proposed change(s)

Add the Actuator abstraction to ML-Agents as a self-contained module in order to avoid having an enormous pull request.

Notable Additions:

  • IActionReceiver
    • Low-level interface that defines how RL actions can be passed to an object and how those actions (if discrete) can be masked.
  • IActuator (inherits from IActionReceiver)
    • The Actuator interface that describes the data and function of the actuator.
    • Contains the ActionSpaceDef for both continuous and discrete actions
  • IDiscreteActionMask (Passed to IActionReceiver)
    • The interface that allows different IDiscreteActionMasks to be implemented
  • ActionSegment
    • A struct that allows for accessing an array of actions at offsets rather than copying sub-arrays around.
  • ActuatorManager (an interface could probably be extracted from this class)
    • Handles the majority of the actuator logic for an Agent including:
      • buffer management
      • event life-cycle
        • writing to the action mask
        • executing actions
        • general bookkeeping of other metadata about the Actuators.

Questionable names:

  • ActionSpaceDef
    • Defines a specific action space for an actuator (i.e. discrete and continuous at the moment.)
  • ActuatorDiscreteActionMask
    • Keeps an action mask for all of the actuators' actions.

TODO:

  • Docs

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

https://jira.unity3d.com/browse/MLA-789

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

@surfnerd surfnerd requested a review from chriselion August 3, 2020 20:21
@surfnerd surfnerd self-assigned this Aug 4, 2020
@surfnerd surfnerd requested a review from vincentpierre August 5, 2020 18:08
Copy link
Contributor

@vincentpierre vincentpierre left a comment

Choose a reason for hiding this comment

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

I did not see the BufferedDiscreteActionMask mentioned in the PR comment, is it still in the PR?
I made some initial comments but I need to review it some more.

Copy link
Contributor

@chriselion chriselion left a comment

Choose a reason for hiding this comment

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

A few final nits, but looks good!

@surfnerd surfnerd merged commit 1ccd879 into master Aug 6, 2020
@delete-merged-branch delete-merged-branch bot deleted the master-actuators-1 branch August 6, 2020 16:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants