浏览代码

Remove statsrecorder

/develop/centralizedcritic
Ervin Teng 4 年前
当前提交
bea303f6
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      Project/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs

10
Project/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs


m_AgentRb = GetComponent<Rigidbody>();
m_GroundRenderer = ground.GetComponent<Renderer>();
m_GroundMaterial = m_GroundRenderer.material;
m_statsRecorder = Academy.Instance.StatsRecorder;
//m_statsRecorder = Academy.Instance.StatsRecorder;
}
public override void CollectObservations(VectorSensor sensor)

{
SetReward(1f);
StartCoroutine(GoalScoredSwapGroundMaterial(m_HallwaySettings.goalScoredMaterial, 0.5f));
m_statsRecorder.Add("Goal/Correct", 1, StatAggregationMethod.Sum);
// m_statsRecorder.Add("Goal/Correct", 1, StatAggregationMethod.Sum);
m_statsRecorder.Add("Goal/Wrong", 1, StatAggregationMethod.Sum);
// m_statsRecorder.Add("Goal/Wrong", 1, StatAggregationMethod.Sum);
}
EndEpisode();
}

symbolXGoal.transform.position = new Vector3(7f, 0.5f, 22.29f) + area.transform.position;
symbolOGoal.transform.position = new Vector3(-7f, 0.5f, 22.29f) + area.transform.position;
}
m_statsRecorder.Add("Goal/Correct", 0, StatAggregationMethod.Sum);
m_statsRecorder.Add("Goal/Wrong", 0, StatAggregationMethod.Sum);
// m_statsRecorder.Add("Goal/Correct", 0, StatAggregationMethod.Sum);
// m_statsRecorder.Add("Goal/Wrong", 0, StatAggregationMethod.Sum);
}
}
正在加载...
取消
保存