浏览代码

fix push obs

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

12
com.unity.ml-agents/Runtime/Training/TrainingPolicy.cs


if (m_HasLastObservation)
{
m_buffer.Push(m_LastInfo, m_LastObservations, m_CurrentObservations);
m_buffer.Push(info, m_LastObservations, m_CurrentObservations);
}
else if (m_buffer.Count == 0)
{

m_LastInfo = info;
m_HasLastObservation = !info.done;
}
m_HasLastObservation = true;
if (info.done == true)
{
m_buffer.Push(info, m_CurrentObservations, m_CurrentObservations); // dummy next_state
m_HasLastObservation = false;
}
}

正在加载...
取消
保存