|
|
|
|
|
|
ConfigureEnvironment(); |
|
|
|
} |
|
|
|
|
|
|
|
private void UpdateResetParameters() |
|
|
|
{ |
|
|
|
var newResetParameters = brainBatcher.GetEnvironmentParameters(); |
|
|
|
if (newResetParameters != null) |
|
|
|
{ |
|
|
|
foreach (var kv in newResetParameters.FloatParameters) |
|
|
|
{ |
|
|
|
resetParameters[kv.Key] = kv.Value; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void HandleLog(string logString, string stackTrace, LogType type) |
|
|
|
{ |
|
|
|
logWriter = new StreamWriter(logPath, true); |
|
|
|
|
|
|
if (brainBatcher.GetCommand() == |
|
|
|
MLAgents.CommunicatorObjects.CommandProto.Reset) |
|
|
|
{ |
|
|
|
// Update reset parameters.
|
|
|
|
var newResetParameters = brainBatcher.GetEnvironmentParameters(); |
|
|
|
if (newResetParameters != null) |
|
|
|
{ |
|
|
|
foreach (var kv in newResetParameters.FloatParameters) |
|
|
|
{ |
|
|
|
resetParameters[kv.Key] = kv.Value; |
|
|
|
} |
|
|
|
} |
|
|
|
UpdateResetParameters(); |
|
|
|
|
|
|
|
SetIsInference(!brainBatcher.GetIsTraining()); |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
else if (!firstAcademyReset) |
|
|
|
{ |
|
|
|
UpdateResetParameters(); |
|
|
|
ForcedFullReset(); |
|
|
|
} |
|
|
|
|
|
|
|