浏览代码

store registered agents in set

/MLA-1734-demo-provider
Ruo-Ping Dong 3 年前
当前提交
6d949535
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 7
      com.unity.ml-agents.extensions/Runtime/MultiAgent/BaseMultiAgentGroup.cs

7
com.unity.ml-agents.extensions/Runtime/MultiAgent/BaseMultiAgentGroup.cs


using System;
using System.Linq;
using System.Collections.Generic;
namespace Unity.MLAgents.Extensions.MultiAgent

int m_StepCount;
int m_GroupMaxStep;
readonly int m_Id = MultiAgentGroupIdCounter.GetGroupId();
List<Agent> m_Agents = new List<Agent> { };
HashSet<Agent> m_Agents = new HashSet<Agent>();
public void Dispose()

UnregisterAgent(m_Agents[0]);
UnregisterAgent(m_Agents.First());
}
}

/// <returns>
/// List of agents registered to the MultiAgentGroup.
/// </returns>
public List<Agent> GetRegisteredAgents()
public HashSet<Agent> GetRegisteredAgents()
{
return m_Agents;
}

正在加载...
取消
保存