浏览代码

Remove changes from base-teammanager

/develop/coma2/samenet
Ervin Teng 4 年前
当前提交
92320725
共有 4 个文件被更改,包括 15 次插入30 次删除
  1. 25
      com.unity.ml-agents/Runtime/Agent.cs
  2. 5
      com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
  3. 14
      com.unity.ml-agents/Runtime/ITeamManager.cs.meta
  4. 1
      com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs

25
com.unity.ml-agents/Runtime/Agent.cs


/// </summary>
float[] m_LegacyActionCache;
private ITeamManager m_TeamManager;
/// <summary>
/// This is used to avoid allocation of a float array during legacy calls to Heuristic.
/// </summary>

/// <summary>
/// The reason that the Agent has been set to "done".
/// </summary>
public enum DoneReason
enum DoneReason
{
/// <summary>
/// The episode was ended manually by calling <see cref="EndEpisode"/>.

}
}
// Request the last decision with no callbacks
if (m_TeamManager != null)
{
// Send final observations to TeamManager if it exists.
// The TeamManager is responsible to keeping track of the Agent after it's
// done, including propagating any "posthumous" rewards.
m_TeamManager.OnAgentDone(this, doneReason, sensors);
}
else
{
SendDoneToTrainer();
}
// We request a decision so Python knows the Agent is done immediately
m_Brain?.RequestDecision(m_Info, sensors);
ResetSensors();
// We also have to write any to any DemonstationStores so that they get the "done" flag.
foreach (var demoWriter in DemonstrationWriters)

m_RequestAction = false;
m_RequestDecision = false;
m_Info.storedActions.Clear();
}
public void SendDoneToTrainer()
{
// We request a decision so Python knows the Agent is done immediately
m_Brain?.RequestDecision(m_Info, sensors);
ResetSensors();
}
/// <summary>

5
com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs


agentInfoProto.ActionMask.AddRange(ai.discreteActionMasks);
}
if (ai.teamManagerId != null)
{
agentInfoProto.TeamManagerId = ai.teamManagerId;
}
return agentInfoProto;
}

14
com.unity.ml-agents/Runtime/ITeamManager.cs.meta


fileFormatVersion: 2
guid: 75810d91665e4477977eb78c9b15aeb3
timeCreated: 1610057818
fileFormatVersion: 2
guid: 8b061f82569af4ffba715297f77a95ab
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

1
com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs


/// </summary>
[HideInInspector, SerializeField, FormerlySerializedAs("m_TeamID")]
public int TeamId;
// TODO properties here instead of Agent
[FormerlySerializedAs("m_useChildSensors")]

正在加载...
取消
保存