浏览代码

Merge pull request #3749 from Unity-Technologies/develop-add-inference-examples

Add ModelOverrider to all of the Agent prefabs to enable Barracuda Inference with specified .nn model file
/develop/add-fire
GitHub 5 年前
当前提交
6ef56c83
共有 21 个文件被更改,包括 1580 次插入1162 次删除
  1. 22
      Project/Assets/ML-Agents/Examples/3DBall/Prefabs/3DBallHardNew.prefab
  2. 936
      Project/Assets/ML-Agents/Examples/Basic/Prefabs/Basic.prefab
  3. 928
      Project/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab
  4. 22
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab
  5. 13
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab
  6. 153
      Project/Assets/ML-Agents/Examples/FoodCollector/Prefabs/FoodCollectorArea.prefab
  7. 32
      Project/Assets/ML-Agents/Examples/GridWorld/Prefabs/Area.prefab
  8. 43
      Project/Assets/ML-Agents/Examples/Hallway/Prefabs/SymbolFinderArea.prefab
  9. 64
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab
  10. 85
      Project/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab
  11. 22
      Project/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab
  12. 6
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
  13. 4
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs
  14. 256
      Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab
  15. 44
      Project/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab
  16. 22
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab
  17. 64
      Project/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab
  18. 3
      Project/ProjectSettings/GraphicsSettings.asset
  19. 2
      Project/ProjectSettings/UnityConnectSettings.asset
  20. 18
      com.unity.ml-agents/Runtime/Agent.cs
  21. 3
      com.unity.ml-agents/Tests/Editor/MLAgentsEditModeTest.cs

22
Project/Assets/ML-Agents/Examples/3DBall/Prefabs/3DBallHardNew.prefab


- component: {fileID: 114284317994838100}
- component: {fileID: 114466000339026140}
- component: {fileID: 8193279139064749781}
- component: {fileID: 7923264721978289873}
m_Layer: 0
m_Name: Agent
m_TagString: Untagged

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: 3DBallHard
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114466000339026140
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: edf26e11cf4ed42eaa3ffb7b91bb4676, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
ball: {fileID: 1142513601053358}
--- !u!114 &8193279139064749781

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &7923264721978289873
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1829721031899636}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1978072206102878
GameObject:
m_ObjectHideFlags: 0

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

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

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


- component: {fileID: 114590693924030052}
- component: {fileID: 114423363226357902}
- component: {fileID: 8520694362683208207}
- component: {fileID: 1267665179144855710}
m_Layer: 0
m_Name: Crawler
m_TagString: Untagged

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: CrawlerDynamic
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114590693924030052
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 2f37c30a5e8d04117947188818902ef3, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
target: {fileID: 4490950947783742}
ground: {fileID: 4684408634944056}

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 0
TakeActionsBetweenDecisions: 0
--- !u!114 &1267665179144855710
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1515093357607024}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1520563409393552
GameObject:
m_ObjectHideFlags: 0

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


- component: {fileID: 114230237520033992}
- component: {fileID: 114375802757824636}
- component: {fileID: 8847231916954260663}
- component: {fileID: 6335439310911778343}
m_Layer: 0
m_Name: Crawler
m_TagString: Untagged

DecisionPeriod: 5
TakeActionsBetweenDecisions: 0
offsetStep: 0
--- !u!114 &6335439310911778343
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1492298671135358}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1492926997393242
GameObject:
m_ObjectHideFlags: 0

153
Project/Assets/ML-Agents/Examples/FoodCollector/Prefabs/FoodCollectorArea.prefab


- component: {fileID: 114176228333253036}
- component: {fileID: 114725457980523372}
- component: {fileID: 8297075921230369060}
- component: {fileID: 1222199865870203693}
m_Layer: 0
m_Name: Agent
m_TagString: agent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: FoodCollector
m_TeamID: 0
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114176228333253036
MonoBehaviour:

m_Script: {fileID: 11500000, guid: c66e6845309d241c78a6d77ee2567928, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
area: {fileID: 1819751139121548}
turnSpeed: 300

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 70
sphereCastRadius: 0.5
rayLength: 50
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 70
m_SphereCastRadius: 0.5
m_RayLength: 50
m_RayLayerMask:
observationStacks: 1
m_ObservationStacks: 1
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &8297075921230369060
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &1222199865870203693
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1464820575638702}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1482701732800114
GameObject:
m_ObjectHideFlags: 0

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: FoodCollector
m_TeamID: 0
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114711827726849508
MonoBehaviour:

m_Script: {fileID: 11500000, guid: c66e6845309d241c78a6d77ee2567928, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
area: {fileID: 1819751139121548}
turnSpeed: 300

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 70
sphereCastRadius: 0.5
rayLength: 50
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 70
m_SphereCastRadius: 0.5
m_RayLength: 50
m_RayLayerMask:
observationStacks: 1
m_ObservationStacks: 1
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &259154752087955944
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
offsetStep: 0
--- !u!1 &1528397385587768
GameObject:

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: FoodCollector
m_TeamID: 0
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114542632553128056
MonoBehaviour:

m_Script: {fileID: 11500000, guid: c66e6845309d241c78a6d77ee2567928, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
area: {fileID: 1819751139121548}
turnSpeed: 300

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 70
sphereCastRadius: 0.5
rayLength: 50
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 70
m_SphereCastRadius: 0.5
m_RayLength: 50
m_RayLayerMask:
observationStacks: 1
m_ObservationStacks: 1
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &5519119940433428255
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
offsetStep: 0
--- !u!1 &1617924810425504
GameObject:

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: FoodCollector
m_TeamID: 0
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114189751434580810
MonoBehaviour:

m_Script: {fileID: 11500000, guid: c66e6845309d241c78a6d77ee2567928, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
area: {fileID: 1819751139121548}
turnSpeed: 300

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 70
sphereCastRadius: 0.5
rayLength: 50
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 70
m_SphereCastRadius: 0.5
m_RayLength: 50
m_RayLayerMask:
observationStacks: 1
m_ObservationStacks: 1
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &5884750436653390196
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
offsetStep: 0
--- !u!1 &1688105343773098
GameObject:

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: FoodCollector
m_TeamID: 0
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114235147148547996
MonoBehaviour:

m_Script: {fileID: 11500000, guid: c66e6845309d241c78a6d77ee2567928, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
area: {fileID: 1819751139121548}
turnSpeed: 300

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 70
sphereCastRadius: 0.5
rayLength: 50
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 70
m_SphereCastRadius: 0.5
m_RayLength: 50
m_RayLayerMask:
observationStacks: 1
m_ObservationStacks: 1
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &4768752321433982785
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
offsetStep: 0
--- !u!1 &1729825611722018
GameObject:

32
Project/Assets/ML-Agents/Examples/GridWorld/Prefabs/Area.prefab


- component: {fileID: 114935253044749092}
- component: {fileID: 114650561397225712}
- component: {fileID: 114889700908650620}
- component: {fileID: 7980686505185502968}
m_Layer: 8
m_Name: Agent
m_TagString: agent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: GridWorld
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114650561397225712
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 857707f3f352541d5b858efca4479b95, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 100
area: {fileID: 114704252266302846}
timeBetweenDecisionsAtInference: 0.15

m_Script: {fileID: 11500000, guid: 282f342c2ab144bf38be65d4d0c4e07d, type: 3}
m_Name:
m_EditorClassIdentifier:
camera: {fileID: 20743940359151984}
sensorName: CameraSensor
width: 84
height: 64
grayscale: 0
compression: 1
m_Camera: {fileID: 20743940359151984}
m_SensorName: CameraSensor
m_Width: 84
m_Height: 64
m_Grayscale: 0
m_Compression: 1
--- !u!114 &7980686505185502968
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1488387672112076}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1625008366184734
GameObject:
m_ObjectHideFlags: 0

43
Project/Assets/ML-Agents/Examples/Hallway/Prefabs/SymbolFinderArea.prefab


- component: {fileID: 114286701363010626}
- component: {fileID: 114388598785529460}
- component: {fileID: 1360037369662378601}
- component: {fileID: 3959905707628515947}
m_Layer: 0
m_Name: Agent
m_TagString: agent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Hallway
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114286701363010626
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: b446afae240924105b36d07e8d17a608, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 3000
ground: {fileID: 1510027348950282}
area: {fileID: 1745841960385024}

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
raysPerDirection: 2
maxRayDegrees: 70
sphereCastRadius: 0.5
rayLength: 12
rayLayerMask:
m_RaysPerDirection: 2
m_MaxRayDegrees: 70
m_SphereCastRadius: 0.5
m_RayLength: 12
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &1360037369662378601
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 6
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &3959905707628515947
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1471560210313468}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1510027348950282
GameObject:
m_ObjectHideFlags: 0

64
Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab


- component: {fileID: 114807072692257076}
- component: {fileID: 114451319691753174}
- component: {fileID: 8964598783836598940}
- component: {fileID: 4081319787948195948}
m_Layer: 0
m_Name: Agent
m_TagString: agent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: PushBlock
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114505490781873732
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: dea8c4f2604b947e6b7b97750dde87ca, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
ground: {fileID: 1500989011945850}
area: {fileID: 1125452240183160}

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 90
sphereCastRadius: 0.5
rayLength: 12
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 90
m_SphereCastRadius: 0.5
m_RayLength: 12
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &114451319691753174
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: OffsetRayPerceptionSensor
detectableTags:
m_SensorName: OffsetRayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 90
sphereCastRadius: 0.5
rayLength: 12
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 90
m_SphereCastRadius: 0.5
m_RayLength: 12
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 1.5
endVerticalOffset: 1.5
m_StartVerticalOffset: 1.5
m_EndVerticalOffset: 1.5
--- !u!114 &8964598783836598940
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &4081319787948195948
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1489716781518988}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1500989011945850
GameObject:
m_ObjectHideFlags: 0

85
Project/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab


- component: {fileID: 5712624269609438939}
- component: {fileID: 5767481171805996936}
- component: {fileID: 4725417187860315718}
- component: {fileID: 6474351450651730614}
m_Layer: 0
m_Name: Agent
m_TagString: agent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Pyramids
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114937736047215868
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: b8db44472779248d3be46895c4d562d5, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
area: {fileID: 1464170487903594}
areaSwitch: {fileID: 1432086782037750}

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
offsetStep: 0
--- !u!114 &5712624269609438939
MonoBehaviour:

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
- block
- wall
- goal

raysPerDirection: 3
maxRayDegrees: 70
sphereCastRadius: 0.5
rayLength: 35
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 70
m_SphereCastRadius: 0.5
m_RayLength: 35
m_RayLayerMask:
observationStacks: 1
m_ObservationStacks: 1
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &5767481171805996936
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor1
detectableTags:
m_SensorName: RayPerceptionSensor1
m_DetectableTags:
- block
- wall
- goal

raysPerDirection: 3
maxRayDegrees: 65
sphereCastRadius: 0.5
rayLength: 35
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 65
m_SphereCastRadius: 0.5
m_RayLength: 35
m_RayLayerMask:
observationStacks: 1
m_ObservationStacks: 1
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 5
m_StartVerticalOffset: 0
m_EndVerticalOffset: 5
--- !u!114 &4725417187860315718
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor2
detectableTags:
m_SensorName: RayPerceptionSensor2
m_DetectableTags:
- block
- wall
- goal

raysPerDirection: 3
maxRayDegrees: 75
sphereCastRadius: 0.5
rayLength: 35
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 75
m_SphereCastRadius: 0.5
m_RayLength: 35
m_RayLayerMask:
observationStacks: 1
m_ObservationStacks: 1
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 10
m_StartVerticalOffset: 0
m_EndVerticalOffset: 10
--- !u!114 &6474351450651730614
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1131043459059966}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1148882946833254
GameObject:
m_ObjectHideFlags: 0

22
Project/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab


- component: {fileID: 114731167133171590}
- component: {fileID: 114955921823023820}
- component: {fileID: 6226801880261327134}
- component: {fileID: 7840105453417110232}
m_Layer: 0
m_Name: Agent
m_TagString: Untagged

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Reacher
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114955921823023820
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 220b156e3b142406c8b76d4db981d044, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 4000
pendulumA: {fileID: 1644872085946016}
pendulumB: {fileID: 1053261483945176}

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 4
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &7840105453417110232
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1395682910799436}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1644872085946016
GameObject:
m_ObjectHideFlags: 0

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


{
if (m_MaxEpisodes > 0)
{
if (m_NumSteps > m_MaxEpisodes * m_Agent.maxStep)
// For Agents without maxSteps, exit as soon as we've hit the target number of episodes.
// For Agents that specify maxStep, also make sure we've gone at least that many steps.
// Since we exit as soon as *any* Agent hits its target, the maxSteps condition keeps us running
// a bit longer in case there's an early failure.
if (m_Agent.CompletedEpisodes >= m_MaxEpisodes && m_NumSteps > m_MaxEpisodes * m_Agent.maxStep)
{
Application.Quit(0);
}

4
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs


Physics.defaultSolverIterations = solverIterations;
Physics.defaultSolverVelocityIterations = solverVelocityIterations;
// Make sure the Academy singleton is initialized first, since it will create the SideChannels.
var academy = Academy.Instance;
SideChannelUtils.GetSideChannel<FloatPropertiesChannel>().RegisterCallback("gravity", f => { Physics.gravity = new Vector3(0, -f, 0); });
}

Physics.defaultSolverVelocityIterations = m_OriginalSolverVelocityIterations;
}
}
}
}

256
Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab


- component: {fileID: 114492261207303438}
- component: {fileID: 114320493772006642}
- component: {fileID: 9152743230243588598}
- component: {fileID: 5530675298926254831}
m_Layer: 0
m_Name: PurpleStriker
m_TagString: purpleAgent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Soccer
m_TeamID: 1
m_useChildSensors: 1
TeamId: 1
m_UseChildSensors: 1
--- !u!114 &114492261207303438
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 2a2688ef4a36349f9aa010020c32d198, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 3000
team: 0
area: {fileID: 114559182131992928}

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: PurpleRayPerceptionSensor
detectableTags:
m_SensorName: PurpleRayPerceptionSensor
m_DetectableTags:
- ball
- purpleGoal
- blueGoal

raysPerDirection: 5
maxRayDegrees: 60
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 5
m_MaxRayDegrees: 60
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0.5
endVerticalOffset: 0.5
m_StartVerticalOffset: 0.5
m_EndVerticalOffset: 0.5
--- !u!114 &9152743230243588598
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &5530675298926254831
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1095606497496374}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1100217258374548
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 114850431417842684}
- component: {fileID: 114516244030127556}
- component: {fileID: 404683423509059512}
- component: {fileID: 2668741801881409108}
m_Layer: 0
m_Name: BlueStriker
m_TagString: blueAgent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Soccer
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114850431417842684
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 2a2688ef4a36349f9aa010020c32d198, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 3000
team: 1
area: {fileID: 114559182131992928}

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: BlueRayPerceptionSensor
detectableTags:
m_SensorName: BlueRayPerceptionSensor
m_DetectableTags:
- ball
- blueGoal
- purpleGoal

raysPerDirection: 5
maxRayDegrees: 60
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 5
m_MaxRayDegrees: 60
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0.5
endVerticalOffset: 0.5
m_StartVerticalOffset: 0.5
m_EndVerticalOffset: 0.5
--- !u!114 &404683423509059512
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &2668741801881409108
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1131626411948014}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1141134673700168
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: PurpleRayPerceptionSensorReverse
detectableTags:
m_SensorName: PurpleRayPerceptionSensorReverse
m_DetectableTags:
- ball
- purpleGoal
- blueGoal

raysPerDirection: 1
maxRayDegrees: 45
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 1
m_MaxRayDegrees: 45
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0.5
endVerticalOffset: 0.5
m_StartVerticalOffset: 0.5
m_EndVerticalOffset: 0.5
--- !u!1 &742736642297762088
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: BlueRayPerceptionSensorReverse
detectableTags:
m_SensorName: BlueRayPerceptionSensorReverse
m_DetectableTags:
- ball
- blueGoal
- purpleGoal

raysPerDirection: 1
maxRayDegrees: 45
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 1
m_MaxRayDegrees: 45
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0.5
endVerticalOffset: 0.5
m_StartVerticalOffset: 0.5
m_EndVerticalOffset: 0.5
--- !u!1 &2016057044266316337
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: BlueRayPerceptionSensorReverse
detectableTags:
m_SensorName: BlueRayPerceptionSensorReverse
m_DetectableTags:
- ball
- blueGoal
- purpleGoal

raysPerDirection: 1
maxRayDegrees: 45
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 1
m_MaxRayDegrees: 45
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0.5
endVerticalOffset: 0.5
m_StartVerticalOffset: 0.5
m_EndVerticalOffset: 0.5
--- !u!1 &4599713170205044794
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 5320024511406682322}
- component: {fileID: 1023485123796557062}
- component: {fileID: 8734522883866558980}
- component: {fileID: 2436210718391481760}
m_Layer: 0
m_Name: PurpleStriker (1)
m_TagString: purpleAgent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Soccer
m_TeamID: 1
m_useChildSensors: 1
TeamId: 1
m_UseChildSensors: 1
--- !u!114 &5320024511406682322
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 2a2688ef4a36349f9aa010020c32d198, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 3000
team: 0
area: {fileID: 114559182131992928}

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: PurpleRayPerceptionSensor
detectableTags:
m_SensorName: PurpleRayPerceptionSensor
m_DetectableTags:
- ball
- purpleGoal
- blueGoal

raysPerDirection: 5
maxRayDegrees: 60
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 5
m_MaxRayDegrees: 60
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0.5
endVerticalOffset: 0.5
m_StartVerticalOffset: 0.5
m_EndVerticalOffset: 0.5
--- !u!114 &8734522883866558980
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &2436210718391481760
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6257467487437560250}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &6442519122303792292
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 5379409612883756837}
- component: {fileID: 2562571719799803906}
- component: {fileID: 1018414316889932458}
- component: {fileID: 5288255359135781773}
m_Layer: 0
m_Name: BlueStriker (1)
m_TagString: blueAgent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Soccer
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &5379409612883756837
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 2a2688ef4a36349f9aa010020c32d198, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 3000
team: 1
area: {fileID: 114559182131992928}

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: BlueRayPerceptionSensor
detectableTags:
m_SensorName: BlueRayPerceptionSensor
m_DetectableTags:
- ball
- blueGoal
- purpleGoal

raysPerDirection: 5
maxRayDegrees: 60
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 5
m_MaxRayDegrees: 60
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0.5
endVerticalOffset: 0.5
m_StartVerticalOffset: 0.5
m_EndVerticalOffset: 0.5
--- !u!114 &1018414316889932458
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &5288255359135781773
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8360301818957399454}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &8673569163220857793
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: PurpleRayPerceptionSensorReverse
detectableTags:
m_SensorName: PurpleRayPerceptionSensorReverse
m_DetectableTags:
- ball
- purpleGoal
- blueGoal

raysPerDirection: 1
maxRayDegrees: 45
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 1
m_MaxRayDegrees: 45
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 3
m_ObservationStacks: 3
useWorldPositions: 1
startVerticalOffset: 0.5
endVerticalOffset: 0.5
m_StartVerticalOffset: 0.5
m_EndVerticalOffset: 0.5

44
Project/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab


- component: {fileID: 114176423636690854}
- component: {fileID: 114915946461826994}
- component: {fileID: 2449890524009497851}
- component: {fileID: 6467897465973556822}
m_Layer: 0
m_Name: AgentA
m_TagString: agent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Tennis
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114915946461826994
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: e51a3fb0b3186433ea84fc1e0549cc91, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 0
ball: {fileID: 1273406647218856}
invertX: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &6467897465973556822
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1170495812642400}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1194790474478638
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 114399072728845634}
- component: {fileID: 114800310164848628}
- component: {fileID: 6598495797138489682}
- component: {fileID: 1420140102966759323}
m_Layer: 0
m_Name: AgentB
m_TagString: agent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Tennis
m_TeamID: 1
m_useChildSensors: 1
TeamId: 1
m_UseChildSensors: 1
--- !u!114 &114800310164848628
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: e51a3fb0b3186433ea84fc1e0549cc91, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 0
ball: {fileID: 1273406647218856}
invertX: 1

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &1420140102966759323
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1882383181950958}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1969551055586186
GameObject:
m_ObjectHideFlags: 0

22
Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab


- component: {fileID: 114363722412740164}
- component: {fileID: 114614375190687060}
- component: {fileID: 7095046440131842424}
- component: {fileID: 526281586680617836}
m_Layer: 0
m_Name: WalkerAgent
m_TagString: Untagged

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Walker
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114363722412740164
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: ccb0f85f0009540d7ad997952e2aed7b, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
target: {fileID: 4085853164035250}
hips: {fileID: 4333477265252406}

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 0
TakeActionsBetweenDecisions: 0
--- !u!114 &526281586680617836
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1800913799254612}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1907539933197724
GameObject:
m_ObjectHideFlags: 0

64
Project/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab


- component: {fileID: 114458838850320084}
- component: {fileID: 114227939525648256}
- component: {fileID: 4778045978646539396}
- component: {fileID: 7445449404652947848}
m_Layer: 0
m_Name: Agent
m_TagString: agent

m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: SmallWallJump
m_TeamID: 0
m_useChildSensors: 1
TeamId: 0
m_UseChildSensors: 1
--- !u!114 &114925928594762506
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 676fca959b8ee45539773905ca71afa1, type: 3}
m_Name:
m_EditorClassIdentifier:
agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 2000
noWallBrain: {fileID: 11400000, guid: fb2ce36eb40b6480e94ea0b5d7573e47, type: 3}
smallWallBrain: {fileID: 11400000, guid: fb2ce36eb40b6480e94ea0b5d7573e47, type: 3}

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: RayPerceptionSensor
detectableTags:
m_SensorName: RayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 90
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 90
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 6
m_ObservationStacks: 6
useWorldPositions: 1
startVerticalOffset: 0
endVerticalOffset: 0
m_StartVerticalOffset: 0
m_EndVerticalOffset: 0
--- !u!114 &114227939525648256
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 6bb6b867a41448888c1cd4f99643ad71, type: 3}
m_Name:
m_EditorClassIdentifier:
sensorName: OffsetRayPerceptionSensor
detectableTags:
m_SensorName: OffsetRayPerceptionSensor
m_DetectableTags:
raysPerDirection: 3
maxRayDegrees: 90
sphereCastRadius: 0.5
rayLength: 20
rayLayerMask:
m_RaysPerDirection: 3
m_MaxRayDegrees: 90
m_SphereCastRadius: 0.5
m_RayLength: 20
m_RayLayerMask:
observationStacks: 6
m_ObservationStacks: 6
useWorldPositions: 1
startVerticalOffset: 2.5
endVerticalOffset: 5
m_StartVerticalOffset: 2.5
m_EndVerticalOffset: 5
--- !u!114 &4778045978646539396
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
DecisionPeriod: 5
RepeatAction: 1
TakeActionsBetweenDecisions: 1
--- !u!114 &7445449404652947848
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1195095783991828}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1264699583886832
GameObject:
m_ObjectHideFlags: 0

3
Project/ProjectSettings/GraphicsSettings.asset


- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}

2
Project/ProjectSettings/UnityConnectSettings.asset


UnityConnectSettings:
m_ObjectHideFlags: 0
serializedVersion: 1
m_Enabled: 0
m_Enabled: 1
m_TestMode: 0
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events

18
com.unity.ml-agents/Runtime/Agent.cs


/// their own experience.
int m_StepCount;
/// Number of times the Agent has completed an episode.
int m_CompletedEpisodes;
/// Episode identifier each agent receives. It is used
/// to separate between different agents in the environment.
/// This Id will be changed every time the Agent resets.

if (doneReason != DoneReason.Disabled)
{
// We don't want to udpate the reward stats when the Agent is disabled, because this will make
// We don't want to update the reward stats when the Agent is disabled, because this will make
m_CompletedEpisodes++;
UpdateRewardStats();
}

public int StepCount
{
get { return m_StepCount; }
}
/// <summary>
/// Returns the number of episodes that the Agent has completed (either <see cref="Agent.EndEpisode()"/>
/// was called, or maxSteps was reached).
/// </summary>
/// <returns>
/// Current episode count.
/// </returns>
public int CompletedEpisodes
{
get { return m_CompletedEpisodes; }
}
/// <summary>

3
com.unity.ml-agents/Tests/Editor/MLAgentsEditModeTest.cs


var expectedAgentActionForEpisode = 0;
var expectedCollectObsCalls = 0;
var expectedCollectObsCallsForEpisode = 0;
var expectedCompletedEpisodes = 0;
var expectedSensorResetCalls = 0;
for (var i = 0; i < 15; i++)

expectedAgentActionForEpisode = 0;
expectedCollectObsCallsForEpisode = 0;
expectedAgentStepCount = 0;
expectedCompletedEpisodes++;
expectedSensorResetCalls++;
expectedCollectObsCalls += 1;
}

Assert.AreEqual(expectedAgentActionForEpisode, agent1.agentActionCallsForEpisode);
Assert.AreEqual(expectedCollectObsCalls, agent1.collectObservationsCalls);
Assert.AreEqual(expectedCollectObsCallsForEpisode, agent1.collectObservationsCallsForEpisode);
Assert.AreEqual(expectedCompletedEpisodes, agent1.CompletedEpisodes);
Assert.AreEqual(expectedSensorResetCalls, agent1.sensor1.numResetCalls);
}
}

正在加载...
取消
保存