|
|
|
|
|
|
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; |
|
|
|
} |
|
|
|