浏览代码

remove zombie envs

/develop/soccer-groupman/mod
Andrew Cohen 3 年前
当前提交
24765adc
共有 20 个文件被更改,包括 0 次插入7577 次删除
  1. 7
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/ZombiePushBlockCollabArea.prefab.meta
  2. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/ZombiePushBlockCollabArea.prefab
  3. 720
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockAgentGridZombie.prefab
  4. 7
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockAgentGridZombie.prefab.meta
  5. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/ZombiePushBlockWithLocksPlatform.prefab
  6. 7
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/ZombiePushBlockWithLocksPlatform.prefab.meta
  7. 934
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/ZombiePushBlock.unity
  8. 9
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/ZombiePushBlock.unity.meta
  9. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/1ZombieVs2AgentsPushBlock.unity
  10. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/2ZombieVs3AgentsPushBlock.unity
  11. 9
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/2ZombieVs3AgentsPushBlock.unity.meta
  12. 9
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/1ZombieVs2AgentsPushBlock.unity.meta
  13. 289
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockEnvController.cs
  14. 11
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockEnvController.cs.meta
  15. 11
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs.meta
  16. 391
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs
  17. 142
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentZombie.cs
  18. 12
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentZombie.cs.meta
  19. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlockZombie.onnx
  20. 14
      Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlockZombie.onnx.meta

7
Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/ZombiePushBlockCollabArea.prefab.meta


fileFormatVersion: 2
guid: 4efb4d72c7b94469ca38276842875f65
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

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

720
Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockAgentGridZombie.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7417546825334648722
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7414659642335354518}
- component: {fileID: 7386100525938203038}
- component: {fileID: 7395867410174621084}
m_Layer: 0
m_Name: eye
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7414659642335354518
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7417546825334648722}
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0}
m_LocalPosition: {x: -0.29999995, y: 0.07399994, z: 0.50040054}
m_LocalScale: {x: 0.29457998, y: 0.29457998, z: 0.29457998}
m_Children: []
m_Father: {fileID: 7414991437116496132}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!33 &7386100525938203038
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7417546825334648722}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7395867410174621084
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7417546825334648722}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: f731be6866ce749fd8349e67ae81f76a, 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 &7418053294365353706
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7420124498110880236}
- component: {fileID: 7364989439387066192}
- component: {fileID: 7449351896770189142}
- component: {fileID: 6154188951610375881}
- component: {fileID: 7358177355006825254}
- component: {fileID: 1918487057366156538}
- component: {fileID: 6797251740063823370}
- component: {fileID: 5149870455851710189}
m_Layer: 0
m_Name: PushBlockAgentGridZombie
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7420124498110880236
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418053294365353706}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0.807148, y: 0.56, z: 5.6434627}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 7414991437116496132}
- {fileID: 7419525118241984530}
- {fileID: 297865471027947455}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!54 &7364989439387066192
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418053294365353706}
serializedVersion: 2
m_Mass: 10
m_Drag: 4
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 112
m_CollisionDetection: 0
--- !u!114 &7449351896770189142
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418053294365353706}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5d1c4e0b1822b495aa52bc52839ecb30, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
VectorObservationSize: 1
NumStackedVectorObservations: 1
m_ActionSpec:
m_NumContinuousActions: 0
BranchSizes: 07000000
VectorActionSize: 07000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
hasUpgradedBrainParametersWithActionSpec: 1
m_Model: {fileID: 0}
m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: PushBlock
TeamId: 0
m_UseChildSensors: 1
m_UseChildActuators: 1
m_ObservableAttributeHandling: 0
--- !u!114 &6154188951610375881
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418053294365353706}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d8aeb1e1df3e2469aa13d37bb4d1f000, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
MaxStep: 0
MyKey: {fileID: 297865471027947449}
IHaveAKey: 0
--- !u!65 &7358177355006825254
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418053294365353706}
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!114 &1918487057366156538
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418053294365353706}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a5c9d521e5ef4759a8246a07d52221e, type: 3}
m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
TakeActionsBetweenDecisions: 1
--- !u!114 &6797251740063823370
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418053294365353706}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
debugCommandLineOverride:
--- !u!114 &5149870455851710189
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418053294365353706}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: df0f8be9a37d6486498061e2cbc4cd94, type: 3}
m_Name:
m_EditorClassIdentifier:
RootBody: {fileID: 7364989439387066192}
VirtualRoot: {fileID: 7418053294365353706}
Settings:
UseModelSpaceTranslations: 0
UseModelSpaceRotations: 0
UseLocalSpaceTranslations: 1
UseLocalSpaceRotations: 1
UseModelSpaceLinearVelocity: 1
UseLocalSpaceLinearVelocity: 0
UseJointPositionsAndAngles: 0
UseJointForces: 0
sensorName: RBSensor
--- !u!1 &7418066077288899812
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7415023237070558502}
- component: {fileID: 7390154054626693938}
- component: {fileID: 7396049749322014964}
m_Layer: 0
m_Name: eye
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7415023237070558502
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418066077288899812}
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0}
m_LocalPosition: {x: 0.29999995, y: 0.07399994, z: 0.50040054}
m_LocalScale: {x: 0.29457998, y: 0.29457998, z: 0.29457998}
m_Children: []
m_Father: {fileID: 7414991437116496132}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!33 &7390154054626693938
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418066077288899812}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7396049749322014964
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418066077288899812}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: f731be6866ce749fd8349e67ae81f76a, 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 &7418227664612696396
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7415082107868087662}
- component: {fileID: 7390159337825285120}
- component: {fileID: 7395924344674856900}
m_Layer: 0
m_Name: Headband
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7415082107868087662
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418227664612696396}
m_LocalRotation: {x: -0, y: -0, z: 0.016506119, w: 0.9998638}
m_LocalPosition: {x: 0, y: 0.341, z: 0}
m_LocalScale: {x: 1.0441425, y: 0.19278127, z: 1.0441422}
m_Children: []
m_Father: {fileID: 7414991437116496132}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: -179.99998, z: 1.8920001}
--- !u!33 &7390159337825285120
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418227664612696396}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7395924344674856900
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418227664612696396}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 04be259c590de46f69db4cbd1da877d5, 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 &7418278982473685238
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7414991437116496132}
- component: {fileID: 7386213974097207176}
- component: {fileID: 7396774663338225040}
m_Layer: 0
m_Name: AgentCube_Blue
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7414991437116496132
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418278982473685238}
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: 7415023237070558502}
- {fileID: 7414659642335354518}
- {fileID: 7414752454130119178}
- {fileID: 7415082107868087662}
m_Father: {fileID: 7420124498110880236}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7386213974097207176
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418278982473685238}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7396774663338225040
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418278982473685238}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c9fa44c2c3f8ce74ca39a3355ea42631, 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 &7418748623576853898
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7414752454130119178}
- component: {fileID: 7386433975464151614}
- component: {fileID: 7396119572708394690}
m_Layer: 0
m_Name: mouth
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7414752454130119178
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418748623576853898}
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0}
m_LocalPosition: {x: 0, y: -0.18299997, z: 0.50040054}
m_LocalScale: {x: 0.27602, y: 0.042489994, z: 0.13891}
m_Children: []
m_Father: {fileID: 7414991437116496132}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!33 &7386433975464151614
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418748623576853898}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7396119572708394690
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7418748623576853898}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: f731be6866ce749fd8349e67ae81f76a, 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 &7419525118241984529
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7419525118241984530}
- component: {fileID: 7419525118241984531}
m_Layer: 0
m_Name: GridSensor (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7419525118241984530
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7419525118241984529}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7420124498110880236}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7419525118241984531
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7419525118241984529}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 801669c0cdece6b40b2e741ad0b119ac, type: 3}
m_Name:
m_EditorClassIdentifier:
Name: AgentGrid
CellScaleX: 1
CellScaleZ: 1
GridNumSideX: 20
GridNumSideZ: 20
CellScaleY: 0.5
RotateToAgent: 1
ChannelDepth: 08000000
DetectableObjects:
- wall
- agent
- goal
- zombie
- blockLarge
- key
- lock
ObserveMask:
serializedVersion: 2
m_Bits: 1
gridDepthType: 1
rootReference: {fileID: 7418053294365353706}
MaxColliderBufferSize: 500
InitialColliderBufferSize: 16
ObservationPerCell: 8
NumberOfObservations: 3200
ChannelOffsets: 00000000
DebugColors:
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0.51824737, b: 1, a: 1}
- {r: 0.4680206, g: 0.7058824, b: 0.35155708, a: 1}
- {r: 1, g: 0.050477777, b: 0, a: 1}
- {r: 1, g: 1, b: 1, a: 1}
- {r: 1, g: 0.85834146, b: 0.472, a: 1}
- {r: 0.8932953, g: 0, b: 1, a: 1}
GizmoYOffset: 0
ShowGizmos: 0
CompressionType: 1
--- !u!1001 &6857069899412611835
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 7420124498110880236}
m_Modifications:
- target: {fileID: 6560354526857692482, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_Name
value: Key (1)
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.242
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.636
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalRotation.y
value: -1
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.00000043213362
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 7c30e97eb671e4ae594f0146132d8fb5, type: 3}
--- !u!1 &297865471027947449 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6560354526857692482, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
m_PrefabInstance: {fileID: 6857069899412611835}
m_PrefabAsset: {fileID: 0}
--- !u!4 &297865471027947455 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6560354526857692484, guid: 7c30e97eb671e4ae594f0146132d8fb5,
type: 3}
m_PrefabInstance: {fileID: 6857069899412611835}
m_PrefabAsset: {fileID: 0}

7
Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockAgentGridZombie.prefab.meta


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

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

7
Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/ZombiePushBlockWithLocksPlatform.prefab.meta


fileFormatVersion: 2
guid: 81793e99dbdf74c9899247b69f16eb9a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

934
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/ZombiePushBlock.unity


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.8, g: 0.8, b: 0.8, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 10
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 112000002, guid: 03723c7f910c3423aa1974f1b9ce8392,
type: 2}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &255077123
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 255077126}
- component: {fileID: 255077125}
- component: {fileID: 255077124}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &255077124
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 255077123}
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 &255077125
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 255077123}
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: 5
--- !u!4 &255077126
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 255077123}
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: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &318490716
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 318490717}
m_Layer: 0
m_Name: UnityEngine-Recorder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &318490717
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 318490716}
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: 365376271}
- {fileID: 1265651286}
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &365376270
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 365376271}
m_Layer: 0
m_Name: Settings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &365376271
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365376270}
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: 1257687049}
m_Father: {fileID: 318490717}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &394216286
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 7430253518223459950, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_Name
value: WormBasePrefab
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459950, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalPosition.x
value: -9.25
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.1849128
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.6859223
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7430253518223459951, guid: ff2999c8614d848f8a7e55e3a6fb9282,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: ff2999c8614d848f8a7e55e3a6fb9282, type: 3}
--- !u!1001 &481045856
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.y
value: -24.5
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_RootOrder
value: 10
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8550397423399526796, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_Name
value: ZombiePushBlockWithLocksPlatform (3)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 81793e99dbdf74c9899247b69f16eb9a, type: 3}
--- !u!1001 &502449554
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalPosition.x
value: 106.38621
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalPosition.y
value: 38.840767
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalPosition.z
value: 34.72934
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalRotation.x
value: 0.31598538
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalRotation.y
value: -0.3596048
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalRotation.z
value: 0.13088542
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalRotation.w
value: 0.8681629
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
--- !u!1001 &955250009
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.y
value: -8.4
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_RootOrder
value: 8
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8550397423399526796, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_Name
value: ZombiePushBlockWithLocksPlatform (1)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 81793e99dbdf74c9899247b69f16eb9a, type: 3}
--- !u!1 &1009000883
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1009000884}
- component: {fileID: 1009000887}
m_Layer: 0
m_Name: SingleCam
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1009000884
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1009000883}
m_LocalRotation: {x: 0.5, y: 0, z: 0, w: 0.8660254}
m_LocalPosition: {x: 0, y: 20, z: -15}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 60, y: 0, z: 0}
--- !u!20 &1009000887
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1009000883}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.46666667, g: 0.5647059, b: 0.60784316, a: 1}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_GateFitMode: 2
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 56.2
orthographic: 0
orthographic size: 6.98
m_Depth: 2
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!1 &1257687048
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1257687049}
m_Layer: 0
m_Name: 50bfc0f4c3d6f46df98d3c66ceb89209
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1257687049
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1257687048}
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: 365376271}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1265651285
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1265651286}
m_Layer: 0
m_Name: RecordingSessions
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1265651286
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1265651285}
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: 318490717}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1574236047
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236050}
- component: {fileID: 1574236048}
m_Layer: 0
m_Name: PushBlockSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1574236048
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
gravityMultiplier: 1.5
fixedDeltaTime: 0.01333
maximumDeltaTime: 0.33333334
solverIterations: 12
solverVelocityIterations: 12
reuseCollisionCallbacks: 1
--- !u!4 &1574236049
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
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: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1574236050
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5ed63dbfa25542ecb8bc013adfba183, type: 3}
m_Name:
m_EditorClassIdentifier:
agentRunSpeed: 3
agentRotationSpeed: 15
spawnAreaMarginMultiplier: 0.5
goalScoredMaterial: {fileID: 2100000, guid: df32cc593804f42df97464dc455057b8, type: 2}
failMaterial: {fileID: 2100000, guid: a1daf31cdf41e484ca9ac33a5c6f524a, type: 2}
--- !u!1001 &1667524864
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.y
value: -16.3
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_RootOrder
value: 9
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8550397423399526796, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_Name
value: ZombiePushBlockWithLocksPlatform (2)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 81793e99dbdf74c9899247b69f16eb9a, type: 3}
--- !u!1001 &1900462655
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3ce107b4a79bc4eef83afde434932a68, type: 3}
--- !u!1001 &8550896088116134274
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8549203074153262780, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8550397423399526796, guid: 81793e99dbdf74c9899247b69f16eb9a,
type: 3}
propertyPath: m_Name
value: ZombiePushBlockWithLocksPlatform
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 81793e99dbdf74c9899247b69f16eb9a, type: 3}

9
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/ZombiePushBlock.unity.meta


fileFormatVersion: 2
guid: be1201eb6253541c38e8258fceae65cb
timeCreated: 1506808980
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/1ZombieVs2AgentsPushBlock.unity
文件差异内容过多而无法显示
查看文件

1001
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/2ZombieVs3AgentsPushBlock.unity
文件差异内容过多而无法显示
查看文件

9
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/2ZombieVs3AgentsPushBlock.unity.meta


fileFormatVersion: 2
guid: 473dc7cfdb610468983d530a0fb29bdc
timeCreated: 1506808980
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/1ZombieVs2AgentsPushBlock.unity.meta


fileFormatVersion: 2
guid: bd81f203c716d4c88af4b47f450907b2
timeCreated: 1506808980
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

289
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockEnvController.cs


using System.Collections;
using System.Collections.Generic;
using Unity.MLAgents;
using UnityEngine;
public class ZombiePushBlockEnvController : MonoBehaviour
{
[System.Serializable]
public class AgentInfo
{
public PushAgentCollab Agent;
[HideInInspector]
public Vector3 StartingPos;
[HideInInspector]
public Quaternion StartingRot;
[HideInInspector]
public Rigidbody Rb;
public Collider Col;
}
[System.Serializable]
public class ZombieInfo
{
public SimpleNPC Agent;
[HideInInspector]
public Vector3 StartingPos;
[HideInInspector]
public Quaternion StartingRot;
[HideInInspector]
public Rigidbody Rb;
public Collider Col;
}
[System.Serializable]
public class BlockInfo
{
public Transform T;
[HideInInspector]
public Vector3 StartingPos;
[HideInInspector]
public Quaternion StartingRot;
[HideInInspector]
public Rigidbody Rb;
}
/// <summary>
/// Max Academy steps before this platform resets
/// </summary>
/// <returns></returns>
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
private int m_ResetTimer;
/// <summary>
/// The area bounds.
/// </summary>
[HideInInspector]
public Bounds areaBounds;
/// <summary>
/// The ground. The bounds are used to spawn the elements.
/// </summary>
public GameObject ground;
public GameObject area;
Material m_GroundMaterial; //cached on Awake()
/// <summary>
/// We will be changing the ground material based on success/failue
/// </summary>
Renderer m_GroundRenderer;
public List<AgentInfo> AgentsList = new List<AgentInfo>();
public List<ZombieInfo> ZombiesList = new List<ZombieInfo>();
public List<BlockInfo> BlocksList = new List<BlockInfo>();
public bool UseRandomAgentRotation = true;
public bool UseRandomAgentPosition = true;
public bool UseRandomBlockRotation = true;
public bool UseRandomBlockPosition = true;
PushBlockSettings m_PushBlockSettings;
private int m_NumberOfRemainingBlocks;
void Start()
{
// Get the ground's bounds
areaBounds = ground.GetComponent<Collider>().bounds;
// Get the ground renderer so we can change the material when a goal is scored
m_GroundRenderer = ground.GetComponent<Renderer>();
// Starting material
m_GroundMaterial = m_GroundRenderer.material;
m_PushBlockSettings = FindObjectOfType<PushBlockSettings>();
foreach (var item in BlocksList)
{
item.StartingPos = item.T.transform.position;
item.StartingRot = item.T.transform.rotation;
item.Rb = item.T.GetComponent<Rigidbody>();
}
foreach (var item in AgentsList)
{
item.StartingPos = item.Agent.transform.position;
item.StartingRot = item.Agent.transform.rotation;
item.Rb = item.Agent.GetComponent<Rigidbody>();
item.Col = item.Agent.GetComponent<Collider>();
}
foreach (var item in ZombiesList)
{
item.StartingPos = item.Agent.transform.position;
item.StartingRot = item.Agent.transform.rotation;
item.Col = item.Agent.GetComponent<Collider>();
}
ResetScene();
}
// Update is called once per frame
void FixedUpdate()
{
m_ResetTimer += 1;
if (m_ResetTimer > MaxEnvironmentSteps)
{
ResetScene();
}
}
//Kill/disable an agent
public void KillAgent(Collider col)
{
}
/// <summary>
/// Use the ground's bounds to pick a random spawn position.
/// </summary>
public Vector3 GetRandomSpawnPos()
{
var foundNewSpawnLocation = false;
var randomSpawnPos = Vector3.zero;
while (foundNewSpawnLocation == false)
{
var randomPosX = Random.Range(-areaBounds.extents.x * m_PushBlockSettings.spawnAreaMarginMultiplier,
areaBounds.extents.x * m_PushBlockSettings.spawnAreaMarginMultiplier);
var randomPosZ = Random.Range(-areaBounds.extents.z * m_PushBlockSettings.spawnAreaMarginMultiplier,
areaBounds.extents.z * m_PushBlockSettings.spawnAreaMarginMultiplier);
randomSpawnPos = ground.transform.position + new Vector3(randomPosX, 1f, randomPosZ);
if (Physics.CheckBox(randomSpawnPos, new Vector3(2.5f, 0.01f, 2.5f)) == false)
{
foundNewSpawnLocation = true;
}
}
return randomSpawnPos;
}
/// <summary>
/// Resets the block position and velocities.
/// </summary>
void ResetBlock(BlockInfo block)
{
// Get a random position for the block.
block.T.position = GetRandomSpawnPos();
// Reset block velocity back to zero.
block.Rb.velocity = Vector3.zero;
// Reset block angularVelocity back to zero.
block.Rb.angularVelocity = Vector3.zero;
}
/// <summary>
/// Swap ground material, wait time seconds, then swap back to the regular material.
/// </summary>
IEnumerator GoalScoredSwapGroundMaterial(Material mat, float time)
{
m_GroundRenderer.material = mat;
yield return new WaitForSeconds(time); // Wait for 2 sec
m_GroundRenderer.material = m_GroundMaterial;
}
/// <summary>
/// Called when the agent moves the block into the goal.
/// </summary>
public void ScoredAGoal(Collider col, float score)
{
// //Decrement the counter
// m_NumberOfRemainingBlocks--;
//
// //Are we done?
// bool done = m_NumberOfRemainingBlocks == 0;
//
// //Disable the block
// col.gameObject.SetActive(false);
//Give Agent Rewards
foreach (var item in AgentsList)
{
item.Agent.AddReward(score);
}
// Swap ground material for a bit to indicate we scored.
StartCoroutine(GoalScoredSwapGroundMaterial(m_PushBlockSettings.goalScoredMaterial, 0.5f));
// if (done)
// {
//Reset assets
ResetScene();
// }
}
public void ZombieTouchedBlock()
{
//Give Agent Rewards
foreach (var item in AgentsList)
{
item.Agent.AddReward(-1);
}
// Swap ground material for a bit to indicate we scored.
StartCoroutine(GoalScoredSwapGroundMaterial(m_PushBlockSettings.failMaterial, 0.5f));
ResetScene();
}
Quaternion GetRandomRot()
{
return Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
}
void ResetScene()
{
m_ResetTimer = 0;
//Random platform rot
var rotation = Random.Range(0, 4);
var rotationAngle = rotation * 90f;
area.transform.Rotate(new Vector3(0f, rotationAngle, 0f));
//End Episode
foreach (var item in AgentsList)
{
if (!item.Agent)
{
return;
}
item.Agent.EndEpisode();
}
//Reset Agents
foreach (var item in AgentsList)
{
var pos = UseRandomAgentPosition ? GetRandomSpawnPos() : item.StartingPos;
var rot = UseRandomAgentRotation ? GetRandomRot() : item.StartingRot;
item.Agent.transform.SetPositionAndRotation(pos, rot);
item.Rb.velocity = Vector3.zero;
item.Rb.angularVelocity = Vector3.zero;
}
//Reset Blocks
foreach (var item in BlocksList)
{
var pos = UseRandomBlockPosition ? GetRandomSpawnPos() : item.StartingPos;
var rot = UseRandomBlockRotation ? GetRandomRot() : item.StartingRot;
item.T.transform.SetPositionAndRotation(pos, rot);
item.Rb.velocity = Vector3.zero;
item.Rb.angularVelocity = Vector3.zero;
item.T.gameObject.SetActive(true);
}
//End Episode
foreach (var item in ZombiesList)
{
if (!item.Agent)
{
return;
}
// item.Agent.EndEpisode();
item.Agent.transform.SetPositionAndRotation(item.StartingPos, item.StartingRot);
item.Agent.SetRandomWalkSpeed();
}
//Reset counter
m_NumberOfRemainingBlocks = BlocksList.Count;
// m_NumberOfRemainingBlocks = 2;
}
}

11
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockEnvController.cs.meta


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

11
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs.meta


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

391
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs


using System.Collections;
using System.Collections.Generic;
using Unity.MLAgents;
using UnityEngine;
public class ZombiePushBlockDeathEnvController : MonoBehaviour
{
[System.Serializable]
public class PlayerInfo
{
public PushAgentZombie Agent;
[HideInInspector]
public Vector3 StartingPos;
[HideInInspector]
public Quaternion StartingRot;
[HideInInspector]
public Rigidbody Rb;
[HideInInspector]
public Collider Col;
}
[System.Serializable]
public class ZombieInfo
{
public SimpleNPC Agent;
[HideInInspector]
public Vector3 StartingPos;
[HideInInspector]
public Quaternion StartingRot;
[HideInInspector]
public Rigidbody Rb;
[HideInInspector]
public Collider Col;
public Transform T;
public bool IsDead;
}
// [System.Serializable]
// public class BlockInfo
// {
// public Transform T;
// [HideInInspector]
// public Vector3 StartingPos;
// [HideInInspector]
// public Quaternion StartingRot;
// [HideInInspector]
// public Rigidbody Rb;
// public Transform LockedBlock;
// }
/// <summary>
/// Max Academy steps before this platform resets
/// </summary>
/// <returns></returns>
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
private int m_ResetTimer;
/// <summary>
/// The area bounds.
/// </summary>
[HideInInspector]
public Bounds areaBounds;
/// <summary>
/// The ground. The bounds are used to spawn the elements.
/// </summary>
public GameObject ground;
// public GameObject area;
Material m_GroundMaterial; //cached on Awake()
/// <summary>
/// We will be changing the ground material based on success/failue
/// </summary>
Renderer m_GroundRenderer;
public List<PlayerInfo> AgentsList = new List<PlayerInfo>();
public List<ZombieInfo> ZombiesList = new List<ZombieInfo>();
// public List<BlockInfo> BlocksList = new List<BlockInfo>();
public bool UseRandomAgentRotation = true;
public bool UseRandomAgentPosition = true;
// public bool UseRandomBlockRotation = true;
// public bool UseRandomBlockPosition = true;
PushBlockSettings m_PushBlockSettings;
private int m_NumberOfRemainingBlocks;
public GameObject Key;
public GameObject LockedBlock;
public Rigidbody UnlockedBlock;
public Dictionary<Transform, PlayerInfo> m_AgentsDict = new Dictionary<Transform, PlayerInfo>();
public Dictionary<Transform, ZombieInfo> m_ZombiesDict = new Dictionary<Transform, ZombieInfo>();
// public Dictionary<Transform, BlockInfo> m_BlocksDict = new Dictionary<Transform, BlockInfo>();
private SimpleMultiAgentGroup m_AgentGroup;
void Start()
{
// Get the ground's bounds
areaBounds = ground.GetComponent<Collider>().bounds;
// Get the ground renderer so we can change the material when a goal is scored
m_GroundRenderer = ground.GetComponent<Renderer>();
// Starting material
m_GroundMaterial = m_GroundRenderer.material;
m_PushBlockSettings = FindObjectOfType<PushBlockSettings>();
//Lock The Block
LockTheBlock();
//Hide The Key
Key.SetActive(false);
// foreach (var item in BlocksList)
// {
// item.StartingPos = item.T.transform.position;
// item.StartingRot = item.T.transform.rotation;
// item.Rb = item.T.GetComponent<Rigidbody>();
// m_BlocksDict.Add(item.T, item);
// }
// Initialize TeamManager
m_AgentGroup = new SimpleMultiAgentGroup();
foreach (var item in AgentsList)
{
item.StartingPos = item.Agent.transform.position;
item.StartingRot = item.Agent.transform.rotation;
item.Rb = item.Agent.GetComponent<Rigidbody>();
item.Col = item.Agent.GetComponent<Collider>();
m_AgentsDict.Add(item.Agent.transform, item);
// Add to team manager
m_AgentGroup.RegisterAgent(item.Agent);
}
foreach (var item in ZombiesList)
{
item.StartingPos = item.Agent.transform.position;
item.StartingRot = item.Agent.transform.rotation;
item.T = item.Agent.transform;
item.Col = item.Agent.GetComponent<Collider>();
m_ZombiesDict.Add(item.T, item);
}
ResetScene();
}
// Update is called once per frame
void FixedUpdate()
{
m_ResetTimer += 1;
if (m_ResetTimer >= MaxEnvironmentSteps && MaxEnvironmentSteps > 0)
{
m_AgentGroup.GroupEpisodeInterrupted();
ResetScene();
}
}
// // public Dictionary<Agent>
// //Kill/disable an agent
// public void KillAgent(Collision col, Transform t)
// {
// print($"zombie {t.name} ate {col.collider.name}");
// //Disable killed Agent
// foreach (var item in AgentsList)
// {
// if (item.Col == col.collider)
// {
// item.Agent.EndEpisode();
// item.Col.gameObject.SetActive(false);
// break;
// }
// }
//
// //End Episode
// foreach (var item in ZombiesList)
// {
// if (item.Agent.transform == t)
// {
// KillZombie(item);
// break;
// }
// }
// }
public void UnlockBlock(Transform blockT)
{
LockedBlock.SetActive(false);
UnlockedBlock.velocity = Vector3.zero;
UnlockedBlock.angularVelocity = Vector3.zero;
UnlockedBlock.transform.SetPositionAndRotation(blockT.position, blockT.rotation);
UnlockedBlock.gameObject.SetActive(true);
}
public void LockTheBlock()
{
LockedBlock.SetActive(true);
UnlockedBlock.velocity = Vector3.zero;
UnlockedBlock.angularVelocity = Vector3.zero;
UnlockedBlock.transform.SetPositionAndRotation(LockedBlock.transform.position, LockedBlock.transform.rotation);
UnlockedBlock.gameObject.SetActive(false);
}
public void KilledByZombie(PushAgentZombie agent, Collision zombCol)
{
zombCol.gameObject.SetActive(false);
agent.EndEpisode();
agent.gameObject.SetActive(false);
print($"zombie {zombCol.gameObject.name} ate {agent.transform.name}");
//Spawn the Key Pickup
Key.transform.SetPositionAndRotation(zombCol.collider.transform.position, zombCol.collider.transform.rotation);
Key.SetActive(true);
// Instantiate(KeyPrefab, zombCol.collider.transform.position, zombCol.collider.transform.rotation, transform);
}
/// <summary>
/// Use the ground's bounds to pick a random spawn position.
/// </summary>
public Vector3 GetRandomSpawnPos()
{
var foundNewSpawnLocation = false;
var randomSpawnPos = Vector3.zero;
while (foundNewSpawnLocation == false)
{
var randomPosX = Random.Range(-areaBounds.extents.x * m_PushBlockSettings.spawnAreaMarginMultiplier,
areaBounds.extents.x * m_PushBlockSettings.spawnAreaMarginMultiplier);
var randomPosZ = Random.Range(-areaBounds.extents.z * m_PushBlockSettings.spawnAreaMarginMultiplier,
areaBounds.extents.z * m_PushBlockSettings.spawnAreaMarginMultiplier);
randomSpawnPos = ground.transform.position + new Vector3(randomPosX, 1f, randomPosZ);
if (Physics.CheckBox(randomSpawnPos, new Vector3(2.5f, 0.01f, 2.5f)) == false)
{
foundNewSpawnLocation = true;
}
}
return randomSpawnPos;
}
/// <summary>
/// Swap ground material, wait time seconds, then swap back to the regular material.
/// </summary>
IEnumerator GoalScoredSwapGroundMaterial(Material mat, float time)
{
m_GroundRenderer.material = mat;
yield return new WaitForSeconds(time); // Wait for 2 sec
m_GroundRenderer.material = m_GroundMaterial;
}
/// <summary>
/// Called when the agent moves the block into the goal.
/// </summary>
public void ScoredAGoal(Collider col, float score)
{
print($"Scored {score} on {gameObject.name}");
//Give Agent Rewards
m_AgentGroup.AddGroupReward(score);
// m_AgentGroup.EndGroupEpisode();
// Swap ground material for a bit to indicate we scored.
StartCoroutine(GoalScoredSwapGroundMaterial(m_PushBlockSettings.goalScoredMaterial, 0.5f));
ResetScene();
}
public void ZombieTouchedBlock()
{
//Give Agents Penalties
m_AgentGroup.AddGroupReward(-1);
// m_AgentGroup.EndGroupEpisode();
// Swap ground material for a bit to indicate we scored.
StartCoroutine(GoalScoredSwapGroundMaterial(m_PushBlockSettings.failMaterial, 0.5f));
ResetScene();
}
Quaternion GetRandomRot()
{
return Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
}
void ResetScene()
{
//Reset counter
m_ResetTimer = 0;
//Random platform rot
var rotation = Random.Range(0, 4);
var rotationAngle = rotation * 90f;
transform.Rotate(new Vector3(0f, rotationAngle, 0f));
//Reset Agents
foreach (var item in AgentsList)
{
var pos = UseRandomAgentPosition ? GetRandomSpawnPos() : item.StartingPos;
var rot = UseRandomAgentRotation ? GetRandomRot() : item.StartingRot;
item.Agent.transform.SetPositionAndRotation(pos, rot);
item.Rb.velocity = Vector3.zero;
item.Rb.angularVelocity = Vector3.zero;
item.Agent.MyKey.SetActive(false);
item.Agent.IHaveAKey = false;
item.Agent.gameObject.SetActive(true);
}
//Reset Blocks
LockedBlock.transform.position = GetRandomSpawnPos();
LockedBlock.transform.rotation = GetRandomRot();
LockTheBlock();
//Reset Key
Key.SetActive(false);
//End Episode
foreach (var item in ZombiesList)
{
if (!item.Agent)
{
return;
}
// item.Agent.EndEpisode();
item.Agent.transform.SetPositionAndRotation(item.StartingPos, item.StartingRot);
item.Agent.SetRandomWalkSpeed();
item.Agent.gameObject.SetActive(true);
}
m_AgentGroup.EndGroupEpisode();
}
// void ResetScene()
// {
// m_ResetTimer = 0;
//
// //Random platform rot
// var rotation = Random.Range(0, 4);
// var rotationAngle = rotation * 90f;
// transform.Rotate(new Vector3(0f, rotationAngle, 0f));
//
// //End Episode
// foreach (var item in AgentsList)
// {
// if (!item.Agent)
// {
// return;
// }
// item.Agent.EndEpisode();
// }
// //Reset Agents
// foreach (var item in AgentsList)
// {
// var pos = UseRandomAgentPosition ? GetRandomSpawnPos() : item.StartingPos;
// var rot = UseRandomAgentRotation ? GetRandomRot() : item.StartingRot;
//
// item.Agent.transform.SetPositionAndRotation(pos, rot);
// item.Rb.velocity = Vector3.zero;
// item.Rb.angularVelocity = Vector3.zero;
// item.Agent.gameObject.SetActive(true);
// }
//
// //Reset Blocks
// foreach (var item in BlocksList)
// {
// var pos = UseRandomBlockPosition ? GetRandomSpawnPos() : item.StartingPos;
// var rot = UseRandomBlockRotation ? GetRandomRot() : item.StartingRot;
//
// item.T.transform.SetPositionAndRotation(pos, rot);
// item.Rb.velocity = Vector3.zero;
// item.Rb.angularVelocity = Vector3.zero;
// item.T.gameObject.SetActive(true);
// // BlockIsLocked(item, true);
// }
// //End Episode
// foreach (var item in ZombiesList)
// {
// if (!item.Agent)
// {
// return;
// }
// // item.Agent.EndEpisode();
// item.Agent.transform.SetPositionAndRotation(item.StartingPos, item.StartingRot);
// item.Agent.SetRandomWalkSpeed();
// item.Agent.gameObject.SetActive(true);
// }
//
// //Reset counter
// m_NumberOfRemainingBlocks = BlocksList.Count;
// // m_NumberOfRemainingBlocks = 2;
// }
}

142
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentZombie.cs


//Put this script on your blue cube.
using System.Collections;
using UnityEngine;
using Unity.MLAgents;
using Unity.MLAgents.Sensors;
using Unity.MLAgents.Actuators;
public class PushAgentZombie : Agent
{
public GameObject MyKey;
public bool IHaveAKey;
private PushBlockSettings m_PushBlockSettings;
private Rigidbody m_AgentRb; //cached on initialization
private ZombiePushBlockDeathEnvController m_GameController;
public override void Initialize()
{
m_GameController = GetComponentInParent<ZombiePushBlockDeathEnvController>();
m_AgentRb = GetComponent<Rigidbody>();
m_PushBlockSettings = FindObjectOfType<PushBlockSettings>();
MyKey.SetActive(false);
IHaveAKey = false;
}
public override void OnEpisodeBegin()
{
MyKey.SetActive(false);
IHaveAKey = false;
}
public override void CollectObservations(VectorSensor sensor)
{
// if (useVectorObs)
// {
sensor.AddObservation(IHaveAKey);
// sensor.AddObservation(m_GameController.PlayerDict[this].HoldingSwitch);
// sensor.AddObservation(m_GameController.PlayerDict[this].Scored);
// }
}
/// <summary>
/// Moves the agent according to the selected action.
/// </summary>
public void MoveAgent(ActionSegment<int> act)
{
var dirToGo = Vector3.zero;
var rotateDir = Vector3.zero;
var action = act[0];
switch (action)
{
case 1:
dirToGo = transform.forward * 1f;
break;
case 2:
dirToGo = transform.forward * -1f;
break;
case 3:
rotateDir = transform.up * 1f;
break;
case 4:
rotateDir = transform.up * -1f;
break;
case 5:
dirToGo = transform.right * -0.75f;
break;
case 6:
dirToGo = transform.right * 0.75f;
break;
}
transform.Rotate(rotateDir, Time.fixedDeltaTime * 200f);
m_AgentRb.AddForce(dirToGo * m_PushBlockSettings.agentRunSpeed,
ForceMode.VelocityChange);
}
/// <summary>
/// Called every step of the engine. Here the agent takes an action.
/// </summary>
public override void OnActionReceived(ActionBuffers actionBuffers)
{
// Move the agent using the action.
MoveAgent(actionBuffers.DiscreteActions);
}
void OnCollisionEnter(Collision col)
{
if (col.transform.CompareTag("lock"))
{
if (IHaveAKey)
{
m_GameController.UnlockBlock(col.transform);
MyKey.SetActive(false);
IHaveAKey = false;
}
}
if (col.transform.CompareTag("zombie"))
{
m_GameController.KilledByZombie(this, col);
MyKey.SetActive(false);
IHaveAKey = false;
}
}
void OnTriggerEnter(Collider col)
{
//if we find a key and it's parent is the main platform we can pick it up
// if (col.transform.CompareTag("key"))
if (col.transform.CompareTag("key") && col.transform.parent == transform.parent && gameObject.activeInHierarchy)
{
print("picked up key");
MyKey.SetActive(true);
IHaveAKey = true;
col.gameObject.SetActive(false);
// DestroyImmediate(col.gameObject);
}
}
public override void Heuristic(in ActionBuffers actionsOut)
{
var discreteActionsOut = actionsOut.DiscreteActions;
discreteActionsOut[0] = 0;
if (Input.GetKey(KeyCode.D))
{
discreteActionsOut[0] = 3;
}
else if (Input.GetKey(KeyCode.W))
{
discreteActionsOut[0] = 1;
}
else if (Input.GetKey(KeyCode.A))
{
discreteActionsOut[0] = 4;
}
else if (Input.GetKey(KeyCode.S))
{
discreteActionsOut[0] = 2;
}
}
}

12
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentZombie.cs.meta


fileFormatVersion: 2
guid: d8aeb1e1df3e2469aa13d37bb4d1f000
timeCreated: 1506829537
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

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

14
Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlockZombie.onnx.meta


fileFormatVersion: 2
guid: 9a4ea4894b7fb49859cfa9c16652b207
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3}
optimizeModel: 1
forceArbitraryBatchSize: 1
treatErrorsAsWarnings: 0
正在加载...
取消
保存