/// <summary> /// Performs a single environment update to the Academy, and Agent /// objects within the environment. /// </summary> public void EnvironmentStep() { if (!m_HadFirstReset) { ForcedFullReset(); } AgentSetStatus?.Invoke(m_StepCount); m_StepCount += 1; m_TotalStepCount += 1; AgentIncrementStep?.Invoke(); using (TimerStack.Instance.Scoped("AgentSendState")) { AgentSendState?.Invoke(); } using (TimerStack.Instance.Scoped("DecideAction")) { DecideAction?.Invoke(); } // If the communicator is not on, we need to clear the SideChannel sending queue if (!IsCommunicatorOn) { SideChannelUtils.GetSideChannelMessage(); } using (TimerStack.Instance.Scoped("AgentAct")) { AgentAct?.Invoke(); } }
/// <summary> /// Performs a single environment update to the Academy, and Agent /// objects within the environment. /// </summary> public void EnvironmentStep() { if (!m_FirstAcademyReset) { ForcedFullReset(); } AgentSetStatus?.Invoke(m_StepCount); using (TimerStack.Instance.Scoped("AgentSendState")) { AgentSendState?.Invoke(); } using (TimerStack.Instance.Scoped("DecideAction")) { DecideAction?.Invoke(); } using (TimerStack.Instance.Scoped("AgentAct")) { AgentAct?.Invoke(); } m_StepCount += 1; m_TotalStepCount += 1; }
/// <summary> /// Performs a single environment update to the Academy, and Agent /// objects within the environment. /// </summary> void EnvironmentStep() { if (m_ModeSwitched) { ConfigureEnvironment(); m_ModeSwitched = false; } if (!m_FirstAcademyReset) { ForcedFullReset(); } AgentSetStatus?.Invoke(m_StepCount); using (TimerStack.Instance.Scoped("AgentResetIfDone")) { AgentResetIfDone?.Invoke(); } using (TimerStack.Instance.Scoped("AgentSendState")) { AgentSendState?.Invoke(); } using (TimerStack.Instance.Scoped("DecideAction")) { DecideAction?.Invoke(); } using (TimerStack.Instance.Scoped("AcademyStep")) { AcademyStep(); } using (TimerStack.Instance.Scoped("AgentAct")) { AgentAct?.Invoke(); } m_StepCount += 1; m_TotalStepCount += 1; }