Ejemplo n.º 1
0
 //환경 정보를 관측 및 수집해 정책 결정을 위해 브레인에 전달하는 메소드
 public override void CollectObservations(Unity.MLAgents.Sensors.VectorSensor sensor)
 {
     sensor.AddObservation(targetTr.localPosition);  //3 (x,y,z)
     sensor.AddObservation(transform.localPosition); //3 (x,y,z)
     sensor.AddObservation(rb.velocity.x);           //1 (x)
     sensor.AddObservation(rb.velocity.z);
 }
Ejemplo n.º 2
0
 public override void CollectObservations(Unity.MLAgents.Sensors.VectorSensor sensor)
 {
     sensor.AddObservation(transform.position);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a VectorSensor.
 /// </summary>
 /// <returns></returns>
 public override ISensor[] CreateSensors()
 {
     m_Sensor = new VectorSensor(m_ObservationSize, m_SensorName, m_ObservationType);
     return(new ISensor[] { m_Sensor });
 }