|
|
|
|
|
|
/// </summary>
|
|
|
|
public int episodeId; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Team Manager identifier.
|
|
|
|
/// </summary>
|
|
|
|
public string teamManagerId; |
|
|
|
|
|
|
|
public void ClearActions() |
|
|
|
{ |
|
|
|
storedVectorActions.Clear(); |
|
|
|
|
|
|
new int[m_ActuatorManager.NumDiscreteActions] |
|
|
|
); |
|
|
|
|
|
|
|
if (m_TeamManager != null) |
|
|
|
{ |
|
|
|
m_Info.teamManagerId = m_TeamManager.GetId(); |
|
|
|
} |
|
|
|
|
|
|
|
// The first time the Academy resets, all Agents in the scene will be
|
|
|
|
// forced to reset through the <see cref="AgentForceReset"/> event.
|
|
|
|
// To avoid the Agent resetting twice, the Agents will not begin their
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
// We request a decision so Python knows the Agent is done immediately
|
|
|
|
m_Brain?.RequestDecision(m_Info, sensors); |
|
|
|
ResetSensors(); |
|
|
|
SendDoneToTrainer(); |
|
|
|
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.storedVectorActions.Clear(); |
|
|
|
} |
|
|
|
|
|
|
|
public void SendDoneToTrainer() |
|
|
|
{ |
|
|
|
// We request a decision so Python knows the Agent is done immediately
|
|
|
|
m_Brain?.RequestDecision(m_Info, sensors); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
public void SetTeamManager(ITeamManager teamManager) |
|
|
|
{ |
|
|
|
m_TeamManager = teamManager; |
|
|
|
m_Info.teamManagerId = teamManager?.GetId(); |
|
|
|
teamManager?.RegisterAgent(this); |
|
|
|
} |
|
|
|
} |