public override void CollectObservations() { var res = rayPer.Perceive(rayDistance, rayAngles, detectableObjects, 0.4f, 0f); hitOneHot = string.Join(", ", res[0].onehot) + " | " + res[0].tag; obs.Clear(); obs.Add(normalize(Palette.transform.position.x, maxPositionValue, minPositionValue)); obs.Add(normalize(Palette.transform.position.z, maxPositionValue, minPositionValue)); obs.Add(normalize(MainBody.transform.position.x, maxPositionValue, minPositionValue)); obs.Add(normalize(MainBody.transform.position.z, maxPositionValue, minPositionValue)); obs.Add(normalize(Ray.DegreeToRadian(MainBody.transform.rotation.eulerAngles.y), 2 * Mathf.PI, 0)); obs.Add(normalize(rbMainBody.velocity.x, maxSpeed, -maxSpeed)); obs.Add(normalize(rbMainBody.velocity.z, maxSpeed, -maxSpeed)); obs.Add(normalize(rbMainBody.angularVelocity.y, maxAngularVelocity, -maxAngularVelocity)); AddVectorObs(obs); }