void Update() { int completions = robotAgent.GetTimesWon(); int iterations = environment.GetIterations(); text.text = "Current episode: " + iterations + "\nCompletions: " + completions + " / " + (iterations - 1); }
// Update is called once per frame void Update() //Shows the success rate of the last 100 attempts { if (robotAgent.GetTimesDone() == 0) { return; } float successRate = (((robotAgent.GetTimesWon() + 0f) / (robotAgent.GetTimesDone() + 0f)) * 100f); text.text = "Success rate: " + (successRate.ToString("0.00") + "%"); }