浏览代码

fix so we can now destroy the agent in AgentOnDone()

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

3
unity-environment/Assets/ML-Agents/Scripts/Brain.cs


/// Is used by the Academy to reset the agents if they are done
public void ResetIfDone()
{
foreach (Agent agent in agents.Values)
var agentsToIterate = agents.Values.ToList();
foreach (Agent agent in agentsToIterate)
{
if (agent.done)
{

正在加载...
取消
保存