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

[MLA-1129] Clear ActionBuffers before Heuristic calls #5227

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

chriselion
Copy link
Contributor

Proposed change(s)

Reset the ActionBuffers before calls to Agent.Heuristicand IHeuristicProvider.Heuristic. Whether or not the actions carried over between steps before was unspecified, not they're always initialized to zero.

Also clean up cases in the examples where we needed to work around the old behavior.

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

https://jira.unity3d.com/browse/MLA-1129
https://jira.unity3d.com/browse/MLA-1123

Types of change(s)

  • Code refactor
  • Breaking change

Checklist

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

@chriselion chriselion requested review from surfnerd and andrewcoh April 7, 2021 18:48
@chriselion
Copy link
Contributor Author

@surfnerd Anything that needs to change in the input system actuators? I had a quick look and it didn't look like it.

@surfnerd
Copy link
Contributor

surfnerd commented Apr 7, 2021

@surfnerd Anything that needs to change in the input system actuators? I had a quick look and it didn't look like it.

I don't think so. The input actuator just fills the ActionBuffers with whatever input state exists in the Heuristic method every frame. So there was no need to do any sort of clear in that case.

@chriselion chriselion merged commit 7281dc1 into main Apr 7, 2021
@delete-merged-branch delete-merged-branch bot deleted the MLA-1129-heuristic-reset-actions branch April 7, 2021 21:13
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2022
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