示例#1
0
 // Reset the agent and area
 public override void OnEpisodeBegin()
 {
     isFull = false;
     item   = 0;
     penguinArea.ResetArea();
     feedRadius = Academy.Instance.FloatProperties.GetPropertyWithDefault("feed_radius", 0f);
 }
 /// <summary>
 /// Reset the agent and area
 /// </summary>
 public override void OnEpisodeBegin()
 {
     isFull = false;
     penguinArea.ResetArea();
     feedRadius =    //Academy.Instance.FloatProperties.GetPropertyWithDefault("feed_radius", 0f);
                  Academy.Instance.EnvironmentParameters.GetWithDefault("feed_raidus", 0f);
 }
    // Reset game stats every round
    public void ResetGameStats()
    {
        // Unpause
        Time.timeScale = 1.0f;

        // Restart player position
        player.gameObject.transform.position = playerPos;
        player.gameObject.transform.rotation = playerRot;

        WinPanel.SetActive(false);
        LosePanel.SetActive(false);

        // Update the number os fish feed to the baby penguin
        AgentNumFishRegurgitated.text = "0";

        if (GameManager.gameMode == mode.competitive)
        {
            PlayerNumFishRegurgitated.text = "0";
        }

        // Update the accumulative reward the agent is receiving during the round
        AgentAccumulativeReward.text = "Accumulative reward: " + "0.00";

        //  Update the time past in the round
        TimeTxt.text = "Time " + "0" + "s";
        currentTime  = 0;

        area.ResetArea();
    }
示例#4
0
    public override void OnEpisodeBegin()
    {
//        base.OnEpisodeBegin();
        isFull = false;
        penguinArea.ResetArea();
        //feedRadius = parameters.GetWithDefault("fish_radius",0f);
        feedRadius = Academy.Instance.EnvironmentParameters.GetWithDefault("feed_radius", 0f);
    }
示例#5
0
    /// <summary>
    /// Reset the agent and area
    /// </summary>
    public override void OnEpisodeBegin()
    {
        //base.OnEpisodeBegin();

        isFull = false;
        penguinArea.ResetArea();
        EnvironmentParameters temp;

        temp = Academy.Instance.EnvironmentParameters;

        feedRadius = temp.GetWithDefault("feed_radius", 0f);
        //.FloatProperties.GetPropertyWithDefault("feed_radius", 0f);
    }
示例#6
0
    public override void AcademyReset()
    {
        if (null == penguinAreas)
        {
            penguinAreas = FindObjectsOfType <PenguinArea>();
        }

        for (int i = 0; i < penguinAreas.Length; ++i)
        {
            PenguinArea area = penguinAreas[i];
            area.speedFish  = resetParameters["speed_fish"];
            area.radiusFeed = resetParameters["radius_feed"];
            area.ResetArea();
        }
    }
示例#7
0
    /// <summary>
    /// Reset the agent and area when there are no more fishes in the pond or the episode steps reach it's maximum (5000)
    /// </summary>
    public override void OnEpisodeBegin()
    {
        configurations.isPenguinFull = false;

        // Show the Win/Lose Panel before going to the next round
        if (GameManager.gameMode == mode.competitive && fistTimeOnScene == false)
        {
            HUD.NextRoundPanel();
        }
        else
        {
            if (GameManager.gameMode != mode.training)
            {
                HUD.currentTime = 0;
            }
            penguinArea.ResetArea();
        }

        fistTimeOnScene = false;
    }
示例#8
0
 public override void AgentReset()
 {
     isFull = false;
     penguinArea.ResetArea();
 }
示例#9
0
 /// <summary>
 /// Reset the agent and area
 /// </summary>
 public override void AgentReset()
 {
     isFull = false;
     penguinArea.ResetArea();
     feedRadius = penguinAcademy.FeedRadius;
 }
示例#10
0
 public override void AgentReset()
 {
     isFull = false;
     penguinArea.ResetArea();
     feedRadius = Academy.Instance.FloatProperties.GetPropertyWithDefault("feed_radius", 0f);
 }
示例#11
0
 public override void AgentReset()
 {
     //sets penguins stomach back to empty and resets penguin environment
     fullTummy = false;
     pArea.ResetArea();
 }
示例#12
0
 public override void AgentReset()
 {
     penguinArea.ResetArea();
 }