|
|
|
|
|
|
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);
|
|
|
|
} |
|
|
|
} |