浏览代码

Add TargetController/OrientationCubeController Components & Bugfix (#4157)

* added Target and OCube controllers. updated crawler envs

* update walker prefab

* add refs to prefab

* Update Crawler.prefab

* update platform, ragdoll,  ocube prefabs

* reformat file

* reformat files

* fix behavior name

* add final retrained crawler and walker nn files

* collect hip ocube rot in world space

* update crawler observations and update prefabs

* change to 20M steps

* update crwl prefab to 142 observ

* update obsvs to 241. add expvel  reward

* change walkspeed to 3

* add new crawler and walker nn files

* adjust rewards

* enable other pairs

* add RewardManager

* cleanup about to do final training

* cleanup add nn files for increased facing rew reduced height rew

* try no facing rew

* add vel only policy, try dy target

* inc torq on cube

* added dynamic cube nn. gonna try 40M steps

* add 40M step test, more cleanup

* ch...
/MLA-1734-demo-provider
GitHub 4 年前
当前提交
8b913a96
共有 33 个文件被更改,包括 3190 次插入3645 次删除
  1. 65
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab
  2. 385
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab
  3. 286
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab
  4. 45
      Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity
  5. 381
      Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity
  6. 111
      Project/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs
  7. 1001
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn
  8. 2
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn.meta
  9. 1001
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn
  10. 2
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn.meta
  11. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Outline.mat
  12. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat
  13. 15
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/OrientationCube.prefab
  14. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs
  15. 310
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatformWalker.prefab
  16. 153
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerRagdoll.prefab
  17. 277
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerWithTargetPair.prefab
  18. 76
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
  19. 60
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerStatic.unity
  20. 137
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  21. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic.nn
  22. 2
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic.nn.meta
  23. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerStatic.nn
  24. 2
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerStatic.nn.meta
  25. 2
      config/ppo/WalkerDynamic.yaml
  26. 159
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab
  27. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab.meta
  28. 149
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.prefab
  29. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.prefab.meta
  30. 24
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/OrientationCubeController.cs
  31. 11
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/OrientationCubeController.cs.meta
  32. 135
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetController.cs
  33. 11
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetController.cs.meta

65
Project/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab


- component: {fileID: 4845971000000621466}
m_Layer: 0
m_Name: foreleg0
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971000245862062}
m_Layer: 0
m_Name: foreleg3
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971000281612788}
m_Layer: 0
m_Name: foreleg2
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971000566026491}
m_Layer: 0
m_Name: leg2
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971000943818052}
m_Layer: 0
m_Name: leg3
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971001325249075}
m_Layer: 0
m_Name: leg1
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971001327158052}
m_Layer: 0
m_Name: leg0
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971001588102144}
m_Layer: 0
m_Name: Body
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971001622533709}
m_Layer: 0
m_Name: foreleg1
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

VectorActionSize: 14000000
VectorActionDescriptions: []
VectorActionSpaceType: 1
m_Model: {fileID: 11400000, guid: 9049db2514a454914be8f5e5d3508ffe, type: 3}
m_Model: {fileID: 11400000, guid: c6509001ba679447fba27f894761c3ba, type: 3}
m_BehaviorName: CrawlerDynamic
m_BehaviorName: CrawlerStatic
TeamId: 0
m_UseChildSensors: 1
m_ObservableAttributeHandling: 0

MaxStep: 5000
maximumWalkingSpeed: 999
target: {fileID: 0}
targetSpawnRadius: 40
detectTargets: 1
respawnTargetWhenTouched: 1
ground: {fileID: 0}
body: {fileID: 4845971001588102148}
leg0Upper: {fileID: 4845971001327157979}
leg0Lower: {fileID: 4845971000000621467}

leg2Lower: {fileID: 4845971000281612789}
leg3Upper: {fileID: 4845971000943818107}
leg3Lower: {fileID: 4845971000245862063}
orientationCube: {fileID: 2270141184585723037}
orientationCube: {fileID: 4462656217269709630}
foot0: {fileID: 0}
foot1: {fileID: 0}
foot2: {fileID: 0}
foot3: {fileID: 0}
groundedMaterial: {fileID: 0}
unGroundedMaterial: {fileID: 0}
foot0: {fileID: 4845971001702882992}
foot1: {fileID: 4845970999844939483}
foot2: {fileID: 4845970999929964134}
foot3: {fileID: 4845971001308907666}
groundedMaterial: {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
unGroundedMaterial: {fileID: 2100000, guid: eaad04b0e0dec42229c9cb00a981d7ac, type: 2}
--- !u!114 &4845971001715176662
MonoBehaviour:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 4845971001715176651}
m_Modifications:
- target: {fileID: 2591864625898824423, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.x

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72f745913c5a34df5aaadd5c1f0024cb, type: 3}
--- !u!1 &2270141184585723037 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2591864627249999519, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 4357529801223143938}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2270141184585723026 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,

--- !u!114 &4462656217269709630 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114705911240010044, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 4357529801223143938}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8385811723256971493
PrefabInstance:
m_ObjectHideFlags: 0

- target: {fileID: 6084207059270429360, guid: e568400ebedb3474fac505995f12ed4a,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.5078
value: -1.996
objectReference: {fileID: 0}
- target: {fileID: 6084207059270429360, guid: e568400ebedb3474fac505995f12ed4a,
type: 3}

385
Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab


- {fileID: 6810593986226363672}
- {fileID: 8951412967461282419}
- {fileID: 6810815557394078638}
- {fileID: 6817236684048233896}
- {fileID: 7802320107249901494}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6814123289269777284
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6817298226888617532}
- component: {fileID: 6851853045169865310}
m_Layer: 0
m_Name: Point Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &6817298226888617532
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814123289269777284}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6817236684048233896}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!108 &6851853045169865310
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814123289269777284}
m_Enabled: 1
serializedVersion: 8
m_Type: 2
m_Color: {r: 1, g: 0.85834146, b: 0.472, a: 1}
m_Intensity: 1
m_Range: 15
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &6814139680395863842
GameObject:
m_ObjectHideFlags: 0

serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6814157246584779846
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6817236684048233896}
- component: {fileID: 6837572177240906570}
- component: {fileID: 6805840284374846290}
- component: {fileID: 6827732506104714502}
- component: {fileID: 6797943023466929340}
m_Layer: 0
m_Name: Target
m_TagString: target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6817236684048233896
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
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_Children:
- {fileID: 6817298226888617532}
m_Father: {fileID: 6810587057221831324}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6837572177240906570
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &6805840284374846290
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
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 &6827732506104714502
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
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 &6797943023466929340
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
serializedVersion: 2
m_Mass: 5
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1 &6814265275650057734
GameObject:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 6810587057221831324}
m_Modifications:
- target: {fileID: 2310084103354264149, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.49
objectReference: {fileID: 0}
objectReference: {fileID: 6817236684048233896}
objectReference: {fileID: 7802320107249901494}
- target: {fileID: 4845971000000621469, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000000014901161
objectReference: {fileID: 0}
- target: {fileID: 4845971000000621469, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000007
objectReference: {fileID: 0}
- target: {fileID: 4845971000245862049, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000000044703484
objectReference: {fileID: 0}
- target: {fileID: 4845971000245862049, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.32999957
objectReference: {fileID: 0}
- target: {fileID: 4845971000281612791, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000000014901161
objectReference: {fileID: 0}
- target: {fileID: 4845971000281612791, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000052
objectReference: {fileID: 0}
- target: {fileID: 4845971000566026490, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.28284273
objectReference: {fileID: 0}
- target: {fileID: 4845971000943818055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.28284281
objectReference: {fileID: 0}
- target: {fileID: 4845971001325249074, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.28284281
objectReference: {fileID: 0}
- target: {fileID: 4845971001327158055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.28284273
objectReference: {fileID: 0}
- target: {fileID: 4845971001622533708, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000000029802322
objectReference: {fileID: 0}
- target: {fileID: 4845971001622533708, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000004
objectReference: {fileID: 0}
objectReference: {fileID: 11400000, guid: 87bf6e217025144c2a0168ee4bd2466d,
objectReference: {fileID: 11400000, guid: 7040ebdb10cab44a7b516d0933dcd0d2,
type: 3}
- target: {fileID: 4845971001715176648, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
propertyPath: m_BehaviorName
value: CrawlerDynamic
objectReference: {fileID: 0}
objectReference: {fileID: 6817236684048233896}
objectReference: {fileID: 7738248088303878723}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: orientationCube
value:
objectReference: {fileID: 186649206436789638}
- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 7147393771121027373, guid: 0456c89e8c9c243d595b039fe7aa0bf9, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 0456c89e8c9c243d595b039fe7aa0bf9, type: 3}
--- !u!4 &8951412967461282419 stripped
Transform:

m_PrefabAsset: {fileID: 0}
--- !u!114 &8951412967461282417 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
m_PrefabInstance: {fileID: 4573852208357529272}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f37c30a5e8d04117947188818902ef3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &186649206436789638 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4462656217269709630, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
m_PrefabInstance: {fileID: 4573852208357529272}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &6413179990576818696
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 6810587057221831324}
m_Modifications:
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 8951412967461282417}
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: TouchedTarget
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.z
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3840539935788495952, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_Name
value: DynamicTarget
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 46734abd0de454192b407379c6a4ab8d, type: 3}
--- !u!4 &7802320107249901494 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
m_PrefabInstance: {fileID: 6413179990576818696}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7738248088303878723 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
m_PrefabInstance: {fileID: 6413179990576818696}
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:

286
Project/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab


m_Children:
- {fileID: 3386028169429758297}
- {fileID: 4924174722017668}
- {fileID: 4749909135913778}
- {fileID: 2673081981996998229}
--- !u!1 &1379819145489036
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4749909135913778}
- component: {fileID: 33357510309310810}
- component: {fileID: 65988756214975206}
- component: {fileID: 23273142761279318}
m_Layer: 0
m_Name: Target
m_TagString: target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4749909135913778
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 975, y: 4, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4309919623019186}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33357510309310810
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &65988756214975206
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
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 &23273142761279318
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
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!1 &1846708386698568
GameObject:
m_ObjectHideFlags: 0

m_Convex: 0
m_CookingOptions: 14
m_Mesh: {fileID: 4300002, guid: 5b535e54498332546a40dec193a2a56a, type: 3}
--- !u!1001 &7907703421359097234
--- !u!1001 &1179916799623326699
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2

- target: {fileID: 1141786540848836948, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
propertyPath: m_RootOrder
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
- target: {fileID: 2270141184585723026, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 3386028169429758299}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: TouchedTarget
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalPosition.x
value: 975
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalPosition.y
value: 4
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2310084103354264149, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
propertyPath: m_RootOrder
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalScale.x
- target: {fileID: 2310084103354264149, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
propertyPath: m_LocalPosition.y
value: -1.996
propertyPath: m_LocalScale.y
value: 1
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3840539935788495952, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_Name
value: StaticTarget
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e, type: 3}
--- !u!4 &2673081981996998229 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
m_PrefabInstance: {fileID: 1179916799623326699}
m_PrefabAsset: {fileID: 0}
--- !u!114 &2466880273407263648 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
m_PrefabInstance: {fileID: 1179916799623326699}
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:
--- !u!1001 &7907703421359097234
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4309919623019186}
m_Modifications:
objectReference: {fileID: 4749909135913778}
objectReference: {fileID: 2673081981996998229}
- target: {fileID: 4845971000000621469, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x

objectReference: {fileID: 0}
- target: {fileID: 4845971000566026490, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284284
objectReference: {fileID: 0}
- target: {fileID: 4845971000566026490, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.2828427
objectReference: {fileID: 0}
- target: {fileID: 4845971000943818055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.2828427
objectReference: {fileID: 0}
- target: {fileID: 4845971001325249074, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284284
objectReference: {fileID: 0}
- target: {fileID: 4845971001327158055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}

objectReference: {fileID: 0}
- target: {fileID: 4845971001715176648, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_BehaviorName
value: CrawlerStatic
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176648, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
objectReference: {fileID: 11400000, guid: c6509001ba679447fba27f894761c3ba,
objectReference: {fileID: 11400000, guid: ff52bf4e5f6124657b7139e8dfe730e7,
objectReference: {fileID: 4749909135913778}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: ground
value:
objectReference: {fileID: 4856650706546504}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: respawnTargetWhenTouched
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: targetIsStatic
value: 1
objectReference: {fileID: 0}
objectReference: {fileID: 2466880273407263648}
- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_Name
value: Crawler
objectReference: {fileID: 0}
- target: {fileID: 8742078559849259273, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0456c89e8c9c243d595b039fe7aa0bf9, type: 3}
--- !u!4 &3386028169429758297 stripped

m_PrefabInstance: {fileID: 7907703421359097234}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3386028169429758299 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
m_PrefabInstance: {fileID: 7907703421359097234}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f37c30a5e8d04117947188818902ef3, type: 3}
m_Name:
m_EditorClassIdentifier:

45
Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity


propertyPath: m_Name
value: DynamicPlatform (6)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_Name
value: DynamicPlatform (9)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_Name
value: DynamicPlatform (4)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_Name
value: DynamicPlatform (8)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_Name
value: DynamicPlatform (3)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

type: 3}
propertyPath: m_Name
value: DynamicPlatform (1)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}

propertyPath: m_Name
value: DynamicPlatform (7)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

type: 3}
propertyPath: m_Name
value: DynamicPlatform (5)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}

type: 3}
propertyPath: m_Name
value: DynamicPlatform (2)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}

381
Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity


propertyPath: m_Name
value: FixedPlatform (1)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
- target: {fileID: 8231708464545277303, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &258681675

- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_Name
value: FixedPlatform (6)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x

- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_Name
value: FixedPlatform (9)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_ConnectedAnchor.y
value: -0.14285131
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000066310167
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000672
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.0000067949295
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000684
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000006571412
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3300071
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000069588423
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000648
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &471764575

propertyPath: m_Name
value: FixedPlatform (7)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.y
value: -0.14285131
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000066310167
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000672
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.0000067949295
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000684
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000006571412
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3300071
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000069588423
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000648
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &586831923

propertyPath: m_Name
value: FixedPlatform (3)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.y
value: -0.14285858
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000066310167
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000672
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.0000067949295
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000684
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000006571412
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3300071
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000069588423
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000648
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1 &1392866527

propertyPath: m_Name
value: FixedPlatform (8)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_Name
value: FixedPlatform (5)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_ConnectedAnchor.y
value: -0.14285858
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000066310167
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000672
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.0000067949295
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000684
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000006571412
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3300071
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000069588423
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000648
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &2071138685

propertyPath: m_Name
value: FixedPlatform (4)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

propertyPath: m_Name
value: FixedPlatform (2)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

111
Project/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs


Quaternion m_WalkDirLookRot; //Will hold the rotation to our target
[Header("Target To Walk Towards")] [Space(10)]
public Transform target; //Target the agent will walk towards.
public float targetSpawnRadius; //The radius in which a target can be randomly spawned.
public bool detectTargets; //Should this agent detect targets
public bool respawnTargetWhenTouched; //Should the target respawn to a different position when touched
public Transform ground; //Ground gameobject. The height will be used for target spawning
public TargetController target; //Target the agent will walk towards.
[Header("Body Parts")] [Space(10)] public Transform body;
public Transform leg0Upper;

[Header("Orientation")] [Space(10)]
//This will be used as a stable reference point for observations
//Because ragdolls can move erratically, using a standalone reference point can significantly improve learning
public GameObject orientationCube;
//This will be used as a stabilized model space reference point for observations
//Because ragdolls can move erratically during training, using a stabilized reference transform improves learning
public OrientationCubeController orientationCube;
JointDriveController m_JdController;

public override void Initialize()
{
UpdateOrientationCube();
orientationCube.UpdateOrientation(body, target.transform);
m_JdController = GetComponent<JointDriveController>();

}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()
{
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);
}
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
orientationCube.UpdateOrientation(body, target.transform);
}
/// <summary>
sensor.AddObservation(bp.groundContact.touchingGround ? 1 : 0); // Whether the bp touching the ground
//GROUND CHECK
sensor.AddObservation(bp.groundContact.touchingGround); // Is this bp touching the ground
//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.

/// </summary>
public override void CollectObservations(VectorSensor sensor)
{
//Add body rotation delta relative to orientation cube
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.position));
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.transform.position));
RaycastHit hit;
float maxRaycastDist = 10;

public void TouchedTarget()
{
AddReward(1f);
if (respawnTargetWhenTouched)
{
GetRandomTargetPos();
}
}
/// <summary>
/// Moves target to a random position within specified radius.
/// </summary>
public void GetRandomTargetPos()
{
var newTargetPos = Random.insideUnitSphere * targetSpawnRadius;
newTargetPos.y = 5;
target.position = newTargetPos + ground.position;
}
public override void OnActionReceived(float[] vectorAction)

bpDict[leg3Lower].SetJointStrength(vectorAction[++i]);
}
void UpdateOrientationCube()
{
//FACING DIR
m_WalkDir = target.position - orientationCube.transform.position;
m_WalkDir.y = 0; //flatten dir on the y
m_WalkDirLookRot = Quaternion.LookRotation(m_WalkDir); //get our look rot to the target
//UPDATE ORIENTATION CUBE POS & ROT
orientationCube.transform.position = body.position;
orientationCube.transform.rotation = m_WalkDirLookRot;
}
if (detectTargets)
{
foreach (var bodyPart in m_JdController.bodyPartsList)
{
if (bodyPart.targetContact && bodyPart.targetContact.touchingTarget)
{
TouchedTarget();
}
}
}
UpdateOrientationCube();
orientationCube.UpdateOrientation(body, target.transform);
// If enabled the feet will light up green when the foot is grounded.
// This is just a visualization and isn't necessary for function

void RewardFunctionTimePenalty()
{
AddReward(-0.001f);
}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()
{
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);
}
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
UpdateOrientationCube();
if (detectTargets && respawnTargetWhenTouched)
{
GetRandomTargetPos();
}
}
private void OnDrawGizmosSelected()
{
if (Application.isPlaying)
{
Gizmos.color = Color.green;
Gizmos.matrix = orientationCube.transform.localToWorldMatrix;
Gizmos.DrawWireCube(Vector3.zero, orientationCube.transform.localScale);
Gizmos.DrawRay(Vector3.zero, Vector3.forward);
}
}
}

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

2
Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn.meta


fileFormatVersion: 2
guid: 87bf6e217025144c2a0168ee4bd2466d
guid: 7040ebdb10cab44a7b516d0933dcd0d2
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj

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

2
Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn.meta


fileFormatVersion: 2
guid: c6509001ba679447fba27f894761c3ba
guid: ff52bf4e5f6124657b7139e8dfe730e7
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj

5
Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Outline.mat


Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Outline
m_Shader: {fileID: 4800000, guid: 5dfe02aa25125453eaaaa295936dc8cd, type: 3}
m_ShaderKeywords:

5
Project/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat


Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIDefault
m_Shader: {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: ETC1_EXTERNAL_ALPHA

15
Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/OrientationCube.prefab


serializedVersion: 6
m_Component:
- component: {fileID: 2591864627249999504}
- component: {fileID: 114705911240010044}
m_Layer: 0
m_Name: OrientationCube
m_TagString: Untagged

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2591864627249999519}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -498.349, y: -0.45, z: -250.09256}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2591864625898824440}

--- !u!114 &114705911240010044
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2591864627249999519}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2591864627374185740
GameObject:
m_ObjectHideFlags: 0

7
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs


bp.groundContact.agent = gameObject.GetComponent<Agent>();
}
// Add & setup the target contact script
bp.targetContact = t.GetComponent<TargetContact>();
if (!bp.targetContact)
{
bp.targetContact = t.gameObject.AddComponent<TargetContact>();
}
bp.thisJdController = this;
bodyPartsDict.Add(t, bp);
bodyPartsList.Add(bp);

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &693499830
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 555702846}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1513f8a85fedd47efba089213b7c5bde, type: 3}
m_Name:
m_EditorClassIdentifier:
transformToFollow: {fileID: 6065910099080495282}
targetToLookAt: {fileID: 4714470935848893865}
heightOffset: 0
--- !u!1 &4711180330649187171
GameObject:
m_ObjectHideFlags: 0

serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &4712494856961735751
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4714470935848893865}
- component: {fileID: 4689783609468392267}
- component: {fileID: 4721366003033637715}
- component: {fileID: 4699049336072019207}
- component: {fileID: 4729272029965882557}
m_Layer: 0
m_Name: Target
m_TagString: target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4714470935848893865
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4712494856961735751}
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_Children: []
m_Father: {fileID: 4715983678655513245}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4689783609468392267
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4712494856961735751}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &4721366003033637715
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4712494856961735751}
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 &4699049336072019207
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4712494856961735751}
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 &4729272029965882557
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4712494856961735751}
serializedVersion: 2
m_Mass: 5
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1 &4712512458067701539
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1001 &758428436173755182
--- !u!1001 &6359877978260855390
m_TransformParent: {fileID: 6065910098925129092}
m_TransformParent: {fileID: 4715983678655513245}
- target: {fileID: 2591864625898824423, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 693499830, guid: 765582efd9dda46ed98564603316353f, type: 3}
propertyPath: targetToLookAt
value:
objectReference: {fileID: 4714470935848893865}
- target: {fileID: 895268871377934275, guid: 765582efd9dda46ed98564603316353f,
propertyPath: m_IsActive
value: 0
propertyPath: m_Name
value: WalkerRagdoll
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934297, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: e785133c5b0ac461588106642550d1b3,
type: 3}
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: 3.07
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: -0
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: 0.7071068
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: -0
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 1
value: 0.7071068
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 2
value: 3
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: 90
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 2591864627249999519, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
propertyPath: m_Name
value: OrientationCube
objectReference: {fileID: 0}
propertyPath: target
value:
objectReference: {fileID: 5064725739247198300}
m_SourcePrefab: {fileID: 100100000, guid: 41960beaa3d8041e19d82b5160042e55, type: 3}
--- !u!1 &2989930013812587953 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2591864627249999519, guid: 41960beaa3d8041e19d82b5160042e55,
m_SourcePrefab: {fileID: 100100000, guid: 765582efd9dda46ed98564603316353f, type: 3}
--- !u!4 &6065910098925129092 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
m_PrefabInstance: {fileID: 758428436173755182}
m_PrefabInstance: {fileID: 6359877978260855390}
--- !u!1001 &6359877978260855390
--- !u!114 &4507520074116686519 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
type: 3}
m_PrefabInstance: {fileID: 6359877978260855390}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ccb0f85f0009540d7ad997952e2aed7b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8370630005521172503
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2

- target: {fileID: 895268871377934275, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
propertyPath: m_Name
value: WalkerRagdoll
objectReference: {fileID: 0}
- target: {fileID: 895268871377934297, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_Model
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
objectReference: {fileID: 11400000, guid: 2cb15010f7cbe4dc59418a5858c87819,
type: 3}
- target: {fileID: 895268871377934297, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_BrainParameters.VectorObservationSize
value: 236
objectReference: {fileID: 0}
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
objectReference: {fileID: 4507520074116686519}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
value: 0
value: 6.2
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
value: 3.07
value: 1.15
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
value: 0
value: 3.824
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
value: 0.7071068
value: -0
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
value: 0.7071068
value: 1
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
value: 3
value: 2
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
value: 90
value: 0
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3840539935788495952, guid: 46734abd0de454192b407379c6a4ab8d,
propertyPath: target
value:
objectReference: {fileID: 4714470935848893865}
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: ground
value:
objectReference: {fileID: 4715966284166353839}
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: orientationCube
value:
objectReference: {fileID: 2989930013812587953}
propertyPath: m_Name
value: DynamicTarget
objectReference: {fileID: 0}
m_SourcePrefab: {fileID: 100100000, guid: 765582efd9dda46ed98564603316353f, type: 3}
--- !u!4 &6065910098925129092 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
type: 3}
m_PrefabInstance: {fileID: 6359877978260855390}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6065910099080495282 stripped
m_SourcePrefab: {fileID: 100100000, guid: 46734abd0de454192b407379c6a4ab8d, type: 3}
--- !u!4 &4714470935848893865 stripped
m_CorrespondingSourceObject: {fileID: 895268871264836332, guid: 765582efd9dda46ed98564603316353f,
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
m_PrefabInstance: {fileID: 6359877978260855390}
m_PrefabInstance: {fileID: 8370630005521172503}
--- !u!1 &555702846 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6359877977706987616, guid: 765582efd9dda46ed98564603316353f,
--- !u!114 &5064725739247198300 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
m_PrefabInstance: {fileID: 6359877978260855390}
m_PrefabInstance: {fileID: 8370630005521172503}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:

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


- component: {fileID: 895268871264836333}
m_Layer: 0
m_Name: hips
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 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_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
- {fileID: 5370605450757534085}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}

VectorActionSize: 27000000
VectorActionDescriptions: []
VectorActionSpaceType: 1
m_Model: {fileID: 11400000, guid: b0c510a5ce7f1453fa3a3607a94c1fbb, type: 3}
m_Model: {fileID: 11400000, guid: 3c6170922a9ad4d9f85261699ca00f5d, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: WalkerDynamic

hasUpgradedFromAgentParameters: 1
MaxStep: 5000
maximumWalkingSpeed: 999
targetSpawnRadius: 40
ground: {fileID: 0}
detectTargets: 1
targetIsStatic: 0
respawnTargetWhenTouched: 1
hips: {fileID: 895268871264836332}
chest: {fileID: 7933235354845945071}
spine: {fileID: 7933235354652902033}

armR: {fileID: 7933235355057813930}
forearmR: {fileID: 7933235353195701980}
handR: {fileID: 7933235354616748502}
orientationCube: {fileID: 7559180363928843817}
--- !u!114 &895268871377934303
MonoBehaviour:
m_ObjectHideFlags: 0

- component: {fileID: 6359877977706987617}
- component: {fileID: 6359877977706987551}
- component: {fileID: 6359877977706987550}
- component: {fileID: 693499830}
m_Layer: 0
m_Name: DirectionIndicator
m_TagString: Untagged

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6359877977706987616}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.000000093018, y: -2.564, z: -0.000000093018}
m_LocalPosition: {x: 0, y: -2.564, z: 0}
m_LocalScale: {x: 2.0320811, y: 0.033901207, z: 2.0320811}
m_Children:
- {fileID: 4618227339832610166}

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!114 &693499830
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6359877977706987616}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1513f8a85fedd47efba089213b7c5bde, type: 3}
m_Name:
m_EditorClassIdentifier:
transformToFollow: {fileID: 895268871264836332}
targetToLookAt: {fileID: 0}
heightOffset: 0
--- !u!1 &7051518369535447352
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 7933235353030744117}
m_Layer: 0
m_Name: upper_arm_L
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235353041637845}
m_Layer: 0
m_Name: hand_L
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235353195701957}
m_Layer: 0
m_Name: lower_arm_R
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235353228551178}
m_Layer: 0
m_Name: thighL
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235353240438144}
m_Layer: 0
m_Name: lower_arm_L
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235353272702533}
m_Layer: 0
m_Name: shinL
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235353655703553}
m_Layer: 0
m_Name: footR
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235353711811629}
m_Layer: 0
m_Name: shinR
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235353713167634}
m_Layer: 0
m_Name: thighR
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235354074184676}
m_Layer: 0
m_Name: head
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235354616748520}
m_Layer: 0
m_Name: hand_R
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235354652902042}
m_Layer: 0
m_Name: spine
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235354845945040}
m_Layer: 0
m_Name: chest
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235354882597188}
m_Layer: 0
m_Name: footL
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 7933235355057813907}
m_Layer: 0
m_Name: upper_arm_R
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

m_Height: 1
m_Direction: 0
m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &7597605653427724053
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 895268871377934298}
m_Modifications:
- target: {fileID: 2591864625898824423, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999519, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_Name
value: OrientationCube
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72f745913c5a34df5aaadd5c1f0024cb, type: 3}
--- !u!4 &5370605450757534085 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 7597605653427724053}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7559180363928843817 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114705911240010044, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 7597605653427724053}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:

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


m_LocalPosition: {x: -500, y: 2.45, z: -250}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4085853164035250}
- {fileID: 944450991292172294}
--- !u!1 &1711420055118728
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4085853164035250}
- component: {fileID: 33406676668336024}
- component: {fileID: 65728406221657384}
- component: {fileID: 23891878356976108}
- component: {fileID: 54470051767281394}
m_Layer: 0
m_Name: Target
m_TagString: target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4085853164035250
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1711420055118728}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.7899997, z: 1800}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4878380427462518}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33406676668336024
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1711420055118728}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &65728406221657384
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1711420055118728}
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 &23891878356976108
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1711420055118728}
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 &54470051767281394
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1711420055118728}
serializedVersion: 2
m_Mass: 5
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &928625103
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8076557379269661508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1513f8a85fedd47efba089213b7c5bde, type: 3}
m_Name:
m_EditorClassIdentifier:
transformToFollow: {fileID: 2610895078055938504}
targetToLookAt: {fileID: 4085853164035250}
heightOffset: 0
--- !u!1001 &2906899243981837092
PrefabInstance:
m_ObjectHideFlags: 0

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

type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: 1cb7f6cc571fb4376b972bc090627b6d,
objectReference: {fileID: 11400000, guid: 8dfd4337ed40e4d48872a4f86919c9da,
type: 3}
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
type: 3}

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

type: 3}
propertyPath: orientationCube
value:
objectReference: {fileID: 5269189931577362882}
objectReference: {fileID: 4661501641717294349}
- target: {fileID: 7933235353030744139, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x

type: 3}
m_PrefabInstance: {fileID: 2906899243981837092}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2610895078055938504 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 895268871264836332, guid: 765582efd9dda46ed98564603316353f,
--- !u!114 &5663381556754394061 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
--- !u!1 &8076557379269661508 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6359877977706987616, guid: 765582efd9dda46ed98564603316353f,
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ccb0f85f0009540d7ad997952e2aed7b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &4661501641717294349 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7559180363928843817, guid: 765582efd9dda46ed98564603316353f,
--- !u!1001 &7703349395854010205
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &4061126297018023352
m_TransformParent: {fileID: 2610895078227559678}
m_TransformParent: {fileID: 4878380427462518}
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onTrtesiggerEnterEvent.m_PersistentCalls.m_Calls.Array.size
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 5663381556754394061}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: TouchedTarget
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onTrtesiggerEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onTrtesiggerEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
value: 0
value: 1.7899997
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
value: 0
value: 1800
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
value: 2
value: 0
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2591864627249999504, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2591864627249999519, guid: 41960beaa3d8041e19d82b5160042e55,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3840539935788495952, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
value: OrientationCube
value: StaticTarget
m_SourcePrefab: {fileID: 100100000, guid: 41960beaa3d8041e19d82b5160042e55, type: 3}
--- !u!1 &5269189931577362882 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2591864627249999519, guid: 41960beaa3d8041e19d82b5160042e55,
m_SourcePrefab: {fileID: 100100000, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e, type: 3}
--- !u!4 &944450991292172294 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
m_PrefabInstance: {fileID: 4061126297018023352}
m_PrefabAsset: {fileID: 0}
--- !u!114 &738575235704034803 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
m_PrefabInstance: {fileID: 7703349395854010205}
m_PrefabInstance: {fileID: 4061126297018023352}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:

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


objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f51e8260728fd4c8fa87bcda9d0e2027, type: 3}
--- !u!1 &781961355
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 781961358}
- component: {fileID: 781961357}
- component: {fileID: 781961356}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &781961356
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 781961355}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &781961357
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 781961355}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &781961358
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 781961355}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &909122612
PrefabInstance:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1354152338793162668, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3916531708496791165, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_ConnectedAnchor.z

type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.00000023841858
objectReference: {fileID: 0}
- target: {fileID: 4507520074116686519, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: rewardManager
value:
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

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


propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5066517641317679859, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.6999959
objectReference: {fileID: 0}
- target: {fileID: 5066517641327561583, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.6999967
objectReference: {fileID: 0}
- target: {fileID: 5066517641430005247, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.4999994
objectReference: {fileID: 0}
- target: {fileID: 5066517641468855679, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.00000017881393
objectReference: {fileID: 0}
- target: {fileID: 5066517641503708862, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.4999994
objectReference: {fileID: 0}
- target: {fileID: 5066517641529767720, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.39999378
objectReference: {fileID: 0}
- target: {fileID: 5066517641893800742, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.00000017881393
objectReference: {fileID: 0}
- target: {fileID: 5066517641985220144, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.39999378
objectReference: {fileID: 0}
- target: {fileID: 5066517641988116231, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.00000017881393
objectReference: {fileID: 0}
- target: {fileID: 5066517642825943758, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.6999959
objectReference: {fileID: 0}
- target: {fileID: 5066517643083346557, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.00000017881393
objectReference: {fileID: 0}
- target: {fileID: 5066517643325467277, guid: 94dced9d2186d4a76b970fb18ef6d7a6,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.6999967
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 94dced9d2186d4a76b970fb18ef6d7a6, type: 3}
--- !u!1 &459314944

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


{
public float maximumWalkingSpeed = 999; //The max walk velocity magnitude an agent will be rewarded for
Vector3 m_WalkDir; //Direction to the target
Quaternion m_WalkDirLookRot; //Will hold the rotation to our target
// Quaternion m_WalkDirLookRot; //Will hold the rotation to our target
public Transform target; //Target the agent will walk towards.
public float targetSpawnRadius; //The radius in which a target can be randomly spawned.
public bool detectTargets; //Should this agent detect targets
public bool respawnTargetWhenTouched; //Should the target respawn to a different position when touched
public Transform ground; //Ground gameobject. The height will be used for target spawning
public TargetController target; //Target the agent will walk towards.
[Header("Body Parts")] [Space(10)] public Transform hips;
public Transform chest;

public Transform armR;
public Transform forearmR;
public Transform handR;
//This will be used as a stable reference point for observations
//Because ragdolls can move erratically, using a standalone reference point can significantly improve learning
public GameObject orientationCube;
//This will be used as a stabilized model space reference point for observations
//Because ragdolls can move erratically during training, using a stabilized reference transform improves learning
public OrientationCubeController orientationCube;
JointDriveController m_JdController;

{
UpdateOrientationCube();
orientationCube.UpdateOrientation(hips, target.transform);
//Setup each body part
m_JdController = GetComponent<JointDriveController>();
m_JdController.SetupBodyPart(hips);
m_JdController.SetupBodyPart(chest);

}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()
{
//Reset all of the body parts
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);
}
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
orientationCube.UpdateOrientation(hips, target.transform);
SetResetParameters();
}
/// <summary>
sensor.AddObservation(bp.groundContact.touchingGround ? 1 : 0); // Is this bp touching the ground
sensor.AddObservation(bp.groundContact.touchingGround); // Is this bp touching the ground
//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(Quaternion.FromToRotation(hips.forward, orientationCube.transform.forward));
sensor.AddObservation(Quaternion.FromToRotation(head.forward, orientationCube.transform.forward));
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.position));
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.transform.position));
foreach (var bodyPart in m_JdController.bodyPartsList)
{

bpDict[forearmR].SetJointStrength(vectorAction[++i]);
}
void UpdateOrientationCube()
{
//FACING DIR
m_WalkDir = target.position - orientationCube.transform.position;
m_WalkDir.y = 0; //flatten dir on the y
m_WalkDirLookRot = Quaternion.LookRotation(m_WalkDir); //get our look rot to the target
//UPDATE ORIENTATION CUBE POS & ROT
orientationCube.transform.position = hips.position;
orientationCube.transform.rotation = m_WalkDirLookRot;
}
if (detectTargets)
{
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
if (bodyPart.targetContact && bodyPart.targetContact.touchingTarget)
{
TouchedTarget();
}
}
}
UpdateOrientationCube();
var cubeForward = orientationCube.transform.forward;
orientationCube.UpdateOrientation(hips, target.transform);
var moveTowardsTargetReward = Vector3.Dot(orientationCube.transform.forward,
var moveTowardsTargetReward = Vector3.Dot(cubeForward,
var lookAtTargetReward = Vector3.Dot(orientationCube.transform.forward, head.forward);
// c. Encourage head height.
var headHeightOverFeetReward = (head.position.y - footL.position.y) + (head.position.y - footR.position.y);
var lookAtTargetReward = Vector3.Dot(cubeForward, head.forward);
// c. Encourage head height. //Should normalize to ~1
var headHeightOverFeetReward =
((head.position.y - footL.position.y) + (head.position.y - footR.position.y) / 10);
+0.02f * moveTowardsTargetReward
+ 0.01f * lookAtTargetReward
+ 0.01f * headHeightOverFeetReward
+ 0.02f * moveTowardsTargetReward
+ 0.02f * lookAtTargetReward
+ 0.005f * headHeightOverFeetReward
);
}

public void TouchedTarget()
{
AddReward(1f);
if (respawnTargetWhenTouched)
{
MoveTargetToRandomPosition();
}
}
/// <summary>
/// Moves target to a random position within specified radius.
/// </summary>
public void MoveTargetToRandomPosition()
{
var newTargetPos = Random.insideUnitSphere * targetSpawnRadius;
newTargetPos.y = 5;
target.position = newTargetPos + ground.position;
}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()
{
//Reset all of the body parts
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);
}
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
UpdateOrientationCube();
if (detectTargets && respawnTargetWhenTouched)
{
MoveTargetToRandomPosition();
}
SetResetParameters();
}
public void SetTorsoMass()

public void SetResetParameters()
{
SetTorsoMass();
}
private void OnDrawGizmosSelected()
{
if (Application.isPlaying)
{
Gizmos.color = Color.green;
Gizmos.matrix = orientationCube.transform.localToWorldMatrix;
Gizmos.DrawWireCube(Vector3.zero, orientationCube.transform.localScale);
Gizmos.DrawRay(Vector3.zero, Vector3.forward);
}
}
}

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

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


fileFormatVersion: 2
guid: 2cb15010f7cbe4dc59418a5858c87819
guid: e785133c5b0ac461588106642550d1b3
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj

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

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


fileFormatVersion: 2
guid: 1cb7f6cc571fb4376b972bc090627b6d
guid: 8dfd4337ed40e4d48872a4f86919c9da
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj

2
config/ppo/WalkerDynamic.yaml


gamma: 0.995
strength: 1.0
keep_checkpoints: 5
max_steps: 25000000
max_steps: 20000000
time_horizon: 1000
summary_freq: 30000
threaded: true

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: []

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


fileFormatVersion: 2
guid: 46734abd0de454192b407379c6a4ab8d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

149
Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.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: StaticTarget
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: 6.2, y: 1.15, z: 3.824}
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: 5
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !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
moveTargetToRandomPosIfTouched: 0
targetSpawnRadius: 0
onTrtesiggerEnterEvent:
m_PersistentCalls:
m_Calls: []
triggerIsTouching: 0
onTriggerEnterEvent:
m_PersistentCalls:
m_Calls: []
onTriggerStayEvent:
m_PersistentCalls:
m_Calls: []
onTriggerExitEvent:
m_PersistentCalls:
m_Calls: []
colliderIsTouching: 0
onCollisionEnterEvent:
m_PersistentCalls:
m_Calls: []
onCollisionStayEvent:
m_PersistentCalls:
m_Calls: []
onCollisionExitEvent:
m_PersistentCalls:
m_Calls: []

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


fileFormatVersion: 2
guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

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


using UnityEngine;
namespace Unity.MLAgentsExamples
{
/// <summary>
/// Utility class to allow a stable observation platform.
/// </summary>
public class OrientationCubeController : MonoBehaviour
{
//Update position and Rotation
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
var lookRot =
dirVector == Vector3.zero
? Quaternion.identity
: Quaternion.LookRotation(dirVector); //get our look rot to the target
//UPDATE ORIENTATION CUBE POS & ROT
transform.SetPositionAndRotation(rootBP.position, lookRot);
}
}
}

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


fileFormatVersion: 2
guid: 771e78c5e980e440e8cd19716b55075f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

135
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetController.cs


using UnityEngine;
using Random = UnityEngine.Random;
using Unity.MLAgents;
using UnityEngine.Events;
namespace Unity.MLAgentsExamples
{
/// <summary>
/// Utility class to allow target placement and collision detection with an agent
/// Add this script to the target you want the agent to touch.
/// Callbacks will be triggered any time the target is touched with a collider tagged as 'tagToDetect'
/// </summary>
public class TargetController : MonoBehaviour
{
[Header("Collider Tag To Detect")]
public string tagToDetect = "agent"; //collider tag to detect
[Header("Target Placement")]
public float spawnRadius; //The radius in which a target can be randomly spawned.
public bool respawnIfTouched; //Should the target respawn to a different position when touched
[Header("Target Fell Protection")]
public bool respawnIfFallsOffPlatform = true; //If the target falls off the platform, reset the position.
public float fallDistance = 5; //distance below the starting height that will trigger a respawn
private Vector3 m_startingPos; //the starting position of the target
private Agent m_agentTouching; //the agent currently touching the target
[System.Serializable]
public class TriggerEvent : UnityEvent<Collider>
{
}
[Header("Trigger Callbacks")]
public TriggerEvent onTriggerEnterEvent = new TriggerEvent();
public TriggerEvent onTriggerStayEvent = new TriggerEvent();
public TriggerEvent onTriggerExitEvent = new TriggerEvent();
[System.Serializable]
public class CollisionEvent : UnityEvent<Collision>
{
}
[Header("Collision Callbacks")]
public CollisionEvent onCollisionEnterEvent = new CollisionEvent();
public CollisionEvent onCollisionStayEvent = new CollisionEvent();
public CollisionEvent onCollisionExitEvent = new CollisionEvent();
// Start is called before the first frame update
void OnEnable()
{
m_startingPos = transform.position;
if (respawnIfTouched)
{
MoveTargetToRandomPosition();
}
}
void Update()
{
if (respawnIfFallsOffPlatform)
{
if (transform.position.y < m_startingPos.y - fallDistance)
{
Debug.Log($"{transform.name} Fell Off Platform");
MoveTargetToRandomPosition();
}
}
}
/// <summary>
/// Moves target to a random position within specified radius.
/// </summary>
public void MoveTargetToRandomPosition()
{
var newTargetPos = m_startingPos + (Random.insideUnitSphere * spawnRadius);
newTargetPos.y = m_startingPos.y;
transform.position = newTargetPos;
}
private void OnCollisionEnter(Collision col)
{
if (col.transform.CompareTag(tagToDetect))
{
onCollisionEnterEvent.Invoke(col);
if (respawnIfTouched)
{
MoveTargetToRandomPosition();
}
}
}
private void OnCollisionStay(Collision col)
{
if (col.transform.CompareTag(tagToDetect))
{
onCollisionStayEvent.Invoke(col);
}
}
private void OnCollisionExit(Collision col)
{
if (col.transform.CompareTag(tagToDetect))
{
onCollisionExitEvent.Invoke(col);
}
}
private void OnTriggerEnter(Collider col)
{
if (col.CompareTag(tagToDetect))
{
onTriggerEnterEvent.Invoke(col);
}
}
private void OnTriggerStay(Collider col)
{
if (col.CompareTag(tagToDetect))
{
onTriggerStayEvent.Invoke(col);
}
}
private void OnTriggerExit(Collider col)
{
if (col.CompareTag(tagToDetect))
{
onTriggerExitEvent.Invoke(col);
}
}
}
}

11
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetController.cs.meta


fileFormatVersion: 2
guid: 3c8f113a8b8d94967b1b1782c549be81
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存