Ruo-Ping Dong
4 年前
当前提交
aad7d342
共有 16 个文件被更改,包括 178 次插入 和 13 次删除
-
17com.unity.ml-agents/Runtime/Agent.cs
-
1com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
-
39com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfo.cs
-
14ml-agents-envs/mlagents_envs/base_env.py
-
11ml-agents-envs/mlagents_envs/communicator_objects/agent_info_pb2.py
-
6ml-agents-envs/mlagents_envs/communicator_objects/agent_info_pb2.pyi
-
21ml-agents-envs/mlagents_envs/rpc_utils.py
-
1protobuf-definitions/proto/mlagents_envs/communicator_objects/agent_info.proto
-
8com.unity.ml-agents.extensions/Runtime/Teams.meta
-
12com.unity.ml-agents/Runtime/Actuators/ITeamManager.cs
-
11com.unity.ml-agents/Runtime/Actuators/ITeamManager.cs.meta
-
13com.unity.ml-agents/Runtime/TeamManagerIdCounter.cs
-
11com.unity.ml-agents/Runtime/TeamManagerIdCounter.cs.meta
-
11com.unity.ml-agents.extensions/Runtime/Teams/BaseTeamManager.cs.meta
-
15com.unity.ml-agents.extensions/Runtime/Teams/BaseTeamManager.cs
|
|||
fileFormatVersion: 2 |
|||
guid: 77124df6c18c4f669052016b3116147e |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using Unity.MLAgents.Sensors; |
|||
|
|||
namespace Unity.MLAgents |
|||
{ |
|||
public interface ITeamManager |
|||
{ |
|||
int GetId(); |
|||
|
|||
void RegisterAgent(Agent agent); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 8b061f82569af4ffba715297f77a95ab |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Threading; |
|||
|
|||
namespace Unity.MLAgents |
|||
{ |
|||
internal static class TeamManagerIdCounter |
|||
{ |
|||
static int s_Counter; |
|||
public static int GetTeamManagerId() |
|||
{ |
|||
return Interlocked.Increment(ref s_Counter); ; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 06456db1475d84371b35bae4855db3c6 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: b2967f9c3bd4449a98ad309085094769 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace Unity.MLAgents.Extensions.Teams |
|||
{ |
|||
public class BaseTeamManager : ITeamManager |
|||
{ |
|||
readonly int m_Id = TeamManagerIdCounter.GetTeamManagerId(); |
|||
|
|||
|
|||
public virtual void RegisterAgent(Agent agent) { } |
|||
|
|||
public int GetId() |
|||
{ |
|||
return m_Id; |
|||
} |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue