Ejemplo n.º 1
0
 //called by the ML Agents system, so although its backwards, this is the only place we find out that our training run has ended (when the reward value leaves the threshold).
 //Because of this, we need to reset the whole area here and all other agents in it
 public override void AgentReset()
 {
     Debug.Log("RESETTING AGENT");
     currentWeapon.Ammo = currentWeapon.MaxAmmo;
     Health             = maxHealth;
     trainingArea.ResetArea(this);
 }
Ejemplo n.º 2
0
 public override void AgentReset()
 {
     _playerScript.prevScore = GetCumulativeReward();
     numberOfGoalsCollected  = 0;
     _area.ResetArea();
     _rewardPerStep = agentParameters.maxStep > 0 ? -1f / agentParameters.maxStep : 0;
     _isGrounded    = false;
 }
Ejemplo n.º 3
0
 //When episode begins this is called
 public override void OnEpisodeBegin()
 {
     goalReached = false;
     trainingArea.ResetArea();
 }