Skip to content

Make the demoRecorder write the experience on reset #3463

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 3 commits into from
Feb 18, 2020

Conversation

vincentpierre
Copy link
Contributor

Proposed change(s)

Fixing the demo recording of experiences when the agent is done

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

ML-640

Types of change(s)

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

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added updated the changelog (if applicable)
  • I have added necessary documentation (if applicable)
  • I have updated the migration guide (if applicable)

Other comments

@ervteng
Copy link
Contributor

ervteng commented Feb 18, 2020

BTW can you re-record test.demo (it's just 3DBall using inference) in the test directory? Just so we can make sure the Python is compatible with the new demos

{
AgentAction(m_Action.vectorActions);
}
AgentAction(m_Action.vectorActions);
}
}

void DecideAction()
{
m_Action.vectorActions = m_Brain?.DecideAction();
Copy link
Contributor

@ervteng ervteng Feb 18, 2020

Choose a reason for hiding this comment

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

Can we just call ResetData() here if there aren't any vectorActions?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think that might be better; ResetData() resets the stored actions, but this change keeps them (possibly with stale data).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are not really reseting the data, we are generating a vector of zeros in the case the action is null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, changed it since there seems to be consensus.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then how about moving the vectorAction code from ResetData to a new method (ResetActions()?), call that from ResetData, and call it here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, missed your most recent comment before I made mine.

@vincentpierre vincentpierre merged commit 45e475f into master Feb 18, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-fix-record-notifyondone branch February 18, 2020 19:57
@ervteng ervteng mentioned this pull request Feb 18, 2020
10 tasks
@vincentpierre vincentpierre self-assigned this Feb 19, 2020
anupam-142857 pushed a commit that referenced this pull request Feb 26, 2020
* Make the demoRecorder write the experience on reset

* do nothing if demostore is null

* Calling reset data if the action is null
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 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