浏览代码

no opp obs

/asymm-envs
Andrew Cohen 5 年前
当前提交
cc79fa0e
共有 2 个文件被更改,包括 8 次插入6 次删除
  1. 6
      Project/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab
  2. 8
      Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs

6
Project/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab


m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
vectorObservationSize: 14
vectorObservationSize: 10
numStackedVectorObservations: 3
vectorActionSize: 03000000
vectorActionDescriptions: []

score: 0
myArea: {fileID: 1541947554534326}
scale: 0
timePenalty: 0
--- !u!114 &2449890524009497851
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
vectorObservationSize: 14
vectorObservationSize: 10
numStackedVectorObservations: 3
vectorActionSize: 03000000
vectorActionDescriptions: []

score: 0
myArea: {fileID: 1541947554534326}
scale: 0
timePenalty: 0
--- !u!114 &6598495797138489682
MonoBehaviour:
m_ObjectHideFlags: 0

8
Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs


sensor.AddObservation(m_InvertMult * m_BallRb.velocity.x / 40f);
sensor.AddObservation(m_BallRb.velocity.y / 60f);
sensor.AddObservation(m_InvertMult * (opponent.transform.position.x - myArea.transform.position.x) / -25f);
sensor.AddObservation((opponent.transform.position.y - myArea.transform.position.y) / -7f);
sensor.AddObservation(m_InvertMult * m_OpponentRb.velocity.x / 20f);
sensor.AddObservation(m_OpponentRb.velocity.y / 20f);
//sensor.AddObservation(m_InvertMult * (opponent.transform.position.x - myArea.transform.position.x) / -25f);
//sensor.AddObservation((opponent.transform.position.y - myArea.transform.position.y) / -7f);
//sensor.AddObservation(m_InvertMult * m_OpponentRb.velocity.x / 20f);
//sensor.AddObservation(m_OpponentRb.velocity.y / 20f);
//sensor.AddObservation(m_InvertMult * gameObject.transform.rotation.z);
sensor.AddObservation((m_InvertMult * (gameObject.transform.rotation.eulerAngles.z - (1f - m_InvertMult) * 180f) - 35f) / 125f);

正在加载...
取消
保存