浏览代码

Merge branch 'master' into sensitivity

/sensitivity
Andrew Cohen 4 年前
当前提交
d8c123a0
共有 437 个文件被更改,包括 10173 次插入14105 次删除
  1. 12
      .pre-commit-config.yaml
  2. 4
      .pre-commit-search-and-replace.yaml
  3. 2
      .pylintrc
  4. 2
      .yamato/com.unity.ml-agents-pack.yml
  5. 75
      .yamato/com.unity.ml-agents-test.yml
  6. 1
      .yamato/standalone-build-test.yml
  7. 4
      .yamato/training-int-tests.yml
  8. 15
      DevProject/Packages/manifest.json
  9. 4
      DevProject/ProjectSettings/ProjectVersion.txt
  10. 2
      Dockerfile
  11. 495
      Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.nn
  12. 586
      Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.nn
  13. 13
      Project/Assets/ML-Agents/Examples/Basic/TFModels/Basic.nn
  14. 149
      Project/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.nn
  15. 1001
      Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerDyn.demo
  16. 4
      Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerDyn.demo.meta
  17. 4
      Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerSta.demo.meta
  18. 953
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab
  19. 3
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab.meta
  20. 993
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab
  21. 983
      Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity
  22. 715
      Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity
  23. 175
      Project/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs
  24. 1001
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn
  25. 2
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn.meta
  26. 1001
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn
  27. 2
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn.meta
  28. 73
      Project/Assets/ML-Agents/Examples/FoodCollector/Prefabs/FoodCollectorArea.prefab
  29. 7
      Project/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs
  30. 682
      Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/FoodCollector.nn
  31. 1001
      Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld.nn
  32. 999
      Project/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.nn
  33. 1
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs
  34. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.nn
  35. 1001
      Project/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.nn
  36. 564
      Project/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.nn
  37. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Outline.mat
  38. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat
  39. 10
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs
  40. 152
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
  41. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs
  42. 116
      Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab
  43. 81
      Project/Assets/ML-Agents/Examples/Soccer/Prefabs/StrikersVsGoalieField.prefab
  44. 1
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs
  45. 1001
      Project/Assets/ML-Agents/Examples/Soccer/TFModels/Goalie.nn
  46. 1001
      Project/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.nn
  47. 1001
      Project/Assets/ML-Agents/Examples/Soccer/TFModels/Striker.nn
  48. 1001
      Project/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.nn
  49. 156
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  50. 2
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic.nn.meta
  51. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic.nn
  52. 5
      Project/Assets/ML-Agents/Examples/WallJump/Materials/TransparentWall.mat
  53. 15
      Project/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab
  54. 30
      Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs
  55. 1001
      Project/Assets/ML-Agents/Examples/WallJump/TFModels/BigWallJump.nn
  56. 1001
      Project/Assets/ML-Agents/Examples/WallJump/TFModels/SmallWallJump.nn
  57. 28
      Project/Assets/ML-Agents/Examples/Worm/Prefabs/WormBasePrefabDynamic.prefab
  58. 28
      Project/Assets/ML-Agents/Examples/Worm/Prefabs/WormBasePrefabStatic.prefab
  59. 1001
      Project/Assets/ML-Agents/Examples/Worm/TFModels/WormDynamic.nn
  60. 1001
      Project/Assets/ML-Agents/Examples/Worm/TFModels/WormStatic.nn
  61. 5
      Project/Packages/manifest.json
  62. 2
      Project/ProjectSettings/DynamicsManager.asset
  63. 20
      README.md
  64. 110
      com.unity.ml-agents/CHANGELOG.md
  65. 2
      com.unity.ml-agents/CONTRIBUTING.md
  66. 4
      com.unity.ml-agents/Documentation~/com.unity.ml-agents.md
  67. 23
      com.unity.ml-agents/Editor/BehaviorParametersEditor.cs
  68. 4
      com.unity.ml-agents/Editor/DemonstrationImporter.cs
  69. 90
      com.unity.ml-agents/Runtime/Academy.cs
  70. 53
      com.unity.ml-agents/Runtime/Agent.cs
  71. 12
      com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
  72. 2
      com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs
  73. 2
      com.unity.ml-agents/Runtime/DiscreteActionMasker.cs
  74. 4
      com.unity.ml-agents/Runtime/EnvironmentParameters.cs
  75. 53
      com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs
  76. 5
      com.unity.ml-agents/Runtime/Inference/TensorNames.cs
  77. 43
      com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
  78. 6
      com.unity.ml-agents/Runtime/Policies/BrainParameters.cs
  79. 73
      com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs
  80. 30
      com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs
  81. 5
      com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponentBase.cs
  82. 2
      com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs
  83. 61
      com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs
  84. 4
      com.unity.ml-agents/Runtime/SideChannels/SideChannel.cs
  85. 31
      com.unity.ml-agents/Runtime/SideChannels/SideChannelManager.cs
  86. 5
      com.unity.ml-agents/Runtime/StatsRecorder.cs
  87. 32
      com.unity.ml-agents/Tests/Editor/AcademyTests.cs
  88. 24
      com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorGenerator.cs
  89. 83
      com.unity.ml-agents/Tests/Editor/MLAgentsEditModeTest.cs
  90. 2
      com.unity.ml-agents/Tests/Editor/PublicAPI/Unity.ML-Agents.Editor.Tests.PublicAPI.asmdef
  91. 106
      com.unity.ml-agents/Tests/Editor/Sensor/RayPerceptionSensorTests.cs
  92. 8
      com.unity.ml-agents/Tests/Editor/Sensor/SensorShapeValidatorTests.cs
  93. 25
      com.unity.ml-agents/Tests/Editor/Sensor/VectorSensorTests.cs
  94. 16
      com.unity.ml-agents/Tests/Editor/SideChannelTests.cs
  95. 10
      com.unity.ml-agents/Tests/Runtime/RuntimeAPITest.cs
  96. 4
      com.unity.ml-agents/package.json
  97. 45
      config/imitation/CrawlerStatic.yaml
  98. 45
      config/imitation/FoodCollector.yaml
  99. 47
      config/imitation/Hallway.yaml

12
.pre-commit-config.yaml


# flake8-tidy-imports is used for banned-modules, not actually tidying
additional_dependencies: [flake8-comprehensions==3.2.2, flake8-tidy-imports==4.1.0, flake8-bugbear==20.1.4]
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.0
hooks:
- id: pyupgrade
args: [--py3-plus, --py36-plus]
exclude: .*barracuda.py
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:

language: script
entry: utils/validate_inits.py
types: [python]
- id: validate-release-links-py
name: validate release links
language: script
entry: utils/validate_release_links.py

4
.pre-commit-search-and-replace.yaml


search: /ML[ -]Agents toolkit/
replacement: ML-Agents Toolkit
insensitive: true
- description: Replace "the the"
search: /the the/
replacement: the
insensitive: true

2
.pylintrc


[MASTER]
# Add files or directories to the blacklist. They should be base names, not
# Add files or directories to the ignore list. They should be base names, not
# paths.
ignore=CVS

2
.yamato/com.unity.ml-agents-pack.yml


flavor: b1.small
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package pack --package-path com.unity.ml-agents
- upm-ci project pack --project-path Project
artifacts:
packages:
paths:

75
.yamato/com.unity.ml-agents-test.yml


test_editors:
- version: 2018.4
# 2018.4 doesn't support code-coverage
coverageOptions:
minCoveragePct: 0
enableCodeCoverage: !!bool false
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
minCoveragePct: 72
enableCodeCoverage: !!bool true
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
minCoveragePct: 72
enableCodeCoverage: !!bool true
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
minCoveragePct: 72
enableCodeCoverage: !!bool true
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
minCoveragePct: 72
enableCodeCoverage: !!bool true
test_platforms:
- name: win
type: Unity::VM

type: Unity::VM
image: package-ci/ubuntu:stable
flavor: b1.medium
packages:
- name: com.unity.ml-agents
assembly: Unity.ML-Agents
minCoveragePct: 72
- name: com.unity.ml-agents.extensions
assembly: Unity.ML-Agents.Extensions
minCoveragePct: 75
---
all_package_tests:

{% for platform in test_platforms %}
- .yamato/com.unity.ml-agents-test.yml#test_{{ platform.name }}_{{ editor.version }}
- .yamato/com.unity.ml-agents-test.yml#test_com.unity.ml-agents_{{ platform.name }}_{{ editor.version }}
- .yamato/com.unity.ml-agents-test.yml#test_{{ platform.name }}_{{ editor.version }}
- .yamato/com.unity.ml-agents-test.yml#test_com.unity.ml-agents_{{ platform.name }}_{{ editor.version }}
{% endfor %}
{% endfor %}
triggers:

frequency: daily
{% for editor in test_editors %}
{% for platform in test_platforms %}
test_{{ platform.name }}_{{ editor.version }}:
name : com.unity.ml-agents test {{ editor.version }} on {{ platform.name }}
{% for package in packages %}
{% for editor in test_editors %}
{% for platform in test_platforms %}
{% if editor.enableCodeCoverage %}
{% capture coverageOptions %} --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+{{ package.assembly }}'{% endcapture %}
{% else %}
{% assign coverageOptions = "" %}
{% endif %}
test_{{ package.name }}_{{ platform.name }}_{{ editor.version }}:
name : {{ package.name }} test {{ editor.version }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}

- upm-ci package test -u {{ editor.version }} --package-path com.unity.ml-agents {{ editor.coverageOptions }}
- python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
- upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ coverageOptions }}
{% if editor.enableCodeCoverage %}
- python3 ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ package.minCoveragePct }}
{% endif %}
artifacts:
logs:
paths:

pull_request.target match "release.+") AND
NOT pull_request.draft AND
(pull_request.changes.any match "com.unity.ml-agents/**" OR
{% if package.name == "com.unity.ml-agents.extensions" %}
pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
{% endif %}
{% endfor %}
{% for editor in trunk_editor %}
{% for platform in test_platforms %}
test_{{ platform.name }}_trunk:
name : com.unity.ml-agents test {{ editor.version }} on {{ platform.name }}
{% for package in packages %}
{% for editor in trunk_editor %}
{% for platform in test_platforms %}
{% if editor.enableCodeCoverage %}
{% capture coverageOptions %} --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+{{ package.assembly }}'{% endcapture %}
{% else %}
{% assign coverageOptions = "" %}
{% endif %}
test_{{ package.name }}_{{ platform.name }}_trunk:
name : {{ package.name }} test {{ editor.version }} on {{ platform.name }}
- python -m pip install unity-downloader-cli --extra-index-url https://artifactory.eu-cph-1.unityops.net/api/pypi/common-python/simple
- python -m pip install unity-downloader-cli --extra-index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/unity-pypi-local/simple --upgrade
- upm-ci package test -u {{ editor.version }} --package-path com.unity.ml-agents {{ editor.coverageOptions }}
- python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
- upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ coverageOptions }}
{% if editor.enableCodeCoverage %}
- python3 ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ package.minCoveragePct }}
{% endif %}
artifacts:
logs:
paths:

cancel_old_ci: true
{% endfor %}
{% endfor %}
{% endfor %}

1
.yamato/standalone-build-test.yml


pull_request.target match "release.+") AND
NOT pull_request.draft AND
(pull_request.changes.any match "com.unity.ml-agents/**" OR
pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
pull_request.changes.any match ".yamato/standalone-build-test.yml") AND
NOT pull_request.changes.all match "**/*.md"
artifacts:

4
.yamato/training-int-tests.yml


pull_request.target match "release.+") AND
NOT pull_request.draft AND
(pull_request.changes.any match "com.unity.ml-agents/**" OR
pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
pull_request.changes.any match "Project/**" OR
pull_request.changes.any match "ml-agents/**" OR
pull_request.changes.any match "ml-agents-envs/**" OR

logs:
paths:
- "artifacts/standalone_build.txt"
- "artifacts/inference.nn.txt"
- "artifacts/inference.onnx.txt"
- "artifacts/models/**"
{% endfor %}

15
DevProject/Packages/manifest.json


"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ads": "2.0.8",
"com.unity.ads": "3.4.4",
"com.unity.analytics": "3.3.5",
"com.unity.coding": "0.1.0-preview.13",
"com.unity.collab-proxy": "1.2.16",

"com.unity.multiplayer-hlapi": "1.0.4",
"com.unity.ml-agents.extensions": "file:../../com.unity.ml-agents.extensions",
"com.unity.multiplayer-hlapi": "1.0.6",
"com.unity.package-validation-suite": "0.7.15-preview",
"com.unity.package-validation-suite": "0.11.0-preview",
"com.unity.test-framework": "1.1.11",
"com.unity.test-framework": "1.1.13",
"com.unity.test-framework.performance": "2.2.0-preview",
"com.unity.xr.legacyinputhelpers": "1.3.8",
"com.unity.xr.legacyinputhelpers": "1.3.11",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",

},
"registry": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates",
"testables": [
"com.unity.ml-agents"
"com.unity.ml-agents",
"com.unity.ml-agents.extensions"
]
}

4
DevProject/ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2019.3.3f1
m_EditorVersionWithRevision: 2019.3.3f1 (7ceaae5f7503)
m_EditorVersion: 2019.3.11f1
m_EditorVersionWithRevision: 2019.3.11f1 (ceef2d848e70)

2
Dockerfile


WORKDIR /ml-agents
RUN pip install -e .
# Port 5004 is the port used in in Editor training.
# Port 5004 is the port used in Editor training.
# Environments will start from port 5005,
# so allow enough ports for several environments.
EXPOSE 5004-5050

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

586
Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.nn
文件差异内容过多而无法显示
查看文件

13
Project/Assets/ML-Agents/Examples/Basic/TFModels/Basic.nn


vector_observation���� action_masks����policy_1/concat_2/concatactionaction_output_shape������?action_output_shape memory_sizeversion_numberis_continuous_controlpolicy_1/add_2/ypolicy_1/Sum/reduction_indicespolicy_1/add/y$policy/main_graph_0/hidden_0/BiasAdd�����?vector_observation#policy/main_graph_0/hidden_0/kernel�!policy/main_graph_0/hidden_0/bias� policy/main_graph_0/hidden_0/Mul2 �����?$policy/main_graph_0/hidden_0/BiasAddpolicy_1/dense/MatMul�����? policy/main_graph_0/hidden_0/Mulpolicy/dense/kernel�<policy_1/dense/MatMul/patch:0�policy_1/strided_slice������? action_maskspolicy_1/Softmax2�����?policy_1/dense/MatMul policy_1/addd�����?policy_1/Softmaxpolicy_1/add/y policy_1/Mulf�����? policy_1/addpolicy_1/strided_slice policy_1/Sum������? policy_1/Mulpolicy_1/Sum/reduction_indicespolicy_1/truedivg�����? policy_1/Mul policy_1/Sumpolicy_1/add_2d�����?policy_1/truedivpolicy_1/add_2/ypolicy_1/Log_12r�����?policy_1/add_2policy_1/concat_2/concat2�����?policy_1/Log_1action2�����?policy_1/concat_2/concat@@@���3�?���3�k��8�>�:���{i��#���Ld�n�<�B$�=6_��ސ��8�þ�Z=��>���;�/�O�>�����q�=VU�����=�l��e,�-X7������xQ>>�K��$>46���a><9�>�(>�(O>�(>�X�<��=�p��D��m��>���(z� ���x��;W�}J�;~7���:���G���%�=�> 8�<;��ݾ=��U>;H<8B%����Å2���?���=g0ѽ ������$־ڜ^>w����.��c��؟=Tgx�C��;�o:�z���)�=������eٳ>�f�9ˡ=���<
� ��)��R��=/)�<��z>��H�$5���>�����}y��l�>��[��@�;�Ӵ=�0�=8׾T;>яV�?h���>Y�k=��=�꽕!�>5�=P O�~���L�J=��̾�м.�<�W?�;��[.��h���?k�Q���b>� u=�;��+?�<IE�>��>wz�=�� � ��s�^>��O>�_>Wo�>t����f����%V>��c<B��>�1c�Q�,�j�<=���>�̭��G�$��<�� >0m¾����j�x�q��>�Y�=��>�^1=��Ͼ<�<ξTP��}:�j�>C�>��=��$>J��>ߖ>��>ג�>�g>�>������7=�|=�J?Q�=��> �j>�P>-�l>೘�W^�]�)>��w>� �=���*X��|�>4��?�X>�]�ώ�M�N��>�>B��8�)`��/ =�G�=���>�2�>���� >�>�_�>���<}�n��f>`�!��(Q�qr1�C�6��.�>��>}���%�Ͼ�Ɖ>�ܘ�N��ӶG<f1��d�?0�K>�꾀"k��Ϭ>���>^�?��'�+�e(��s��c��>7���J����&����>��e�D�(=]����q�rJ�>.y>�(����eϪ>�(>;�,==5�/�>S%>2} >n#n=�C=�i>y���d��=��ν�|�8[)���0�=L��
$�J�:>E�>��.��!��4�y=+r�>�|���t��}����~����>*%��+>0L��fB>[g�� ����>>��=$ݽ=މ?>�z@�y v�L��>�2h>Bl#>L(��#vZ>�ر���<���=s%�>jx?���=p�<3ś=�5^���>��=�D->��)>)�˽g ����s?H���ε�xc���Ҿ �M?hRӾ�D�S��P*,?�Ծ���f#�K��mC&?�(@?Pꬾ�ാ�x�>Z�?J��>��پk���s�u��&�����>] ��鸉���"���@?-r��Ҝ�x���F}���5�>�T�>��+�����(.?���>U���4n�=�w��`�*�$5>q6�>O�Z�=��=�k�=�L�<&q= �u>d#
=M���&����ꖾy:;>��²{>6ƀ<:�h�G^�������T���1�>N��[�s�� =�:!>o{>4���A䛾lo�� �]>{�v�`n�c=4���f?�>M���0m>�X>����Ҷ�<'�>����NV����|>�ꑾh�ɾ4#�悞<'K�>����~�=HO�>N8B��Ui�K �=u��=e`?��+�ǟ;���.�?�)�DP\?�-���@�;-�9V\?N�<��\2��5�ؗ'���e?��W?bl+�\�/��5[?��]?�O����A? L?^?�;E�'� ?n�>{�8��) ?�� ?��?�Ik?��>�F6�OI ����.@?)~?��>��8���?�-?�$@�=�>�>?)�4��_�+���9?��?�?��?��M?L?�7�h�?�<?8�@ ?�?G ;�vI&�`<�?�B?d��U��s�??o �>CI
?ݪ5��?��?��?��� �~��>�=?wC�f��L�W?
vector_observation���� action_masks����policy_1/concat_2/concatactionaction_output_shape������?
action_output_shape memory_sizeversion_numbertrainer_patch_versiontrainer_minor_versiontrainer_major_versionis_continuous_controlpolicy_1/add_2/ypolicy_1/Sum/reduction_indicespolicy_1/add/y $policy/main_graph_0/hidden_0/BiasAdd�����?vector_observation#policy/main_graph_0/hidden_0/kernel
�!policy/main_graph_0/hidden_0/bias� policy/main_graph_0/hidden_0/Mul2 �����?$policy/main_graph_0/hidden_0/BiasAddpolicy_1/dense/MatMul�����? policy/main_graph_0/hidden_0/Mulpolicy/dense/kernel�<policy_1/dense/MatMul/patch:0�policy_1/strided_slice������? action_maskspolicy_1/Softmax2�����?policy_1/dense/MatMul policy_1/addd�����?policy_1/Softmaxpolicy_1/add/y policy_1/Mulf�����? policy_1/addpolicy_1/strided_slice policy_1/Sum������? policy_1/Mulpolicy_1/Sum/reduction_indicespolicy_1/truedivg�����? policy_1/Mul policy_1/Sumpolicy_1/add_2d�����?policy_1/truedivpolicy_1/add_2/ypolicy_1/Log_12r�����?policy_1/add_2policy_1/concat_2/concat2�����?policy_1/Log_1action2�����?policy_1/concat_2/concat@@@�A���3�?���3��ƽl >_jX=�P��
��z�>����0>�����K�>s�>��Y>&�j>�M�����=,�����"����>�P�����>�ɹ<����8��c�==�����:)�y�x�>|\-<���xdO���"����{?=���=[�1>�l>>_����->�8���8��ž= �m>M�/>����H� =/��Nh���b_�4��>�]�܌<��>�Ӥ>�E��D>�T=�zO�����A�;Qd���Ͼ�{|��D;>Z�`�/�aV���o�>TJ�=Sa��xİ�5!)>�8�=� 侥Z�='�.�O�<��5n�A��|�=�����#��jfs>1x=��<)���g����K�>>z>���>���=�< Lb���>�ݘ>X=C=^JѾ��վ*�>�L�>�����`��%T�(Qz��'�>��k�����C�|>0�D�S:3<̋�>�D^=K8�Y^�>kX����f=b�=�׍�J9�=������=t:��
q�>�h`� �>�J��F��4.�� ��[@�;��+>}=��m>�В<xxW��ᔾ+�Q���>��=���>���>E�=��j�>�a�<����Ə<���u��� ,��FF��VG��� T�m^���&<�+g=Z ^>��u��>tFy>�f�=/{M>� ���վv��x���n)�=9�A>s�J���@>*� ��:�>��>A��P���q�>qI=�Z���H���l���e>��[>O�þ��:�G����(�)��>���>����G�����>��^=
�?�ٻ&��B�$>AW5>�٧���?s�=�E�>č�>�-/<��¾�{��#!O��u0>z�<>���>��=+� �r|�kV�fo�>��=F@Z>�j=V �> �6b��U�6='�?sզ��2�;M4��@�C>��?�-? �=x/>��ؾ�g5=c��=�v����c>$Bi>m�����I>ؖ��ou<=�o��cb����ؽ�m�EQ�S�K=�7�=�[��Q�>/*��7��>�j��#|>D�����|��=���W���� �>���=M�6=�W�>�<�>��=����>(���o��>U)�>���>�����-��2�>F>�<ؾ[�7?*��>��E>>1?i��>S�>�# ?� ?���>uTJ�W#�>+Y澷&)?�D?��L?���x���d��>��>:'�>�u?� ?r_�>�9@?j����>��>���Z �=��7��Ϟ�@�d�v>�>9O�>��z>H���ᝡ���p=��=J��>��?i(�>8���>%>��%��樾9���n����r>6^->�Х=Ng>�r>�ad>,{����>1��<1����!>ev�Z �=+-�� ���A����<��:>�1f�{J���c=��!� ���]3>�]R�+��<��C>DY0�
Ty=��)��R�>C�>�[�= ޽mU�>?��=�(��:��λ�&.{=��f��3/��kK��\�=W�ʻ1��>�����4�=k�)������ ��=P�#���,���A�sJ,��ՙ>�kY�>����ܼ~I>%�S���ս�k� վW�g>�f>
ƙ����l��..R>��ʽ�k�=�=����a�P��IO?��I?�C?��F?t�B?;.�CM?o(��I?o�F?VGD?h�(����SH?�{H?��>��D?�G?�A?E7F?7���"Ǿk0/?W ��ž�-,?X��� k���!?ߥ߾�����,?Ӿ �⾡�?�T?�.�>��"��N�Y�˾5n0?�?�>*��> %��P��� ��>.?�l�b�����?���� " ��L-?�H�>x?L"�n��>%~�>�g'��X ����^�??��<�ݾ��+?LD!<.V<��,������Q"?,�|� ���,?G��������?���G��W�-?

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

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

4
Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerDyn.demo.meta


fileFormatVersion: 2
guid: 557283e524ca0493ebc67c7b475304fe
guid: 0d65dafbeef46458f9793deb48a2cc1b
11400000: Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerDyn.demo
11400002: Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerDyn.demo
externalObjects: {}
userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)'
assetBundleName:

4
Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerSta.demo.meta


fileFormatVersion: 2
guid: 4975695b6ea23446a94c9be3b5d21731
guid: 9c4423ab9e9844fd88c4ca8508337330
11400000: Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerSta.demo
11400002: Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerSta.demo
externalObjects: {}
userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)'
assetBundleName:

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

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


fileFormatVersion: 2
guid: 0058b366f9d6d44a3ba35beb06b0174b
NativeFormatImporter:
PrefabImporter:
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

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

983
Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity
文件差异内容过多而无法显示
查看文件

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


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

propertyPath: m_ConnectedAnchor.x
value: 0.28284332
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007897615
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005528331
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005558133
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007972121
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
- target: {fileID: 8231708464545277303, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &258681675

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

propertyPath: m_ConnectedAnchor.y
value: -0.14285131
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007897615
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005528331
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005558133
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007972121
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
--- !u!4 &262374584 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4484619683682530, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
m_PrefabInstance: {fileID: 586831923}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &451696083
PrefabInstance:
m_ObjectHideFlags: 0

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

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

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

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

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

propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &680193204

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

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

m_Script: {fileID: 11500000, guid: ec40c70d5160b47cd8deaab79e24892c, type: 3}
m_Name:
m_EditorClassIdentifier:
target: {fileID: 262374584}
target: {fileID: 1668325741}
--- !u!4 &1668325741 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3386028169034248598, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
m_PrefabInstance: {fileID: 586831923}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1747399701
PrefabInstance:
m_ObjectHideFlags: 0

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

propertyPath: m_ConnectedAnchor.y
value: -0.14285131
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007897615
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005528331
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005558133
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007972121
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &2010228152

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

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

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

propertyPath: m_ConnectedAnchor.y
value: -0.14285858
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007897615
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005528331
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005558133
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007972121
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1 &2095421678

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
gravityMultiplier: 1
monitorVerticalOffset: 1
gravityMultiplier: 1.5
reuseCollisionCallbacks: 1
--- !u!1001 &2129505181
PrefabInstance:
m_ObjectHideFlags: 0

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

type: 3}
propertyPath: m_ConnectedAnchor.y
value: -0.14285858
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007897615
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005528331
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000005558133
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000812
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000007972121
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}

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


using System;
using Random = UnityEngine.Random;
[Header("Target To Walk Towards")]
[Space(10)]
public Transform target;
public float maximumWalkingSpeed = 999; //The max walk velocity magnitude an agent will be rewarded for
Vector3 m_WalkDir; //Direction to the target
Quaternion m_WalkDirLookRot; //Will hold the rotation to our target
public Transform ground;
public bool detectTargets;
public bool targetIsStatic;
public bool respawnTargetWhenTouched;
public float targetSpawnRadius;
[Header("Target To Walk Towards")] [Space(10)]
public TargetController target; //Target the agent will walk towards.
[Header("Body Parts")] [Space(10)] public Transform body;
public Transform leg0Upper;

public Transform leg3Upper;
public Transform leg3Lower;
[Header("Joint Settings")] [Space(10)] JointDriveController m_JdController;
Vector3 m_DirToTarget;
float m_MovingTowardsDot;
float m_FacingDot;
[Header("Reward Functions To Use")]
[Space(10)]
[Header("Orientation")] [Space(10)]
//This will be used as a stabilized model space reference point for observations
//Because ragdolls can move erratically during training, using a stabilized reference transform improves learning
public OrientationCubeController orientationCube;
JointDriveController m_JdController;
[Header("Reward Functions To Use")] [Space(10)]
[Header("Foot Grounded Visualization")]
[Space(10)]
[Header("Foot Grounded Visualization")] [Space(10)]
public bool useFootGroundedVisualization;
public MeshRenderer foot0;

public Material groundedMaterial;
public Material unGroundedMaterial;
Quaternion m_LookRotation;
Matrix4x4 m_TargetDirMatrix;
m_JdController = GetComponent<JointDriveController>();
m_DirToTarget = target.position - body.position;
orientationCube.UpdateOrientation(body, target.transform);
m_JdController = GetComponent<JointDriveController>();
//Setup each body part
m_JdController.SetupBodyPart(body);

}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()
{
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);
}
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
orientationCube.UpdateOrientation(body, target.transform);
}
/// <summary>
var rb = bp.rb;
sensor.AddObservation(bp.groundContact.touchingGround ? 1 : 0); // Whether the bp touching the ground
//GROUND CHECK
sensor.AddObservation(bp.groundContact.touchingGround); // Is this bp touching the ground
var velocityRelativeToLookRotationToTarget = m_TargetDirMatrix.inverse.MultiplyVector(rb.velocity);
sensor.AddObservation(velocityRelativeToLookRotationToTarget);
//Get velocities in the context of our orientation cube's space
//Note: You can get these velocities in world space as well but it may not train as well.
sensor.AddObservation(orientationCube.transform.InverseTransformDirection(bp.rb.velocity));
sensor.AddObservation(orientationCube.transform.InverseTransformDirection(bp.rb.angularVelocity));
var angularVelocityRelativeToLookRotationToTarget = m_TargetDirMatrix.inverse.MultiplyVector(rb.angularVelocity);
sensor.AddObservation(angularVelocityRelativeToLookRotationToTarget);
//Get position relative to hips in the context of our orientation cube's space
sensor.AddObservation(orientationCube.transform.InverseTransformDirection(bp.rb.position - body.position));
var localPosRelToBody = body.InverseTransformPoint(rb.position);
sensor.AddObservation(localPosRelToBody);
sensor.AddObservation(bp.currentXNormalizedRot); // Current x rot
sensor.AddObservation(bp.currentYNormalizedRot); // Current y rot
sensor.AddObservation(bp.currentZNormalizedRot); // Current z rot
sensor.AddObservation(bp.rb.transform.localRotation);
/// <summary>
/// Loop over body parts to add them to observation.
/// </summary>
m_JdController.GetCurrentJointForces();
//Add body rotation delta relative to orientation cube
sensor.AddObservation(Quaternion.FromToRotation(body.forward, orientationCube.transform.forward));
// Update pos to target
m_DirToTarget = target.position - body.position;
m_LookRotation = Quaternion.LookRotation(m_DirToTarget);
m_TargetDirMatrix = Matrix4x4.TRS(Vector3.zero, m_LookRotation, Vector3.one);
//Add pos of target relative to orientation cube
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.transform.position));
if (Physics.Raycast(body.position, Vector3.down, out hit, 10.0f))
float maxRaycastDist = 10;
if (Physics.Raycast(body.position, Vector3.down, out hit, maxRaycastDist))
sensor.AddObservation(hit.distance);
sensor.AddObservation(hit.distance / maxRaycastDist);
sensor.AddObservation(10.0f);
// Forward & up to help with orientation
var bodyForwardRelativeToLookRotationToTarget = m_TargetDirMatrix.inverse.MultiplyVector(body.forward);
sensor.AddObservation(bodyForwardRelativeToLookRotationToTarget);
var bodyUpRelativeToLookRotationToTarget = m_TargetDirMatrix.inverse.MultiplyVector(body.up);
sensor.AddObservation(bodyUpRelativeToLookRotationToTarget);
sensor.AddObservation(1);
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
foreach (var bodyPart in m_JdController.bodyPartsList)
{
CollectObservationBodyPart(bodyPart, sensor);
}

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

void FixedUpdate()
{
if (detectTargets)
{
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
if (bodyPart.targetContact && bodyPart.targetContact.touchingTarget)
{
TouchedTarget();
}
}
}
orientationCube.UpdateOrientation(body, target.transform);
// If enabled the feet will light up green when the foot is grounded.
// This is just a visualization and isn't necessary for function

/// </summary>
void RewardFunctionMovingTowards()
{
m_MovingTowardsDot = Vector3.Dot(m_JdController.bodyPartsDict[body].rb.velocity, m_DirToTarget.normalized);
AddReward(0.03f * m_MovingTowardsDot);
var movingTowardsDot = Vector3.Dot(orientationCube.transform.forward,
Vector3.ClampMagnitude(m_JdController.bodyPartsDict[body].rb.velocity, maximumWalkingSpeed));
if (float.IsNaN(movingTowardsDot))
{
throw new ArgumentException(
"NaN in movingTowardsDot.\n" +
$" orientationCube.transform.forward: {orientationCube.transform.forward}\n"+
$" body.velocity: {m_JdController.bodyPartsDict[body].rb.velocity}\n"+
$" maximumWalkingSpeed: {maximumWalkingSpeed}"
);
}
AddReward(0.03f * movingTowardsDot);
}
/// <summary>

{
m_FacingDot = Vector3.Dot(m_DirToTarget.normalized, body.forward);
AddReward(0.01f * m_FacingDot);
var facingReward = Vector3.Dot(orientationCube.transform.forward, body.forward);
if (float.IsNaN(facingReward))
{
throw new ArgumentException(
"NaN in movingTowardsDot.\n" +
$" orientationCube.transform.forward: {orientationCube.transform.forward}\n"+
$" body.forward: {body.forward}"
);
}
AddReward(0.01f * facingReward);
}
/// <summary>

{
AddReward(-0.001f);
}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()
{
if (m_DirToTarget != Vector3.zero)
{
transform.rotation = Quaternion.LookRotation(m_DirToTarget);
}
transform.Rotate(Vector3.up, Random.Range(0.0f, 360.0f));
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);
}
if (!targetIsStatic)
{
GetRandomTargetPos();
}
}
}

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

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


fileFormatVersion: 2
guid: 039557e683d584183a2a82cf8b1904c0
guid: 7040ebdb10cab44a7b516d0933dcd0d2
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj

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

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


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

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


m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
vectorObservationSize: 4
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
vectorActionDescriptions: []
vectorActionSpaceType: 0
VectorObservationSize: 4
NumStackedVectorObservations: 1
VectorActionSize: 03000000030000000300000002000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: 36ab3e93020504f48858d0856f939685, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0

m_ObservableAttributeHandling: 0
--- !u!114 &114176228333253036
MonoBehaviour:
m_ObjectHideFlags: 0

agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
MaxStep: 5000
area: {fileID: 1819751139121548}
turnSpeed: 300
moveSpeed: 2

frozenMaterial: {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
myLaser: {fileID: 1081721624670010}
contribute: 0
contribute: 1
useVectorObs: 1
--- !u!114 &114725457980523372
MonoBehaviour:

m_EditorClassIdentifier:
DecisionPeriod: 5
TakeActionsBetweenDecisions: 1
offsetStep: 0
--- !u!114 &1222199865870203693
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
debugCommandLineOverride:
--- !u!1 &1482701732800114
GameObject:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
vectorObservationSize: 4
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
vectorActionDescriptions: []
vectorActionSpaceType: 0
VectorObservationSize: 4
NumStackedVectorObservations: 1
VectorActionSize: 03000000030000000300000002000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: 36ab3e93020504f48858d0856f939685, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0

m_ObservableAttributeHandling: 0
--- !u!114 &114711827726849508
MonoBehaviour:
m_ObjectHideFlags: 0

agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
MaxStep: 5000
area: {fileID: 1819751139121548}
turnSpeed: 300
moveSpeed: 2

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

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
vectorObservationSize: 4
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
vectorActionDescriptions: []
vectorActionSpaceType: 0
VectorObservationSize: 4
NumStackedVectorObservations: 1
VectorActionSize: 03000000030000000300000002000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: 36ab3e93020504f48858d0856f939685, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0

m_ObservableAttributeHandling: 0
--- !u!114 &114542632553128056
MonoBehaviour:
m_ObjectHideFlags: 0

agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 5000
MaxStep: 5000
area: {fileID: 1819751139121548}
turnSpeed: 300
moveSpeed: 2

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

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
vectorObservationSize: 4
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
vectorActionDescriptions: []
vectorActionSpaceType: 0
VectorObservationSize: 4
NumStackedVectorObservations: 1
VectorActionSize: 03000000030000000300000002000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: 36ab3e93020504f48858d0856f939685, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0

m_ObservableAttributeHandling: 0
--- !u!114 &114189751434580810
MonoBehaviour:
m_ObjectHideFlags: 0