浏览代码

update 3dball agent take discrete action

/ai-hw-2021
Ruo-Ping Dong 4 年前
当前提交
b28bf24a
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2
      com.unity.ml-agents/Runtime/Training/ReplayBuffer.cs
  2. 2
      com.unity.ml-agents/Runtime/Training/Trainer.cs

2
com.unity.ml-agents/Runtime/Training/ReplayBuffer.cs


var samples = new List<Transition>(batchSize);
for (var i = 0; i < batchSize; i++)
{
samples.Add(m_Buffer[m_CurrentIndex-1]);
samples.Add(m_Buffer[0]);
}
return samples;
}

2
com.unity.ml-agents/Runtime/Training/Trainer.cs


}
var samples = m_Buffer.SampleBatch(m_Config.batchSize);
// m_ModelRunner.UpdateModel(samples);
m_ModelRunner.UpdateModel(samples);
// Update target network
// if (m_TrainingStep % m_Config.updateTargetFreq == 0)

正在加载...
取消
保存