浏览代码

add trained static walker nn file

/active-variablespeed
HH 4 年前
当前提交
950f9a8f
共有 28 个文件被更改,包括 4074 次插入849 次删除
  1. 42
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/PlatformDynamicTarget.prefab
  2. 19
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/DirectionIndicator.cs
  3. 14
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/OrientationCubeController.cs
  4. 999
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/PlatformDynamicTarget Variant.prefab
  5. 87
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerWithTargetPair.prefab
  6. 989
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
  7. 2
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity.meta
  8. 164
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerStatic.unity
  9. 110
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  10. 19
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/StaticTarget.prefab
  11. 38
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/Ragdoll/WalkerRagdollBase.prefab
  12. 8
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets.meta
  13. 1001
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatforms - 10.prefab
  14. 7
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatforms - 10.prefab.meta
  15. 76
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/PlatformDynamicTargetVS Variant.prefab
  16. 7
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/PlatformDynamicTargetVS Variant.prefab.meta
  17. 8
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/Ragdoll.meta
  18. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerStaticApprovedWalkInWorldDir.nn
  19. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerStaticApprovedWalkInWorldDir.nn.meta
  20. 162
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/DynamicTarget.prefab
  21. 159
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab
  22. 0
      /Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/DynamicTarget.prefab.meta
  23. 0
      /Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/StaticTarget.prefab
  24. 0
      /Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/StaticTarget.prefab.meta
  25. 0
      /Project/Assets/ML-Agents/Examples/Walker/Prefabs/Ragdoll/WalkerRagdollBase.prefab.meta
  26. 0
      /Project/Assets/ML-Agents/Examples/Walker/Prefabs/Ragdoll/WalkerRagdollBase.prefab

42
Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/PlatformDynamicTarget.prefab


serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &5100011760572799339
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6907845698621467345}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab1096666cc514d9aac1e289b32ccfc5, type: 3}
m_Name:
m_EditorClassIdentifier:
maxTorque: {x: 100, y: 100, z: 100}
randomizeTorqueEveryXSec: 10
forceMode: 0
--- !u!1 &6907860845836169157
GameObject:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 6902107422946006027}
m_Modifications:
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.size
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 6333411881204380609, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3826955612593018128, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_CastShadows
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.x

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 46734abd0de454192b407379c6a4ab8d, type: 3}
--- !u!1 &6907845698621467345 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3840539935788495952, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
m_PrefabInstance: {fileID: 7679147166544502401}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6905872404756097855 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,

19
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/DirectionIndicator.cs


{
public class DirectionIndicator : MonoBehaviour
{
public bool updateManually;
public Transform transformToFollow; //ex: hips or body
public Transform targetToLookAt; //target in the scene the indicator will point to
public float heightOffset;

void Update()
{
if(updateManually) return;
public void SetPosAndDir(Vector3 pos, Vector3 lookDir)
{
transform.position = new Vector3(pos.x, m_StartingYPos + heightOffset, pos.z);
lookDir.y = 0; //flatten dir on the y
transform.rotation = Quaternion.LookRotation(lookDir);
}
public void MatchOrientation(Transform t)
{
transform.position = new Vector3(t.position.x, m_StartingYPos + heightOffset, t.position.z);
// Vector3 lookDir = t.rotation.eulerAngles;
// lookDir.y = 0; //flatten dir on the y
// transform.rotation = Quaternion.Euler(lookDir);
transform.rotation = t.rotation;
}
}
}

14
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/OrientationCubeController.cs


public void UpdateOrientation(Transform rootBP, Transform target)
{
var dirVector = target.position - transform.position;
dirVector.y = 0; //flatten dir on the y. this will only work on level, uneven surfaces
dirVector.y = 0; //flatten dir on the y. this will only work on level surfaces
var lookRot =
dirVector == Vector3.zero
? Quaternion.identity

transform.SetPositionAndRotation(rootBP.position, lookRot);
}
public void UpdateOrientation(Vector3 pos, Vector3 dirVector)
{
// var dirVector = target.position - transform.position;
dirVector.y = 0; //flatten dir on the y. this will only work on level surfaces
var lookRot =
dirVector == Vector3.zero
? Quaternion.identity
: Quaternion.LookRotation(dirVector.normalized); //get our look rot to the target
//UPDATE ORIENTATION CUBE POS & ROT
transform.SetPositionAndRotation(pos, lookRot);
}
}
}

999
Project/Assets/ML-Agents/Examples/Walker/Prefabs/PlatformDynamicTarget Variant.prefab
文件差异内容过多而无法显示
查看文件

87
Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerWithTargetPair.prefab


propertyPath: targetToLookAt
value:
objectReference: {fileID: 944450991292172294}
- target: {fileID: 693499830, guid: 765582efd9dda46ed98564603316353f, type: 3}
propertyPath: updateManually
value: 1
objectReference: {fileID: 0}
- target: {fileID: 895268871377934275, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_Name

- target: {fileID: 895268871377934297, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_BrainParameters.VectorObservationSize
value: 236
value: 238
objectReference: {fileID: 11400000, guid: 8dfd4337ed40e4d48872a4f86919c9da,
objectReference: {fileID: 11400000, guid: b857c29923dc040d5bc2194435a73ebd,
type: 3}
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
type: 3}

type: 3}
propertyPath: target
value:
objectReference: {fileID: 738575235704034803}
objectReference: {fileID: 0}
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: targetIsStatic

propertyPath: orientationCube
value:
objectReference: {fileID: 4661501641717294349}
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: randomizeWalkSpeedEachEpisode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: dirToLook.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7933235353030744139, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_ConnectedAnchor.z
value: -0.00000005960462
objectReference: {fileID: 0}
- target: {fileID: 7933235353030744139, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 7933235353041637847, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_ConnectedAnchor.z
value: -0.00000023841848
objectReference: {fileID: 0}
- target: {fileID: 7933235353041637847, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 7933235353195701979, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_ConnectedAnchor.z
value: 0.00000023841848
objectReference: {fileID: 0}
- target: {fileID: 7933235353195701979, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 7933235353228551180, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_ConnectedAnchor.z
value: -0.00000005960462
objectReference: {fileID: 0}
- target: {fileID: 7933235353228551180, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 7933235353240438170, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_ConnectedAnchor.z
value: -0.00000023841848
objectReference: {fileID: 0}
- target: {fileID: 7933235353240438170, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 7933235353272702555, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_ConnectedAnchor.z
value: 0.00000005960462
objectReference: {fileID: 0}
- target: {fileID: 7933235353713167636, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 7933235354074184678, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.5119995
objectReference: {fileID: 0}
- target: {fileID: 7933235354616748522, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_ConnectedAnchor.z
value: 0.00000023841848
objectReference: {fileID: 0}
- target: {fileID: 7933235354616748522, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 7933235354652902044, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 7933235354845945066, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 7933235354882597209, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.00000005960462
objectReference: {fileID: 0}
- target: {fileID: 7933235355057813929, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.00000011920929
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 765582efd9dda46ed98564603316353f, type: 3}

type: 3}
m_PrefabInstance: {fileID: 4061126297018023352}
m_PrefabAsset: {fileID: 0}
--- !u!114 &738575235704034803 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
m_PrefabInstance: {fileID: 4061126297018023352}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:

989
Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
文件差异内容过多而无法显示
查看文件

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


fileFormatVersion: 2
guid: 79d5d2687bfbe45f5b78bd6c04992e0d
guid: 65c87f50b8c81433d8fd7f6550773467
DefaultImporter:
externalObjects: {}
userData:

164
Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerStatic.unity


- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642925019576, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.383
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643117858766, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050003
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

propertyPath: m_Name
value: WalkerPair (1)
objectReference: {fileID: 0}
- target: {fileID: 1707482909815496, guid: 94dced9d2186d4a76b970fb18ef6d7a6, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4878380427462518, guid: 94dced9d2186d4a76b970fb18ef6d7a6, type: 3}
propertyPath: m_LocalPosition.x
value: -500

- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642925019576, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.383
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643117858766, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050003
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642925019576, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.383
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643117858766, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050003
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642925019576, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.383
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643117858766, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050003
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642925019576, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.383
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643117858766, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050003
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642925019576, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.383
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643117858766, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050003
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642925019576, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.383
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643117858766, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050003
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.29999986
value: -0.29999995
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517642925019576, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.383
value: 0.3829999
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643117858766, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3050003
value: 0.3050002
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0
value: -0.00000011920929
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}

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


{
[Header("Walk Speed")] [Range(0, 15)] public float walkingSpeed = 15; //The walking speed to try and achieve
float m_maxWalkingSpeed = 15; //The max walking speed
//Should the agent sample a new goal velocity each episode?
//If true, walkSpeed will be randomly set between zero and m_maxWalkingSpeed in OnEpisodeBegin()
//If false, the goal velocity will be walkingSpeed

[Header("Target To Walk Towards")] public TargetController target; //Target the agent will walk towards.
public enum WalkDirectionMethod
{
UseWorldDirection,
UseTarget
}
[Header("Walk Direction")] public WalkDirectionMethod walkDirectionMethod;
public Vector3 dirToLook = Vector3.right;
public Transform target; //Target the agent will walk towards.
[Header("Body Parts")] public Transform hips;
public Transform chest;

public Transform forearmR;
public Transform handR;
[Header("Orientation")] [Space(10)]
// [Header("Orientation")] [Space(10)]
public OrientationCubeController orientationCube;
OrientationCubeController m_OrientationCube;
DirectionIndicator m_DirectionIndicator;
JointDriveController m_JdController;
EnvironmentParameters m_ResetParams;

orientationCube.UpdateOrientation(hips, target.transform);
m_OrientationCube = GetComponentInChildren<OrientationCubeController>();
m_DirectionIndicator = GetComponentInChildren<DirectionIndicator>();
//Setup each body part
m_JdController = GetComponent<JointDriveController>();
m_JdController.SetupBodyPart(hips);

/// </summary>
public override void OnEpisodeBegin()
{
// if (walkTowardsType == WalkTowardsType.UseTarget && !target)
// {
// Debug.LogError("Missing a reference toTarget");
// Instantiate(targetPrefab)
// }
//Reset all of the body parts
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{

//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
hips.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
orientationCube.UpdateOrientation(hips, target.transform);
UpdateOrientationObjects();
rewardManager.ResetEpisodeRewards();

//Get velocities in the context of our orientation cube's space
//Note: You can get these velocities in world space as well but it may not train as well.
sensor.AddObservation(orientationCube.transform.InverseTransformDirection(bp.rb.velocity));
sensor.AddObservation(orientationCube.transform.InverseTransformDirection(bp.rb.angularVelocity));
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(bp.rb.velocity));
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(bp.rb.angularVelocity));
sensor.AddObservation(orientationCube.transform.InverseTransformDirection(bp.rb.position - hips.position));
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(bp.rb.position - hips.position));
if (bp.rb.transform != hips && bp.rb.transform != handL && bp.rb.transform != handR)
{

/// </summary>
public override void CollectObservations(VectorSensor sensor)
{
var cubeForward = orientationCube.transform.forward;
var cubeForward = m_OrientationCube.transform.forward;
//current ragdoll velocity. normalized
sensor.AddObservation(GetMatchingVelocityInverseLerp(cubeForward * walkingSpeed, GetAvgVelocity()));

sensor.AddObservation(Quaternion.FromToRotation(hips.forward, cubeForward));
sensor.AddObservation(Quaternion.FromToRotation(head.forward, cubeForward));
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.transform.position));
Vector3 targetPos = walkDirectionMethod == WalkDirectionMethod.UseTarget
? target.transform.position
// : hips.position + (dirToLook * 100);
// : m_OrientationCube.transform.TransformDirection(dirToLook * 100);
: m_OrientationCube.transform.position + (cubeForward * 100);
targetPos.y = 0;
Vector3 relPos = Vector3.ClampMagnitude(m_OrientationCube.transform.InverseTransformPoint(targetPos), 100);
sensor.AddObservation(relPos);
// Debug.DrawRay(targetPos, Vector3.up, Color.green,1);
// sensor.AddObservation(Vector3.ClampMagnitude(m_OrientationCube.transform.InverseTransformPoint(target.transform.position), 100)
// sensor.AddObservation(targetPos);
foreach (var bodyPart in m_JdController.bodyPartsList)
{

bpDict[forearmR].SetJointStrength(vectorAction[++i]);
}
//Update OrientationCube and DirectionIndicator
void UpdateOrientationObjects()
{
dirToLook = walkDirectionMethod == WalkDirectionMethod.UseTarget
? target.position - hips.position
: dirToLook;
m_OrientationCube.UpdateOrientation(hips.position, dirToLook);
m_DirectionIndicator.MatchOrientation(m_OrientationCube.transform);
}
UpdateRewards();
UpdateOrientationObjects();
var cubeForward = m_OrientationCube.transform.forward;
// Set reward for this step according to mixture of the following elements.
// a. Match target speed
//This reward will approach 1 if it matches perfectly and approach zero as it deviates
var matchSpeedReward = GetMatchingVelocityInverseLerp(cubeForward * walkingSpeed, GetAvgVelocity());
// b. Rotation alignment with target direction.
//This reward will approach 1 if it faces the target direction perfectly and approach zero as it deviates
var lookAtTargetReward = (Vector3.Dot(cubeForward, head.forward) + 1) * .5F;
// c. Encourage head height.
// headHeightOverFeetReward =
// Mathf.Clamp01(((head.position.y - footL.position.y) + (head.position.y - footR.position.y))/ 10); //Should normalize to ~1
rewardManager.rewardsDict["matchSpeed"].rewardThisStep = matchSpeedReward;
rewardManager.rewardsDict["lookAtTarget"].rewardThisStep = lookAtTargetReward;
// rewardManager.rewardsDict["headHeightOverFeet"].rewardThisStep = headHeightOverFeetReward;
rewardManager.UpdateReward("productOfAllRewards", matchSpeedReward * lookAtTargetReward);
}
//Returns the average velocity of all the rigidbodies

// public float headHeightOverFeetReward; //reward for standing up straight-ish
public RewardManager rewardManager;
void UpdateRewards()
{
var cubeForward = orientationCube.transform.forward;
orientationCube.UpdateOrientation(hips, target.transform);
// Set reward for this step according to mixture of the following elements.
// a. Match target speed
//This reward will approach 1 if it matches perfectly and approach zero as it deviates
var matchSpeedReward = GetMatchingVelocityInverseLerp(cubeForward * walkingSpeed, GetAvgVelocity());
// b. Rotation alignment with target direction.
//This reward will approach 1 if it faces the target direction perfectly and approach zero as it deviates
var lookAtTargetReward = (Vector3.Dot(cubeForward, head.forward) + 1) * .5F;
// c. Encourage head height.
// headHeightOverFeetReward =
// Mathf.Clamp01(((head.position.y - footL.position.y) + (head.position.y - footR.position.y))/ 10); //Should normalize to ~1
rewardManager.rewardsDict["matchSpeed"].rewardThisStep = matchSpeedReward;
rewardManager.rewardsDict["lookAtTarget"].rewardThisStep = lookAtTargetReward;
// rewardManager.rewardsDict["headHeightOverFeet"].rewardThisStep = headHeightOverFeetReward;
rewardManager.UpdateReward("productOfAllRewards", matchSpeedReward * lookAtTargetReward);
}
//normalized value of the difference in avg speed vs goal walking speed.
public float GetMatchingVelocityInverseLerp(Vector3 velocityGoal, Vector3 actualVelocity)
{

{
SetTorsoMass();
}
}
}

19
Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/StaticTarget.prefab


m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 6.2, y: 1.15, z: 3.824}
m_LocalScale: {x: 1.2356956, y: 1.2356961, z: 1.2356961}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0

m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
m_CollisionDetection: 3
--- !u!114 &3631016866778687563
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
tagToDetect: agent
moveTargetToRandomPosIfTouched: 0
targetSpawnRadius: 0
onTrtesiggerEnterEvent:
m_PersistentCalls:
m_Calls: []
triggerIsTouching: 0
spawnRadius: 0
respawnIfTouched: 0
respawnIfFallsOffPlatform: 1
fallDistance: 5
onTriggerEnterEvent:
m_PersistentCalls:
m_Calls: []

onTriggerExitEvent:
m_PersistentCalls:
m_Calls: []
colliderIsTouching: 0
onCollisionEnterEvent:
m_PersistentCalls:
m_Calls: []

38
Project/Assets/ML-Agents/Examples/Walker/Prefabs/Ragdoll/WalkerRagdollBase.prefab


m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 895268871264836243}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.15, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 895268873051627235}

- component: {fileID: 895268871377934301}
- component: {fileID: 5891315090006581283}
m_Layer: 0
m_Name: WalkerRagdoll
m_Name: WalkerRagdollBase
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 895268871377934275}
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 3.07, z: 0}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 895268871264836332}

m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &895268871377934297
MonoBehaviour:
m_ObjectHideFlags: 0

m_Anchor: {x: 0.55, y: 0, z: 0}
m_Axis: {x: 0, y: -1, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.7000002, y: 0, z: 0}
m_ConnectedAnchor: {x: -0.7000001, y: 0.00000023841858, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: 1}
m_XMotion: 0

m_Anchor: {x: 0, y: 0, z: 0}
m_Axis: {x: 1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.70000064, y: 0, z: 0}
m_ConnectedAnchor: {x: -0.70000017, y: 0.00000023841858, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: 1}
m_XMotion: 0

m_Anchor: {x: -0.5, y: 0, z: 0}
m_Axis: {x: 0, y: 1, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.5000005, y: 0, z: 0}
m_ConnectedAnchor: {x: 0.5, y: 0.00000023841858, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: 1}
m_XMotion: 0

m_Anchor: {x: 0, y: 0.5, z: 0}
m_Axis: {x: -1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.39999408, y: -0.29999986, z: 0}
m_ConnectedAnchor: {x: -0.39999396, y: -0.29999986, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: -1}
m_XMotion: 0

m_Anchor: {x: 0.5, y: 0, z: 0}
m_Axis: {x: 0, y: -1, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.5000005, y: 0, z: 0}
m_ConnectedAnchor: {x: -0.5, y: 0.00000023841858, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: 1}
m_XMotion: 0

m_Anchor: {x: 0, y: 0.5, z: 0}
m_Axis: {x: -1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.00000011920929, y: -0.5, z: 0}
m_ConnectedAnchor: {x: 0, y: -0.5, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: -1}
m_XMotion: 0

m_Anchor: {x: 0, y: 0, z: -0.1}
m_Axis: {x: 1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.00000011920929, y: -0.60000014, z: 0}
m_ConnectedAnchor: {x: 0, y: -0.60000014, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 1, z: 0}
m_XMotion: 0

m_Anchor: {x: 0, y: 0.5, z: 0}
m_Axis: {x: -1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.00000011920929, y: -0.5, z: 0}
m_ConnectedAnchor: {x: 0, y: -0.5, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: -1}
m_XMotion: 0

m_Anchor: {x: 0, y: 0.5, z: 0}
m_Axis: {x: -1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.39999408, y: -0.29999986, z: 0}
m_ConnectedAnchor: {x: 0.39999396, y: -0.29999986, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: -1}
m_XMotion: 0

m_Anchor: {x: 0, y: -0.85, z: 0}
m_Axis: {x: 1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0, y: 0.5119996, z: 0}
m_ConnectedAnchor: {x: 0, y: 0.51199937, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: -1}
m_XMotion: 0

m_Anchor: {x: 0, y: 0, z: 0}
m_Axis: {x: 1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.70000064, y: 0, z: 0}
m_ConnectedAnchor: {x: 0.70000017, y: 0.00000023841858, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: 1}
m_XMotion: 0

m_Anchor: {x: 0, y: -0.5, z: 0}
m_Axis: {x: 1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0, y: 0.3050003, z: 0}
m_ConnectedAnchor: {x: 0, y: 0.30500054, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: -1}
m_XMotion: 0

m_Anchor: {x: 0, y: 0, z: -0.1}
m_Axis: {x: 1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.00000011920929, y: -0.60000014, z: 0}
m_ConnectedAnchor: {x: 0, y: -0.60000014, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 1, z: 0}
m_XMotion: 0

m_Anchor: {x: -0.55, y: 0, z: 0}
m_Axis: {x: 0, y: 1, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.7000002, y: 0, z: 0}
m_ConnectedAnchor: {x: 0.7000001, y: 0.00000023841858, z: 0}
serializedVersion: 2
m_SecondaryAxis: {x: 0, y: 0, z: 1}
m_XMotion: 0

8
Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets.meta


fileFormatVersion: 2
guid: 88818c9b63c96424aa8e0fca85552133
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

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

7
Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatforms - 10.prefab.meta


fileFormatVersion: 2
guid: be576a0e8526243909eb6c805d529d8f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

76
Project/Assets/ML-Agents/Examples/Walker/Prefabs/PlatformDynamicTargetVS Variant.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &8295902827100462173
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1985181222039634782, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_Name
value: PlatformDynamicTargetVS
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1988560127670737702, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4581965870599815001, guid: 8daf438e1a41f4d06850cacc91aa175f,
type: 3}
propertyPath: randomizeWalkSpeedEachEpisode
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8daf438e1a41f4d06850cacc91aa175f, type: 3}

7
Project/Assets/ML-Agents/Examples/Walker/Prefabs/PlatformDynamicTargetVS Variant.prefab.meta


fileFormatVersion: 2
guid: c94740d2026f848a8b43b7f4086818a0
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Project/Assets/ML-Agents/Examples/Walker/Prefabs/Ragdoll.meta


fileFormatVersion: 2
guid: d64d77dc566364a31896e5da2ac8534b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

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

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


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

162
Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/DynamicTarget.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3840539935788495952
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3839136118347789758}
- component: {fileID: 3836793085241645916}
- component: {fileID: 3868551391811062596}
- component: {fileID: 3826955612593018128}
- component: {fileID: 3858402326794362026}
- component: {fileID: 3631016866778687563}
- component: {fileID: 5100011760572799339}
m_Layer: 0
m_Name: DynamicTarget
m_TagString: target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3839136118347789758
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3836793085241645916
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &3868551391811062596
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &3826955612593018128
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!54 &3858402326794362026
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 3
--- !u!114 &3631016866778687563
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:
tagToDetect: agent
spawnRadius: 40
respawnIfTouched: 1
respawnIfFallsOffPlatform: 1
fallDistance: 5
onTriggerEnterEvent:
m_PersistentCalls:
m_Calls: []
onTriggerStayEvent:
m_PersistentCalls:
m_Calls: []
onTriggerExitEvent:
m_PersistentCalls:
m_Calls: []
onCollisionEnterEvent:
m_PersistentCalls:
m_Calls: []
onCollisionStayEvent:
m_PersistentCalls:
m_Calls: []
onCollisionExitEvent:
m_PersistentCalls:
m_Calls: []
--- !u!114 &5100011760572799339
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab1096666cc514d9aac1e289b32ccfc5, type: 3}
m_Name:
m_EditorClassIdentifier:
maxTorque: {x: 100, y: 100, z: 100}
randomizeTorqueEveryXSec: 10
forceMode: 0

159
Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3840539935788495952
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3839136118347789758}
- component: {fileID: 3836793085241645916}
- component: {fileID: 3868551391811062596}
- component: {fileID: 3826955612593018128}
- component: {fileID: 3858402326794362026}
- component: {fileID: 3631016866778687563}
m_Layer: 0
m_Name: DynamicTarget
m_TagString: target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3839136118347789758
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 1.2356956, y: 1.2356961, z: 1.2356961}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3836793085241645916
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &3868551391811062596
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &3826955612593018128
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!54 &3858402326794362026
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 3
--- !u!114 &3631016866778687563
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3840539935788495952}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:
tagToDetect: agent
spawnRadius: 40
respawnIfTouched: 1
respawnIfFallsOffPlatform: 1
fallDistance: 5
triggerIsTouching: 0
onTriggerEnterEvent:
m_PersistentCalls:
m_Calls: []
onTriggerStayEvent:
m_PersistentCalls:
m_Calls: []
onTriggerExitEvent:
m_PersistentCalls:
m_Calls: []
colliderIsTouching: 0
onCollisionEnterEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_MethodName: TouchedTarget
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
onCollisionStayEvent:
m_PersistentCalls:
m_Calls: []
onCollisionExitEvent:
m_PersistentCalls:
m_Calls: []

/Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab.meta → /Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/DynamicTarget.prefab.meta

/Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.prefab → /Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/StaticTarget.prefab

/Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.prefab.meta → /Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/Targets/StaticTarget.prefab.meta

/Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerRagdoll.prefab.meta → /Project/Assets/ML-Agents/Examples/Walker/Prefabs/Ragdoll/WalkerRagdollBase.prefab.meta

/Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerRagdoll.prefab → /Project/Assets/ML-Agents/Examples/Walker/Prefabs/Ragdoll/WalkerRagdollBase.prefab

正在加载...
取消
保存