浏览代码

Merge branch 'master' into develop-sac-apex

/develop/sac-apex
Ervin Teng 5 年前
当前提交
5e980ec1
共有 131 个文件被更改,包括 6269 次插入5295 次删除
  1. 2
      .yamato/gym-interface-test.yml
  2. 4
      .yamato/protobuf-generation-test.yml
  3. 5
      .yamato/python-ll-api-test.yml
  4. 8
      .yamato/standalone-build-test.yml
  5. 11
      .yamato/training-int-tests.yml
  6. 22
      Project/Assets/ML-Agents/Examples/3DBall/Prefabs/3DBallHardNew.prefab
  7. 936
      Project/Assets/ML-Agents/Examples/Basic/Prefabs/Basic.prefab
  8. 928
      Project/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab
  9. 22
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab
  10. 13
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab
  11. 153
      Project/Assets/ML-Agents/Examples/FoodCollector/Prefabs/FoodCollectorArea.prefab
  12. 32
      Project/Assets/ML-Agents/Examples/GridWorld/Prefabs/Area.prefab
  13. 43
      Project/Assets/ML-Agents/Examples/Hallway/Prefabs/SymbolFinderArea.prefab
  14. 64
      Project/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab
  15. 85
      Project/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab
  16. 22
      Project/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab
  17. 6
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
  18. 4
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs
  19. 3
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/SensorBase.cs
  20. 256
      Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab
  21. 44
      Project/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab
  22. 7
      Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs
  23. 22
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab
  24. 64
      Project/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab
  25. 3
      Project/ProjectSettings/GraphicsSettings.asset
  26. 2
      Project/ProjectSettings/UnityConnectSettings.asset
  27. 2
      README.md
  28. 7
      com.unity.ml-agents/CHANGELOG.md
  29. 24
      com.unity.ml-agents/Runtime/Academy.cs
  30. 35
      com.unity.ml-agents/Runtime/Agent.cs
  31. 5
      com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
  32. 34
      com.unity.ml-agents/Runtime/DecisionRequester.cs
  33. 3
      com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs
  34. 6
      com.unity.ml-agents/Runtime/Sensors/ISensor.cs
  35. 3
      com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs
  36. 3
      com.unity.ml-agents/Runtime/Sensors/RenderTextureSensor.cs
  37. 13
      com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs
  38. 6
      com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs
  39. 44
      com.unity.ml-agents/Runtime/SideChannels/IncomingMessage.cs
  40. 69
      com.unity.ml-agents/Runtime/Timer.cs
  41. 59
      com.unity.ml-agents/Tests/Editor/MLAgentsEditModeTest.cs
  42. 1
      com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs
  43. 102
      com.unity.ml-agents/Tests/Editor/PublicAPI/PublicApiValidation.cs
  44. 1
      com.unity.ml-agents/Tests/Editor/Sensor/FloatVisualSensorTests.cs
  45. 1
      com.unity.ml-agents/Tests/Editor/Sensor/SensorShapeValidatorTests.cs
  46. 18
      com.unity.ml-agents/Tests/Editor/Sensor/StackingSensorTests.cs
  47. 26
      com.unity.ml-agents/Tests/Editor/SideChannelTests.cs
  48. 2
      com.unity.ml-agents/Tests/Editor/TimerTest.cs
  49. 16
      com.unity.ml-agents/package.json
  50. 3
      docs/Getting-Started.md
  51. 10
      docs/ML-Agents-Overview.md
  52. 4
      docs/Migrating.md
  53. 141
      docs/Python-API.md
  54. 10
      docs/Training-ML-Agents.md
  55. 11
      docs/Training-PPO.md
  56. 11
      docs/Training-SAC.md
  57. 999
      docs/images/3dball_big.png
  58. 852
      docs/images/3dball_small.png
  59. 974
      docs/images/curriculum.png
  60. 150
      docs/images/demo_component.png
  61. 980
      docs/images/gridworld.png
  62. 999
      docs/images/ml-agents-LSTM.png
  63. 181
      docs/images/monitor.png
  64. 219
      docs/images/platform_prefab.png
  65. 349
      docs/images/visual-observation-rawimage.png
  66. 95
      docs/images/visual-observation-rendertexture.png
  67. 107
      docs/images/visual-observation.png
  68. 15
      gym-unity/README.md
  69. 342
      gym-unity/gym_unity/envs/__init__.py
  70. 198
      gym-unity/gym_unity/tests/test_gym.py
  71. 249
      ml-agents-envs/mlagents_envs/base_env.py
  72. 104
      ml-agents-envs/mlagents_envs/environment.py
  73. 99
      ml-agents-envs/mlagents_envs/rpc_utils.py
  74. 38
      ml-agents-envs/mlagents_envs/side_channel/incoming_message.py
  75. 43
      ml-agents-envs/mlagents_envs/tests/test_envs.py
  76. 170
      ml-agents-envs/mlagents_envs/tests/test_rpc_utils.py
  77. 20
      ml-agents-envs/mlagents_envs/tests/test_side_channel.py
  78. 7
      ml-agents-envs/mlagents_envs/tests/test_timers.py
  79. 39
      ml-agents-envs/mlagents_envs/timers.py
  80. 180
      ml-agents/mlagents/trainers/agent_processor.py
  81. 16
      ml-agents/mlagents/trainers/brain_conversion_utils.py
  82. 73
      ml-agents/mlagents/trainers/demo_loader.py
  83. 37
      ml-agents/mlagents/trainers/env_manager.py
  84. 55
      ml-agents/mlagents/trainers/ghost/trainer.py
  85. 32
      ml-agents/mlagents/trainers/learn.py
  86. 10
      ml-agents/mlagents/trainers/policy/nn_policy.py
  87. 4
      ml-agents/mlagents/trainers/policy/policy.py
  88. 81
      ml-agents/mlagents/trainers/policy/tf_policy.py
  89. 4
      ml-agents/mlagents/trainers/ppo/trainer.py
  90. 4
      ml-agents/mlagents/trainers/sac/trainer.py
  91. 26
      ml-agents/mlagents/trainers/simple_env_manager.py
  92. 24
      ml-agents/mlagents/trainers/subprocess_env_manager.py
  93. 42
      ml-agents/mlagents/trainers/tests/mock_brain.py
  94. 137
      ml-agents/mlagents/trainers/tests/simple_test_envs.py
  95. 54
      ml-agents/mlagents/trainers/tests/test_agent_processor.py
  96. 32
      ml-agents/mlagents/trainers/tests/test_demo_loader.py
  97. 12
      ml-agents/mlagents/trainers/tests/test_ghost.py
  98. 2
      ml-agents/mlagents/trainers/tests/test_learn.py
  99. 55
      ml-agents/mlagents/trainers/tests/test_nn_policy.py
  100. 24
      ml-agents/mlagents/trainers/tests/test_policy.py

2
.yamato/gym-interface-test.yml


commands:
- pip install pyyaml
- python -u -m ml-agents.tests.yamato.setup_venv
- ./venv/bin/python ml-agents/tests/yamato/scripts/run_gym.py
- ./venv/bin/python ml-agents/tests/yamato/scripts/run_gym.py --env=artifacts/testPlayer-Basic
dependencies:
- .yamato/standalone-build-test.yml#test_mac_standalone_{{ editor.version }}
triggers:

4
.yamato/protobuf-generation-test.yml


- "protobuf-definitions/*.md"
- "protobuf-definitions/**/*.md"
artifacts:
dist:
patch:
- "artifacts/*"
- "artifacts/*.*"

5
.yamato/python-ll-api-test.yml


commands:
- pip install pyyaml
- python -u -m ml-agents.tests.yamato.setup_venv
- ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py
- ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py
- ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-Basic
- ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-WallJump
- ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-Bouncer
dependencies:
- .yamato/standalone-build-test.yml#test_mac_standalone_{{ editor.version }}
triggers:

8
.yamato/standalone-build-test.yml


commands:
- pip install pyyaml
- python -u -m ml-agents.tests.yamato.standalone_build_tests
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
triggers:
cancel_old_ci: true
changes:

- "com.unity.ml-agents/*.md"
- "com.unity.ml-agents/**/*.md"
artifacts:
logs:
paths:
- "artifacts/standalone_build.txt"
- "Project/testPlayer*/**"
- "artifacts/testPlayer*/**"
{% endfor %}

11
.yamato/training-int-tests.yml


# Backwards-compatibility tests.
# If we make a breaking change to the communication protocol, these will need
# to be disabled until the next release.
- python -u -m ml-agents.tests.yamato.training_int_tests --python=0.15.0
- python -u -m ml-agents.tests.yamato.training_int_tests --csharp=0.15.0
# - python -u -m ml-agents.tests.yamato.training_int_tests --python=0.15.0
# - python -u -m ml-agents.tests.yamato.training_int_tests --csharp=0.15.0
dependencies:
- .yamato/standalone-build-test.yml#test_mac_standalone_{{ editor.version }}
triggers:

- "com.unity.ml-agents/*.md"
- "com.unity.ml-agents/**/*.md"
artifacts:
unit:
logs:
paths:
- "artifacts/standalone_build.txt"
standalonebuild:
- "artifacts/**"
- "artifacts/testplayer*/**"
{% endfor %}

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

3
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/SensorBase.cs


public void Update() {}
/// <inheritdoc/>
public void Reset() { }
/// <inheritdoc/>
public virtual byte[] GetCompressedObservation()
{
return null;

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

7
Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs