浏览代码

update walker (#4217)

/develop/bisim-review
GitHub 4 年前
当前提交
32dd1e86
共有 23 个文件被更改,包括 1904 次插入2009 次删除
  1. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Outline.mat
  2. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat
  3. 15
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/OrientationCube.prefab
  4. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs
  5. 61
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
  6. 314
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatformWalker.prefab
  7. 153
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerRagdoll.prefab
  8. 443
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerWithTargetPair.prefab
  9. 173
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
  10. 60
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerStatic.unity
  11. 168
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  12. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic.nn
  13. 2
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic.nn.meta
  14. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerStatic.nn
  15. 2
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerStatic.nn.meta
  16. 159
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab
  17. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab.meta
  18. 149
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.prefab
  19. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.prefab.meta
  20. 24
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/OrientationCubeController.cs
  21. 11
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/OrientationCubeController.cs.meta
  22. 135
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetController.cs
  23. 11
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetController.cs.meta

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);

61
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs


/// Utility class to allow the NNModel file for an agent to be overriden during inference.
/// This is used internally to validate the file after training is done.
/// The behavior name to override and file path are specified on the commandline, e.g.
/// player.exe --mlagents-override-model behavior1 /path/to/model1.nn --mlagents-override-model behavior2 /path/to/model2.nn
/// player.exe --mlagents-override-model-directory /path/to/models
///
/// Additionally, a number of episodes to run can be specified; after this, the application will quit.
/// Note this will only work with example scenes that have 1:1 Agent:Behaviors. More complicated scenes like WallJump

{
HashSet<string> k_SupportedExtensions = new HashSet<string>{"nn", "onnx"};
const string k_CommandLineModelOverrideExtensionFlag = "--mlagents-override-model-extension";
const string k_CommandLineQuitAfterEpisodesFlag = "--mlagents-quit-after-episodes";
const string k_CommandLineQuitOnLoadFailure = "--mlagents-quit-on-load-failure";

Dictionary<string, string> m_BehaviorNameOverrides = new Dictionary<string, string>();
string m_BehaviorNameOverrideDirectory;
string m_OverrideExtension = "nn";
// Cached loaded NNModels, with the behavior name as the key.
Dictionary<string, NNModel> m_CachedModels = new Dictionary<string, NNModel>();

{
m_BehaviorNameOverrideDirectory = args[i + 1].Trim();
}
else if (args[i] == k_CommandLineModelOverrideExtensionFlag && i < args.Length-1)
{
m_OverrideExtension = args[i + 1].Trim().ToLower();
var isKnownExtension = k_SupportedExtensions.Contains(m_OverrideExtension);
// Not supported yet - need to update the model loading code to support
var isOnnx = m_OverrideExtension.Equals("onnx");
if (!isKnownExtension || isOnnx)
{
Debug.LogError($"loading unsupported format: {m_OverrideExtension}");
Application.Quit(1);
#if UNITY_EDITOR
EditorApplication.isPlaying = false;
#endif
}
}
else if (args[i] == k_CommandLineQuitAfterEpisodesFlag && i < args.Length-1)
{
Int32.TryParse(args[i + 1], out maxEpisodes);

}
else if(!string.IsNullOrEmpty(m_BehaviorNameOverrideDirectory))
{
assetPath = Path.Combine(m_BehaviorNameOverrideDirectory, $"{behaviorName}.nn");
assetPath = Path.Combine(m_BehaviorNameOverrideDirectory, $"{behaviorName}.{m_OverrideExtension}");
}
if (string.IsNullOrEmpty(assetPath))

return null;
}
// Note - this approach doesn't work for onnx files. Need to replace with
// the equivalent of ONNXModelImporter.OnImportAsset()
var asset = ScriptableObject.CreateInstance<NNModel>();
asset.modelData = ScriptableObject.CreateInstance<NNModelData>();
asset.modelData.Value = model;

/// </summary>
void OverrideModel()
{
bool overrideOk = false;
string overrideError = null;
if (nnModel == null && m_QuitOnLoadFailure)
if (nnModel == null)
Debug.Log(
overrideError =
$"and that the model file exists"
);
$"and that the model file exists";
}
else
{
var modelName = nnModel != null ? nnModel.name : "<null>";
Debug.Log($"Overriding behavior {behaviorName} for agent with model {modelName}");
try
{
m_Agent.SetModel(GetOverrideBehaviorName(behaviorName), nnModel);
overrideOk = true;
}
catch (Exception e)
{
overrideError = $"Exception calling Agent.SetModel: {e}";
}
}
if (!overrideOk && m_QuitOnLoadFailure)
{
if(!string.IsNullOrEmpty(overrideError))
{
Debug.LogWarning(overrideError);
}
var modelName = nnModel != null ? nnModel.name : "<null>";
Debug.Log($"Overriding behavior {behaviorName} for agent with model {modelName}");
// This might give a null model; that's better because we'll fall back to the Heuristic
m_Agent.SetModel(GetOverrideBehaviorName(behaviorName), nnModel);
}
}

314
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

- {fileID: 4715966284166353839}
- {fileID: 4714470935848893865}
- {fileID: 6065910098925129092}
- {fileID: 369145498607359463}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1001 &2803298101841886071
--- !u!1001 &6359877978260855390
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2

- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 693499830, guid: 765582efd9dda46ed98564603316353f, type: 3}
propertyPath: targetToLookAt
value:
objectReference: {fileID: 4714470935848893865}
- target: {fileID: 895268871377934275, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_Name
value: WalkerRagdoll
objectReference: {fileID: 0}
- target: {fileID: 895268871377934297, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: e785133c5b0ac461588106642550d1b3,
type: 3}
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: -498.349
value: 0
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: -0.45
value: 3.07
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: -250.09256
value: 0
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: -0
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: 0.7071068
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: -0
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 1
value: 0.7071068
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 4
value: 3
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
value: 0
value: 90
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 2591864627249999519, guid: 72f745913c5a34df5aaadd5c1f0024cb,
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
propertyPath: m_Name
value: OrientationCube
objectReference: {fileID: 0}
propertyPath: target
value:
objectReference: {fileID: 5064725739247198300}
m_SourcePrefab: {fileID: 100100000, guid: 72f745913c5a34df5aaadd5c1f0024cb, type: 3}
--- !u!1 &369145498607359464 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2591864627249999519, guid: 72f745913c5a34df5aaadd5c1f0024cb,
m_SourcePrefab: {fileID: 100100000, guid: 765582efd9dda46ed98564603316353f, type: 3}
--- !u!4 &6065910098925129092 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
m_PrefabInstance: {fileID: 2803298101841886071}
m_PrefabInstance: {fileID: 6359877978260855390}
--- !u!4 &369145498607359463 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
--- !u!114 &4507520074116686519 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
m_PrefabInstance: {fileID: 2803298101841886071}
m_PrefabInstance: {fileID: 6359877978260855390}
--- !u!1001 &6359877978260855390
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,
type: 3}
propertyPath: target
value:
objectReference: {fileID: 4714470935848893865}
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: ground
value:
objectReference: {fileID: 4715966284166353839}
- target: {fileID: 7408209125961349353, guid: 765582efd9dda46ed98564603316353f,
- target: {fileID: 3840539935788495952, guid: 46734abd0de454192b407379c6a4ab8d,
propertyPath: orientationCube
value:
objectReference: {fileID: 369145498607359464}
propertyPath: m_Name
value: DynamicTarget
objectReference: {fileID: 0}
m_SourcePrefab: {fileID: 100100000, guid: 765582efd9dda46ed98564603316353f, type: 3}
--- !u!4 &6065910098925129092 stripped
m_SourcePrefab: {fileID: 100100000, guid: 46734abd0de454192b407379c6a4ab8d, type: 3}
--- !u!4 &4714470935848893865 stripped
m_CorrespondingSourceObject: {fileID: 895268871377934298, guid: 765582efd9dda46ed98564603316353f,
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
m_PrefabInstance: {fileID: 6359877978260855390}
m_PrefabInstance: {fileID: 8370630005521172503}
--- !u!4 &6065910099080495282 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 895268871264836332, guid: 765582efd9dda46ed98564603316353f,
--- !u!114 &5064725739247198300 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
m_PrefabInstance: {fileID: 6359877978260855390}
m_PrefabInstance: {fileID: 8370630005521172503}
--- !u!1 &555702846 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6359877977706987616, 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: 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:

443
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}
- {fileID: 4606400713304633382}
--- !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!1 &1349772156040087566
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 7703349395854010205}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6064974588379450844}
m_Layer: 0
m_Name: OrientationCube (Missing Prefab)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6064974588379450844
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 7703349395854010205}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1349772156040087566}
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:
- {fileID: 6919505835127261715}
m_Father: {fileID: 2610895078227559678}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5269189931577362882
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 2591864627249999519, guid: 41960beaa3d8041e19d82b5160042e55,
type: 3}
m_PrefabInstance: {fileID: 7703349395854010205}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6919505835127261715}
m_Layer: 0
m_Name: Missing Prefab (Dummy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &6919505835127261715
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 7703349395854010205}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5269189931577362882}
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: 6064974588379450844}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 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 &2023556792310701750
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4878380427462518}
m_Modifications:
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.x
value: -498.349
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.45
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.z
value: -250.09256
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!1 &4606400713304633385 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2591864627249999519, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 2023556792310701750}
m_PrefabAsset: {fileID: 0}
--- !u!4 &4606400713304633382 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 2023556792310701750}
m_PrefabAsset: {fileID: 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: 4606400713304633385}
objectReference: {fileID: 4661501641717294349}
value: -0.69999665
value: -0.6999967
objectReference: {fileID: 0}
- target: {fileID: 7933235353030744139, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235353041637847, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.69999564
value: -0.6999959
objectReference: {fileID: 0}
- target: {fileID: 7933235353041637847, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235353195701979, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.49999917
value: 0.4999994
objectReference: {fileID: 0}
- target: {fileID: 7933235353195701979, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235353228551180, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.39999372
value: -0.39999378
objectReference: {fileID: 0}
- target: {fileID: 7933235353228551180, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235353240438170, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.49999917
value: -0.4999994
objectReference: {fileID: 0}
- target: {fileID: 7933235353240438170, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235353272702555, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.00000023841858
value: 0.00000017881393
objectReference: {fileID: 0}
- target: {fileID: 7933235353272702555, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235353655703554, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.00000023841858
value: -0.00000017881393
objectReference: {fileID: 0}
- target: {fileID: 7933235353655703554, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235353711811619, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.00000023841858
value: -0.00000017881393
objectReference: {fileID: 0}
- target: {fileID: 7933235353711811619, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235353713167636, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.39999372
value: 0.39999378
objectReference: {fileID: 0}
- target: {fileID: 7933235353713167636, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235354616748522, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.69999564
value: 0.6999959
objectReference: {fileID: 0}
- target: {fileID: 7933235354616748522, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235354882597209, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.00000023841858
value: 0.00000017881393
objectReference: {fileID: 0}
- target: {fileID: 7933235354882597209, guid: 765582efd9dda46ed98564603316353f,
type: 3}

- target: {fileID: 7933235355057813929, guid: 765582efd9dda46ed98564603316353f,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.69999665
value: 0.6999967
objectReference: {fileID: 0}
- target: {fileID: 7933235355057813929, guid: 765582efd9dda46ed98564603316353f,
type: 3}

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}
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,
type: 3}
m_PrefabInstance: {fileID: 4061126297018023352}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:

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


objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_RootOrder
value: 2
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 7
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 8
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 9
value: 8
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

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

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 11
value: 10
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 10
value: 9
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 14
value: 13
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 12
value: 11
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 21.006, y: -75.33, z: -0.003}
--- !u!114 &1392866533
MonoBehaviour:

- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_RootOrder
value: 3
value: 2
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 13
value: 12
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

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}

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 6
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f51e8260728fd4c8fa87bcda9d0e2027, type: 3}
--- !u!1001 &1963831316
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.x
value: -498.349
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.45
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.z
value: -250.09256
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: 0
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!1 &2095421678
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2095421680
MonoBehaviour:

- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_RootOrder
value: 5
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, 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

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


using System;
using MLAgentsExamples;
using UnityEngine;
using Unity.MLAgents;

using Random = UnityEngine.Random;
Quaternion m_WalkDirLookRot; //Will hold the rotation to our target
// Quaternion m_WalkDirLookRot; //Will hold the rotation to our target
public float targetSpawnRadius; //The radius in which a target can be randomly spawned.
public Transform target; //Target the agent will walk towards.
public Transform ground; //Ground gameobject. The height will be used for target spawning
public bool detectTargets; //Should this agent detect targets
public bool respawnTargetWhenTouched; //Should the target respawn to a different position when touched
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,
if (float.IsNaN(moveTowardsTargetReward))
{
throw new ArgumentException(
"NaN in moveTowardsTargetReward.\n" +
$" cubeForward: {cubeForward}\n"+
$" hips.velocity: {m_JdController.bodyPartsDict[hips].rb.velocity}\n"+
$" maximumWalkingSpeed: {maximumWalkingSpeed}"
);
}
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);
if (float.IsNaN(lookAtTargetReward))
{
throw new ArgumentException(
"NaN in lookAtTargetReward.\n" +
$" cubeForward: {cubeForward}\n"+
$" head.forward: {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);
if (float.IsNaN(headHeightOverFeetReward))
{
throw new ArgumentException(
"NaN in headHeightOverFeetReward.\n" +
$" head.position: {head.position}\n"+
$" footL.position: {footL.position}\n"+
$" footR.position: {footR.position}"
);
}
+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

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:
正在加载...
取消
保存