浏览代码

add dir vector obsv

/docs-update
Hunter-Unity 5 年前
当前提交
07266f46
共有 6 个文件被更改,包括 1033 次插入3 次删除
  1. 5
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatformWalker.prefab
  2. 5
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
  3. 10
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  4. 4
      config/trainer_config.yaml
  5. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-16_2020-05-16-19-55-55_walkdy1e8-ppo_results_walkdy1e8-ppo_WalkerDynamic.nn
  6. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-16_2020-05-16-19-55-55_walkdy1e8-ppo_results_walkdy1e8-ppo_WalkerDynamic.nn.meta

5
Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatformWalker.prefab


value:
objectReference: {fileID: 11400000, guid: 465050f5bacbb4ec285a0d912a0f4f67,
type: 3}
- target: {fileID: 895268871377934297, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_BrainParameters.VectorObservationSize
value: 236
objectReference: {fileID: 0}
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_LocalPosition.x

5
Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity


propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6065910098925129095, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_BrainParameters.VectorObservationSize
value: 236
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f51e8260728fd4c8fa87bcda9d0e2027, type: 3}
--- !u!1001 &3766798870867890383

10
Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs


sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(bp.rb.angularVelocity));
//Get position relative to hips in the context of our orientation cube's space
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(bp.rb.position - hips.position)); //best
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(bp.rb.position - hips.position));
if (bp.rb.transform != hips && bp.rb.transform != handL && bp.rb.transform != handR)
{

{
sensor.AddObservation(Quaternion.FromToRotation(hips.forward, m_OrientationCube.transform.forward));
sensor.AddObservation(Quaternion.FromToRotation(head.forward, m_OrientationCube.transform.forward));
//clamp the distance vector in case the target is far away. normalized to 1.
// var clampedDistFromCubeToTarget = (Vector3.ClampMagnitude(m_OrientationCube.transform.InverseTransformPoint(target.position), 15))/15;
// sensor.AddObservation(m_OrientationCube.transform.InverseTransformPoint(clampedDistFromCubeToTarget));
sensor.AddObservation(m_OrientationCube.transform.InverseTransformPoint(target.position));
// print(m_OrientationCube.transform.InverseTransformPoint(target.position));
// sensor.AddObservation(target.position - m_OrientationCube.transform.position);
foreach (var bodyPart in m_JdController.bodyPartsList)
{

4
config/trainer_config.yaml


time_horizon: 1000
batch_size: 2048
buffer_size: 20480
# max_steps: 2e7
max_steps: 1e8
max_steps: 2e7
# max_steps: 1e8
summary_freq: 30000
num_layers: 3
hidden_units: 512

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-16_2020-05-16-19-55-55_walkdy1e8-ppo_results_walkdy1e8-ppo_WalkerDynamic.nn
文件差异内容过多而无法显示
查看文件

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-16_2020-05-16-19-55-55_walkdy1e8-ppo_results_walkdy1e8-ppo_WalkerDynamic.nn.meta


fileFormatVersion: 2
guid: b84f979c828524db3937219508446a7a
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 19ed1486aa27d4903b34839f37b8f69f, type: 3}
正在加载...
取消
保存