Skip to content

A couple fixes for recording demonstrations #1999

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 10 commits into from
May 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed issue where extra action taken after Done()
  • Loading branch information
Ervin Teng committed Apr 30, 2019
commit d09d209ae28bf85272deeeac70e77ec8385fe4ee
4 changes: 3 additions & 1 deletion UnitySDK/Assets/ML-Agents/Scripts/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ void SendInfoToBrain()
{
info.storedVectorActions = action.vectorActions;
}

info.storedTextActions = action.textActions;
info.vectorObservation.Clear();
actionMasker.ResetMask();
Expand Down Expand Up @@ -1021,6 +1021,8 @@ void ResetIfDone()
// as it is done
_AgentReset();
hasAlreadyReset = true;
requestDecision = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

How can we make sure this does not break stuff ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do any of our environments (aside from Snoopy Pop, where this does work) use On Demand Decisions?

Copy link
Contributor

Choose a reason for hiding this comment

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

Bouncer uses ODD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Training Bouncer, seems to work (1.0 reward after 50k steps and climbing)

requestAction = false;
}
}
else if (requestDecision)
Expand Down