コード例 #1
0
 // Update is called once per frame
 void FixedUpdate()
 {
     m_ResetTimer += 1;
     if (m_ResetTimer >= MaxEnvironmentSteps && MaxEnvironmentSteps > 0)
     {
         m_AgentGroup.GroupEpisodeInterrupted();
         ResetScene();
     }
 }
コード例 #2
0
    void FixedUpdate()
    {
        timer += 1;

        if (timer >= MaxEnvironmentSteps && MaxEnvironmentSteps > 0)
        {
            TeamBlue.GroupEpisodeInterrupted();
            TeamRed.GroupEpisodeInterrupted();
            ResetScene();
        }
    }
コード例 #3
0
    void FixedUpdate()
    {
        m_ResetTimer += 1;
        if (m_ResetTimer >= MaxEnvironmentSteps && MaxEnvironmentSteps > 0)
        {
            m_AgentGroup.GroupEpisodeInterrupted();
            ResetScene();
        }

        //Hurry Up Penalty
        m_AgentGroup.AddGroupReward(-0.5f / MaxEnvironmentSteps);
    }
コード例 #4
0
    private void FixedUpdate()
    {
        m_ResetTimer += 1;
        if (m_ResetTimer >= MaxEnvironmentSteps && MaxEnvironmentSteps > 0)
        {
            Debug.Log("Timeout!");
            Cleanup();
            m_AgentGroup.GroupEpisodeInterrupted();
            ResetScene();
        }

        if (activeCars == 0)
        {
            m_AgentGroup.AddGroupReward(1 - m_ResetTimer / MaxEnvironmentSteps);
            m_AgentGroup.EndGroupEpisode();
            ResetScene();
        }
    }