浏览代码

more cleanup

/hh-develop-ragdoll-testing
HH 5 年前
当前提交
8c4300e3
共有 24 个文件被更改,包括 2029 次插入9132 次删除
  1. 5
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerRagdoll.prefab
  2. 27
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  3. 1001
      Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyna.demo
  4. 10
      Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyna.demo.meta
  5. 1001
      Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerStat.demo
  6. 10
      Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerStat.demo.meta
  7. 1001
      Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyn.demo
  8. 10
      Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyn.demo.meta
  9. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/Walker.nn.meta
  10. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/Walker.nn
  11. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-15_2020-05-15-21-48-18_walkdylist-ppo_results_walkdylist-ppo_WalkerDynamic.nn
  12. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-15_2020-05-15-21-48-18_walkdylist-ppo_results_walkdylist-ppo_WalkerDynamic.nn.meta
  13. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-15_2020-05-16-00-51-25_walkstlist-ppo_results_walkstlist-ppo_WalkerStatic.nn
  14. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-15_2020-05-16-00-51-25_walkstlist-ppo_results_walkstlist-ppo_WalkerStatic.nn.meta
  15. 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
  16. 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
  17. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamicDistVector.nn
  18. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamicDistVector.nn.meta
  19. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-17_2020-05-18-01-24-39_wdy2e7dist-ppo_results_wdy2e7dist-ppo_WalkerDynamic.nn
  20. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-17_2020-05-18-01-24-39_wdy2e7dist-ppo_results_wdy2e7dist-ppo_WalkerDynamic.nn.meta
  21. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic CloudLast.nn
  22. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic CloudLast.nn.meta
  23. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamicOLD.nn
  24. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamicOLD.nn.meta

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


m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
VectorObservationSize: 233
VectorObservationSize: 236
NumStackedVectorObservations: 1
VectorActionSize: 27000000
VectorActionDescriptions: []

m_BehaviorName: WalkerDynamic
TeamId: 0
m_UseChildSensors: 1
m_ObservableAttributeHandling: 0
--- !u!114 &7408209125961349353
MonoBehaviour:
m_ObjectHideFlags: 0

hasUpgradedFromAgentParameters: 1
MaxStep: 5000
maximumWalkingSpeed: 999
directionIndicator: {fileID: 6359877977706987617}
targetSpawnRadius: 40
target: {fileID: 0}
ground: {fileID: 0}

m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
debugCommandLineOverride:
--- !u!1 &895268871382313704
GameObject:
m_ObjectHideFlags: 0

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


using Unity.MLAgents;
using Unity.MLAgentsExamples;
using Unity.MLAgents.Sensors;
using UnityEditor;
using BodyPart = Unity.MLAgentsExamples.BodyPart;
public class WalkerAgent : Agent

[Header("Specific to Walker")]
public float maximumWalkingSpeed = 999; //The max walk velocity magnitude an agent will be rewarded for
Vector3 m_WalkDir;
Quaternion m_WalkDirLookRot;
Vector3 m_WalkDir; //Direction to the target
Quaternion m_WalkDirLookRot; //Will hold the rotation to our target
[Space(10)]
[Header("Orientation Cube")]

public bool detectTargets;
public bool targetIsStatic;
public bool respawnTargetWhenTouched;
[Header("Body Parts")]
[Space(10)]

Rigidbody m_SpineRb;
EnvironmentParameters m_ResetParams;
public override void Initialize()
{

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));
// print(m_OrientationCube.transform.InverseTransformPoint(target.position));
// sensor.AddObservation(target.position - m_OrientationCube.transform.position);
foreach (var bodyPart in m_JdController.bodyPartsList)
{

m_OrientationCube.transform.rotation = m_WalkDirLookRot;
}
public int fuTimer = 0;
public float fudeltatime = 0;
public float deltatime = 0;
void Update()
{
deltatime = Time.deltaTime;
}
fuTimer++;
fudeltatime = Time.fixedDeltaTime;
if (detectTargets)
{
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)

/// </summary>
public override void OnEpisodeBegin()
{
//Reset all of the body parts
//Random start rotation
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
UpdateOrientationCube();

1001
Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyna.demo
文件差异内容过多而无法显示
查看文件

10
Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyna.demo.meta


fileFormatVersion: 2
guid: 1ea82869060c54bb48fed5b95baaf53c
ScriptedImporter:
fileIDToRecycleName:
11400000: Assets/Demonstrations/ExpertWalkerDyna.demo
externalObjects: {}
userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)'
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 7bd65ce151aaa4a41a45312543c56be1, type: 3}

1001
Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerStat.demo
文件差异内容过多而无法显示
查看文件

10
Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerStat.demo.meta


fileFormatVersion: 2
guid: 720007cd6923e410abaa4ba800400cb0
ScriptedImporter:
fileIDToRecycleName:
11400000: Assets/Demonstrations/ExpertWalkerStat.demo
externalObjects: {}
userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)'
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 7bd65ce151aaa4a41a45312543c56be1, type: 3}

1001
Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyn.demo
文件差异内容过多而无法显示
查看文件

10
Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyn.demo.meta


fileFormatVersion: 2
guid: 870f0916603374b429c92b4e74d912e1
ScriptedImporter:
fileIDToRecycleName:
11400002: Assets/ML-Agents/Examples/Walker/Demos/ExpertWalkerDyn.demo
externalObjects: {}
userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)'
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 7bd65ce151aaa4a41a45312543c56be1, type: 3}

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/Walker.nn.meta


fileFormatVersion: 2
guid: 4e86a19e012da43bfa5ab97ae8089b98
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 19ed1486aa27d4903b34839f37b8f69f, type: 3}

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/Walker.nn
文件差异内容过多而无法显示
查看文件

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-15_2020-05-15-21-48-18_walkdylist-ppo_results_walkdylist-ppo_WalkerDynamic.nn
文件差异内容过多而无法显示
查看文件

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-15_2020-05-15-21-48-18_walkdylist-ppo_results_walkdylist-ppo_WalkerDynamic.nn.meta


fileFormatVersion: 2
guid: 465050f5bacbb4ec285a0d912a0f4f67
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 19ed1486aa27d4903b34839f37b8f69f, type: 3}

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-15_2020-05-16-00-51-25_walkstlist-ppo_results_walkstlist-ppo_WalkerStatic.nn
文件差异内容过多而无法显示
查看文件

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-15_2020-05-16-00-51-25_walkstlist-ppo_results_walkstlist-ppo_WalkerStatic.nn.meta


fileFormatVersion: 2
guid: 7ece7d31a37c24c66bafc135c6600e88
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 19ed1486aa27d4903b34839f37b8f69f, type: 3}

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}

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamicDistVector.nn
文件差异内容过多而无法显示
查看文件

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamicDistVector.nn.meta


fileFormatVersion: 2
guid: c6e746bbf8df5420689695d426340a3c
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 19ed1486aa27d4903b34839f37b8f69f, type: 3}

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-17_2020-05-18-01-24-39_wdy2e7dist-ppo_results_wdy2e7dist-ppo_WalkerDynamic.nn
文件差异内容过多而无法显示
查看文件

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/brandonh_2020-05-17_2020-05-18-01-24-39_wdy2e7dist-ppo_results_wdy2e7dist-ppo_WalkerDynamic.nn.meta


fileFormatVersion: 2
guid: ed10ba56f681d4648af1c1b4e768cd4f
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 19ed1486aa27d4903b34839f37b8f69f, type: 3}

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic CloudLast.nn
文件差异内容过多而无法显示
查看文件

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic CloudLast.nn.meta


fileFormatVersion: 2
guid: 47226119b21ca4b1e865ff54f7922bc9
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 19ed1486aa27d4903b34839f37b8f69f, type: 3}

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamicOLD.nn
文件差异内容过多而无法显示
查看文件

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamicOLD.nn.meta


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