浏览代码

fix on the SetCumulativeReward() method in Agent.cs

/develop-generalizationTraining-TrainerController
vincentpierre 7 年前
当前提交
15f29084
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 8
      unity-environment/Assets/ML-Agents/Scripts/Agent.cs

8
unity-environment/Assets/ML-Agents/Scripts/Agent.cs


{
memory = new float[brain.brainParameters.memorySize];
stepCounter = 0;
CumulativeReward = 0f;
AgentReset();
}

public void SetCumulativeReward()
{
CumulativeReward += reward;
if (!done) {
CumulativeReward += reward;
}
else{
CumulativeReward = 0f;
}
}
/// Do not modify : Is used by the brain to collect done.

正在加载...
取消
保存