浏览代码

Merge branch 'master' into develop-hybrid-actions

/develop/actionmodel-csharp
Andrew Cohen 4 年前
当前提交
3997b14b
共有 241 个文件被更改,包括 5858 次插入5347 次删除
  1. 219
      .circleci/config.yml
  2. 2
      .pylintrc
  3. 3
      .yamato/com.unity.ml-agents-performance.yml
  4. 6
      .yamato/com.unity.ml-agents-test.yml
  5. 2
      .yamato/gym-interface-test.yml
  6. 2
      .yamato/python-ll-api-test.yml
  7. 3
      .yamato/training-int-tests.yml
  8. 1
      DevProject/.gitignore
  9. 2
      Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerDyn.demo.meta
  10. 2
      Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerSta.demo.meta
  11. 248
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab
  12. 48
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/CrawlerBase.prefab
  13. 924
      Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity
  14. 989
      Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity
  15. 257
      Project/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs
  16. 1001
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn
  17. 2
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn.meta
  18. 1001
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn
  19. 2
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn.meta
  20. 520
      Project/Assets/ML-Agents/Examples/Hallway/Prefabs/SymbolFinderArea.prefab
  21. 18
      Project/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity
  22. 181
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTargetPlatform.prefab
  23. 18
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs
  24. 11
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs
  25. 42
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
  26. 233
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerStatic.unity
  27. 227
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerStaticVariableSpeed.unity
  28. 116
      Project/Assets/ML-Agents/Examples/Worm/Prefabs/PlatformWormDynamicTarget.prefab
  29. 584
      Project/Assets/ML-Agents/Examples/Worm/Scenes/WormDynamicTarget.unity
  30. 947
      Project/Assets/ML-Agents/Examples/Worm/Scenes/WormStaticTarget.unity
  31. 276
      Project/Assets/ML-Agents/Examples/Worm/Scripts/WormAgent.cs
  32. 1001
      Project/Assets/ML-Agents/Examples/Worm/TFModels/WormDynamic.nn
  33. 2
      Project/Assets/ML-Agents/Examples/Worm/TFModels/WormDynamic.nn.meta
  34. 1001
      Project/Assets/ML-Agents/Examples/Worm/TFModels/WormStatic.nn
  35. 2
      Project/Assets/ML-Agents/Examples/Worm/TFModels/WormStatic.nn.meta
  36. 2
      Project/ProjectSettings/DynamicsManager.asset
  37. 4
      com.unity.ml-agents.extensions/.gitignore
  38. 7
      com.unity.ml-agents.extensions/CHANGELOG.md
  39. 1
      com.unity.ml-agents.extensions/Tests/Editor/Unity.ML-Agents.Extensions.EditorTests.asmdef
  40. 2
      com.unity.ml-agents.extensions/package.json
  41. 2
      com.unity.ml-agents/.gitignore
  42. 42
      com.unity.ml-agents/CHANGELOG.md
  43. 12
      com.unity.ml-agents/CONTRIBUTING.md
  44. 17
      com.unity.ml-agents/Runtime/Academy.cs
  45. 33
      com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs
  46. 29
      com.unity.ml-agents/Runtime/Actuators/IActuator.cs
  47. 14
      com.unity.ml-agents/Runtime/Actuators/VectorActuator.cs
  48. 36
      com.unity.ml-agents/Runtime/Agent.cs
  49. 29
      com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
  50. 10
      com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs
  51. 40
      com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Capabilities.cs
  52. 6
      com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs
  53. 23
      com.unity.ml-agents/Runtime/Inference/TensorProxy.cs
  54. 2
      com.unity.ml-agents/Runtime/Sensors/ISensor.cs
  55. 90
      com.unity.ml-agents/Tests/Editor/Communicator/GrpcExtensionsTests.cs
  56. 52
      com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs
  57. 4
      com.unity.ml-agents/package.json
  58. 4
      config/ppo/CrawlerDynamic.yaml
  59. 4
      config/ppo/CrawlerStatic.yaml
  60. 2
      config/ppo/WormDynamic.yaml
  61. 2
      config/ppo/WormStatic.yaml
  62. 2
      docs/Background-Machine-Learning.md
  63. 11
      docs/Custom-SideChannels.md
  64. 14
      docs/Learning-Environment-Design-Agents.md
  65. 32
      docs/Learning-Environment-Examples.md
  66. 4
      docs/Training-Configuration-File.md
  67. 21
      docs/Training-ML-Agents.md
  68. 118
      docs/images/demo_component.png
  69. 4
      gym-unity/README.md
  70. 2
      gym-unity/gym_unity/__init__.py
  71. 2
      gym-unity/gym_unity/envs/__init__.py
  72. 21
      gym-unity/gym_unity/tests/test_gym.py
  73. 4
      markdown-link-check.fast.json
  74. 8
      markdown-link-check.full.json
  75. 2
      ml-agents-envs/mlagents_envs/__init__.py
  76. 11
      ml-agents-envs/mlagents_envs/communicator_objects/capabilities_pb2.py
  77. 6
      ml-agents-envs/mlagents_envs/communicator_objects/capabilities_pb2.pyi
  78. 6
      ml-agents-envs/mlagents_envs/environment.py
  79. 87
      ml-agents-envs/mlagents_envs/rpc_utils.py
  80. 48
      ml-agents-envs/mlagents_envs/tests/test_rpc_utils.py
  81. 2
      ml-agents/mlagents/trainers/__init__.py
  82. 2
      ml-agents/mlagents/trainers/ghost/trainer.py
  83. 8
      ml-agents/mlagents/trainers/optimizer/torch_optimizer.py
  84. 22
      ml-agents/mlagents/trainers/policy/torch_policy.py
  85. 8
      ml-agents/mlagents/trainers/ppo/optimizer_torch.py
  86. 24
      ml-agents/mlagents/trainers/ppo/trainer.py
  87. 2
      ml-agents/mlagents/trainers/ppo/optimizer_tf.py
  88. 47
      ml-agents/mlagents/trainers/sac/optimizer_torch.py
  89. 30
      ml-agents/mlagents/trainers/sac/trainer.py
  90. 61
      ml-agents/mlagents/trainers/settings.py
  91. 10
      ml-agents/mlagents/trainers/tests/test_ppo.py
  92. 4
      ml-agents/mlagents/trainers/tests/test_reward_signals.py
  93. 15
      ml-agents/mlagents/trainers/tests/test_rl_trainer.py
  94. 9
      ml-agents/mlagents/trainers/tests/test_sac.py
  95. 116
      ml-agents/mlagents/trainers/tests/test_saver.py
  96. 32
      ml-agents/mlagents/trainers/tests/test_settings.py
  97. 8
      ml-agents/mlagents/trainers/tests/test_simple_rl.py
  98. 40
      ml-agents/mlagents/trainers/tests/torch/saver/test_saver.py

219
.circleci/config.yml


- image: circleci/python:3.8.2
jobs:
build_python:
parameters:
executor:
type: executor
pyversion:
type: string
description: python version to being used (currently only affects caching).
pip_constraints:
type: string
description: Constraints file that is passed to "pip install". We constraint older versions of libraries for older python runtime, in order to help ensure compatibility.
enforce_onnx_conversion:
type: integer
default: 0
description: Whether to raise an exception if ONNX models couldn't be saved.
executor: << parameters.executor >>
working_directory: ~/repo
# Run additional numpy checks on unit tests
environment:
TEST_ENFORCE_NUMPY_FLOAT32: 1
TEST_ENFORCE_ONNX_CONVERSION: << parameters.enforce_onnx_conversion >>
steps:
- checkout
- run:
# Combine all the python dependencies into one file so that we can use that for the cache checksum
name: Combine pip dependencies for caching
command: cat ml-agents/setup.py ml-agents-envs/setup.py gym-unity/setup.py test_requirements.txt << parameters.pip_constraints >> > python_deps.txt
- restore_cache:
keys:
# Parameterize the cache so that different python versions can get different versions of the packages
- v1-dependencies-py<< parameters.pyversion >>-{{ checksum "python_deps.txt" }}
- run:
name: Install Dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install --progress-bar=off -e ./ml-agents-envs -c << parameters.pip_constraints >>
pip install --progress-bar=off -e ./ml-agents -c << parameters.pip_constraints >>
pip install --progress-bar=off -r test_requirements.txt -c << parameters.pip_constraints >>
pip install --progress-bar=off -e ./gym-unity -c << parameters.pip_constraints >>
- save_cache:
paths:
- ./venv
key: v1-dependencies-py<< parameters.pyversion >>-{{ checksum "python_deps.txt" }}
- run:
name: Run Tests for ml-agents and gym_unity
# This also dumps the installed pip packages to a file, so we can see what versions are actually being used.
command: |
. venv/bin/activate
mkdir test-reports
pip freeze > test-reports/pip_versions.txt
pytest --cov=ml-agents --cov=ml-agents-envs --cov=gym-unity --cov-report html --junitxml=test-reports/junit.xml -p no:warnings
- run:
name: Verify there are no hidden/missing metafiles.
# Renaming files or deleting files can leave metafiles behind that makes Unity very unhappy.
command: |
. venv/bin/activate
python utils/validate_meta_files.py
- store_test_results:
path: test-reports
- store_artifacts:
path: test-reports
destination: test-reports
- store_artifacts:
path: htmlcov
destination: htmlcov
pre-commit:
docker:
- image: circleci/python:3.7.3
working_directory: ~/repo/
steps:
- checkout
- run:
name: Combine precommit config and python versions for caching
command: |
cat .pre-commit-config.yaml > pre-commit-deps.txt
python -VV >> pre-commit-deps.txt
- restore_cache:
keys:
- v1-precommit-deps-{{ checksum "pre-commit-deps.txt" }}
- run:
name: Install Dependencies
command: |
# Need ruby for search-and-replace
sudo apt-get update
sudo apt-get install ruby-full
# install dotnet and the formatter - see https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-9-
pushd ~
wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget https://packages.microsoft.com/config/debian/9/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
popd
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-3.1 && \
dotnet tool install -g dotnet-format --version 4.1.131201
echo "Setting up venv"
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install pre-commit
# Install the hooks now so that they'll be cached
pre-commit install-hooks
- save_cache:
paths:
- ~/.cache/pre-commit
- ./venv
key: v1-precommit-deps-{{ checksum "pre-commit-deps.txt" }}
- run:
name: Check Code Style using pre-commit
command: |
. venv/bin/activate
export PATH="$PATH:~/.dotnet/tools"
pre-commit run --show-diff-on-failure --all-files
markdown_link_check:
parameters:
precommit_command:
type: string
description: precommit hook to run
default: markdown-link-check
docker:
- image: circleci/node:12.6.0
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-node-dependencies-{{ checksum ".pre-commit-config.yaml" }}
# fallback to using the latest cache if no exact match is found
- v1-node-dependencies-
- run:
name: Install Dependencies
command: |
sudo apt-get install python3-venv
python3 -m venv venv
. venv/bin/activate
pip install pre-commit
- run: sudo npm install -g markdown-link-check
- save_cache:
paths:
- ./venv
key: v1-node-dependencies-{{ checksum ".pre-commit-config.yaml" }}
- run:
name: Run markdown-link-check via precommit
command: |
. venv/bin/activate
pre-commit run --hook-stage manual << parameters.precommit_command >> --all-files
deploy:
parameters:
directory:

version: 2
workflow:
jobs:
- build_python:
name: python_3.6.1
executor: python361
pyversion: 3.6.1
# Test python 3.6 with the oldest supported versions
pip_constraints: test_constraints_min_version.txt
- build_python:
name: python_3.7.3
executor: python373
pyversion: 3.7.3
# Test python 3.7 with the newest supported versions
pip_constraints: test_constraints_max_tf1_version.txt
# Make sure ONNX conversion passes here (recent version of tensorflow 1.x)
enforce_onnx_conversion: 1
- build_python:
name: python_3.7.3+tf2
executor: python373
pyversion: 3.7.3
# Test python 3.7 with the newest supported versions
pip_constraints: test_constraints_max_tf2_version.txt
- build_python:
name: python_3.8.2+tf2.2
executor: python382
pyversion: 3.8.2
# Test python 3.8 with the newest edge versions
pip_constraints: test_constraints_max_tf2_version.txt
- markdown_link_check
- pre-commit
# The first deploy jobs are the "real" ones that upload to pypi
- deploy:
name: deploy ml-agents-envs

only: /^release_[0-9]+_test[0-9]+$/
branches:
ignore: /.*/
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- develop
jobs:
- markdown_link_check:
name: markdown-link-check full
precommit_command: markdown-link-check-full

2
.pylintrc


# Add files or directories to the ignore list. They should be base names, not
# paths.
ignore=CVS
generated-members=torch.*
[MESSAGES CONTROL]
#enable=

3
.yamato/com.unity.ml-agents-performance.yml


test_editors:
- version: 2019.3
- version: 2019.4
- version: 2020.2
---
{% for editor in test_editors %}
Run_Mac_Perfomance_Tests{{ editor.version }}:

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


- version: 2018.4
# 2018.4 doesn't support code-coverage
enableCodeCoverage: !!bool false
- version: 2019.3
- version: 2019.4
enableCodeCoverage: !!bool true
- version: 2020.1
enableCodeCoverage: !!bool true

flavor: {{ platform.flavor}}
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ coverageOptions }}
- upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ coverageOptions }} --extra-utr-arg "reruncount=2"
{% if editor.enableCodeCoverage %}
- python3 ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ package.minCoveragePct }}
{% endif %}

- python -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -u trunk -c editor --wait --fast
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ coverageOptions }}
- upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ coverageOptions }} --extra-utr-arg "reruncount=2"
{% if editor.enableCodeCoverage %}
- python3 ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ package.minCoveragePct }}
{% endif %}

2
.yamato/gym-interface-test.yml


test_editors:
- version: 2019.3
- version: 2019.4
---
{% for editor in test_editors %}
test_gym_interface_{{ editor.version }}:

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


test_editors:
- version: 2019.3
- version: 2019.4
---
{% for editor in test_editors %}
test_mac_ll_api_{{ editor.version }}:

3
.yamato/training-int-tests.yml


test_editors:
- version: 2018.4
- version: 2019.3
- version: 2019.4
- version: 2020.1
---
{% for editor in test_editors %}
test_mac_training_int_{{ editor.version }}:

1
DevProject/.gitignore


/Assets/Demonstrations*
/Assets/ML-Agents/Timers*
/csharp_timers.json
/CodeCoverage/
# Environemnt logfile
*Project.log

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


fileFormatVersion: 2
guid: 0d65dafbeef46458f9793deb48a2cc1b
guid: 3f667fd81a6f9437ba91dd70a1f2209b
ScriptedImporter:
fileIDToRecycleName:
11400002: Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerDyn.demo

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


fileFormatVersion: 2
guid: 9c4423ab9e9844fd88c4ca8508337330
guid: a7654a04b30024a8cbe6121997b01f59
ScriptedImporter:
fileIDToRecycleName:
11400002: Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawlerSta.demo

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


m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6810593986226363672}
- {fileID: 8951412967461282419}
- {fileID: 7802320107249901494}
- {fileID: 3421283062001101768}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_LocalScale: {x: 100, y: 1, z: 100}
m_Children: []
m_Father: {fileID: 6810587057221831324}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
--- !u!33 &6840107661781754058
MeshFilter:

serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &4573852208357529272
--- !u!1001 &7798701981554532099
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2

- target: {fileID: 2310084103354264149, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.49
objectReference: {fileID: 0}
- target: {fileID: 2864902974773876700, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: targetToLookAt
value:
objectReference: {fileID: 7802320107249901494}
- target: {fileID: 4845971000000621469, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000000014901161
objectReference: {fileID: 0}
- target: {fileID: 4845971000000621469, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000007
objectReference: {fileID: 0}
- target: {fileID: 4845971000245862049, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000000044703484
objectReference: {fileID: 0}
- target: {fileID: 4845971000245862049, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.32999957
objectReference: {fileID: 0}
- target: {fileID: 4845971000281612791, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000000014901161
objectReference: {fileID: 0}
- target: {fileID: 4845971000281612791, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000052
objectReference: {fileID: 0}
- target: {fileID: 4845971000566026490, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.28284273
objectReference: {fileID: 0}
- target: {fileID: 4845971000943818055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.28284281
objectReference: {fileID: 0}
- target: {fileID: 4845971001325249074, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.28284281
objectReference: {fileID: 0}
- target: {fileID: 4845971001327158055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.28284273
objectReference: {fileID: 0}
- target: {fileID: 4845971001622533708, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000000029802322
objectReference: {fileID: 0}
- target: {fileID: 4845971001622533708, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000004
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176648, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: 7040ebdb10cab44a7b516d0933dcd0d2,
type: 3}
- target: {fileID: 4845971001715176648, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_BehaviorName
value: CrawlerDynamic
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: target
value:
objectReference: {fileID: 7738248088303878723}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: ground
value:
objectReference: {fileID: 6810815557394078638}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: orientationCube
value:
objectReference: {fileID: 186649206436789638}
- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalPosition.x

type: 3}
propertyPath: m_LocalPosition.y
value: 2
value: 2.506
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}

- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
value: 0
value: -0
value: 0
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}

- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_RootOrder
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}

- target: {fileID: 4845971001715176661, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_Name
value: Crawler
value: CrawlerBase
- target: {fileID: 4845971001715176661, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 7147393771121027373, guid: 0456c89e8c9c243d595b039fe7aa0bf9, type: 3}
m_RemovedComponents: []
--- !u!4 &8951412967461282419 stripped
--- !u!4 &3421283062001101768 stripped
m_PrefabInstance: {fileID: 4573852208357529272}
m_PrefabAsset: {fileID: 0}
--- !u!114 &8951412967461282417 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
m_PrefabInstance: {fileID: 4573852208357529272}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f37c30a5e8d04117947188818902ef3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &186649206436789638 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4462656217269709630, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
m_PrefabInstance: {fileID: 4573852208357529272}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &6413179990576818696
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 6810587057221831324}
m_Modifications:
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 8951412967461282417}
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: TouchedTarget
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.z
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3840539935788495952, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_Name
value: DynamicTarget
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 46734abd0de454192b407379c6a4ab8d, type: 3}
--- !u!4 &7802320107249901494 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
m_PrefabInstance: {fileID: 6413179990576818696}
m_PrefabInstance: {fileID: 7798701981554532099}
--- !u!114 &7738248088303878723 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
m_PrefabInstance: {fileID: 6413179990576818696}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:

48
Project/Assets/ML-Agents/Examples/Crawler/Prefabs/CrawlerBase.prefab


- component: {fileID: 4845971001715176662}
- component: {fileID: 4845971001715176663}
- component: {fileID: 4845971001715176660}
- component: {fileID: 4622120667686875944}
- component: {fileID: 8968436865147081600}
m_Name: Crawler
m_Name: CrawlerBase
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
VectorObservationSize: 21
VectorObservationSize: 32
NumStackedVectorObservations: 1
VectorActionSize: 14000000
VectorActionDescriptions: []

m_BehaviorType: 0
m_BehaviorName: CrawlerStatic
m_BehaviorName:
m_UseChildActuators: 1
m_ObservableAttributeHandling: 0
--- !u!114 &4845971001715176649
MonoBehaviour:

maxStep: 0
hasUpgradedFromAgentParameters: 1
MaxStep: 5000
maximumWalkingSpeed: 999
target: {fileID: 0}
typeOfCrawler: 0
crawlerDyModel: {fileID: 11400000, guid: 2dc51465533e7468d8bcafc17250cebf, type: 3}
crawlerDyVSModel: {fileID: 11400000, guid: 0d9a992c217a44684b41c7663f3eab3d, type: 3}
crawlerStModel: {fileID: 11400000, guid: e88b5542c96104c01b56f1ed82d8ccc8, type: 3}
crawlerStVSModel: {fileID: 11400000, guid: e0800a8eb11a34c138fa8186124af9dc, type: 3}
m_TargetWalkingSpeed: 15
dynamicTargetPrefab: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
staticTargetPrefab: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
body: {fileID: 4845971001588102148}
leg0Upper: {fileID: 4845971001327157979}
leg0Lower: {fileID: 4845971000000621467}

leg2Lower: {fileID: 4845971000281612789}
leg3Upper: {fileID: 4845971000943818107}
leg3Lower: {fileID: 4845971000245862063}
orientationCube: {fileID: 4462656217269709630}
rewardMovingTowardsTarget: 1
rewardFacingTarget: 1
rewardUseTimePenalty: 0
useFootGroundedVisualization: 0
foot0: {fileID: 4845971001702882992}
foot1: {fileID: 4845970999844939483}

m_Name:
m_EditorClassIdentifier:
maxJointSpring: 40000
jointDampen: 3000
maxJointForceLimit: 10000
jointDampen: 5000
maxJointForceLimit: 20000
bodyPartsList: []
--- !u!114 &4845971001715176663
MonoBehaviour:

m_Name:
m_EditorClassIdentifier:
debugCommandLineOverride:
--- !u!114 &4622120667686875944
--- !u!114 &8968436865147081600
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 4357529801223143938}
m_PrefabAsset: {fileID: 0}
--- !u!114 &4462656217269709630 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114705911240010044, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 4357529801223143938}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2270141184585723037}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8385811723256971493
PrefabInstance:
m_ObjectHideFlags: 0

type: 3}
propertyPath: targetToLookAt
value:
objectReference: {fileID: 0}
- target: {fileID: 6026464216722085689, guid: e568400ebedb3474fac505995f12ed4a,
type: 3}
propertyPath: updatedByAgent
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6084207059270429360, guid: e568400ebedb3474fac505995f12ed4a,
type: 3}

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

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

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


using System;
using UnityEngine;
using Unity.MLAgents;
using Unity.Barracuda;
using Unity.MLAgents.Actuators;
using Unity.MLAgentsExamples;
using Unity.MLAgents.Sensors;

public class CrawlerAgent : Agent
{
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
//The type of crawler behavior we want to use.
//This setting will determine how the agent is set up during initialization.
public enum CrawlerAgentBehaviorType
{
CrawlerDynamic,
CrawlerDynamicVariableSpeed,
CrawlerStatic,
CrawlerStaticVariableSpeed
}
[Tooltip(
"VariableSpeed - The agent will sample random speed magnitudes while training.\n" +
"Dynamic - The agent will run towards a target that changes position.\n" +
"Static - The agent will run towards a static target. "
)]
public CrawlerAgentBehaviorType typeOfCrawler;
//Crawler Brains
//A different brain will be used depending on the CrawlerAgentBehaviorType selected
[Header("NN Models")] public NNModel crawlerDyModel;
public NNModel crawlerDyVSModel;
public NNModel crawlerStModel;
public NNModel crawlerStVSModel;
[Header("Walk Speed")]
[Range(0.1f, m_maxWalkingSpeed)]
[SerializeField]
[Tooltip(
"The speed the agent will try to match.\n\n" +
"TRAINING:\n" +
"For VariableSpeed envs, this value will randomize at the start of each training episode.\n" +
"Otherwise the agent will try to match the speed set here.\n\n" +
"INFERENCE:\n" +
"During inference, VariableSpeed agents will modify their behavior based on this value " +
"whereas the CrawlerDynamic & CrawlerStatic agents will run at the speed specified during training "
)]
//The walking speed to try and achieve
private float m_TargetWalkingSpeed = m_maxWalkingSpeed;
[Header("Target To Walk Towards")]
[Space(10)]
public TargetController target; //Target the agent will walk towards.
const float m_maxWalkingSpeed = 15; //The max walking speed
//The current target walking speed. Clamped because a value of zero will cause NaNs
public float TargetWalkingSpeed
{
get { return m_TargetWalkingSpeed; }
set { m_TargetWalkingSpeed = Mathf.Clamp(value, .1f, m_maxWalkingSpeed); }
}
//Should the agent sample a new goal velocity each episode?
//If true, TargetWalkingSpeed will be randomly set between 0.1 and m_maxWalkingSpeed in OnEpisodeBegin()
//If false, the goal velocity will be m_maxWalkingSpeed
private bool m_RandomizeWalkSpeedEachEpisode;
//The direction an agent will walk during training.
[Header("Target To Walk Towards")] public Transform dynamicTargetPrefab; //Target prefab to use in Dynamic envs
public Transform staticTargetPrefab; //Target prefab to use in Static envs
private Transform m_Target; //Target the agent will walk towards during training.
[Header("Body Parts")] [Space(10)] public Transform body;
public Transform leg0Upper;

public Transform leg3Upper;
public Transform leg3Lower;
[Header("Orientation")]
[Space(10)]
public OrientationCubeController orientationCube;
OrientationCubeController m_OrientationCube;
//The indicator graphic gameobject that points towards the target
DirectionIndicator m_DirectionIndicator;
[Header("Reward Functions To Use")]
[Space(10)]
public bool rewardMovingTowardsTarget; // Agent should move towards target
public bool rewardFacingTarget; // Agent should face the target
public bool rewardUseTimePenalty; // Hurry up
[Header("Foot Grounded Visualization")]
[Space(10)]
public bool useFootGroundedVisualization;

public override void Initialize()
{
orientationCube.UpdateOrientation(body, target.transform);
SetAgentType();
m_OrientationCube = GetComponentInChildren<OrientationCubeController>();
m_DirectionIndicator = GetComponentInChildren<DirectionIndicator>();
m_JdController = GetComponent<JointDriveController>();
//Setup each body part

}
/// <summary>
/// Spawns a target prefab at pos
/// </summary>
/// <param name="prefab"></param>
/// <param name="pos"></param>
void SpawnTarget(Transform prefab, Vector3 pos)
{
m_Target = Instantiate(prefab, pos, Quaternion.identity, transform);
}
/// <summary>
/// Set up the agent based on the typeOfCrawler
/// </summary>
void SetAgentType()
{
var behaviorParams = GetComponent<Unity.MLAgents.Policies.BehaviorParameters>();
switch (typeOfCrawler)
{
case CrawlerAgentBehaviorType.CrawlerDynamic:
{
behaviorParams.BehaviorName = "CrawlerDynamic"; //set behavior name
if (crawlerDyModel)
behaviorParams.Model = crawlerDyModel; //assign the model
m_RandomizeWalkSpeedEachEpisode = false; //do not randomize m_TargetWalkingSpeed during training
SpawnTarget(dynamicTargetPrefab, transform.position); //spawn target
break;
}
case CrawlerAgentBehaviorType.CrawlerDynamicVariableSpeed:
{
behaviorParams.BehaviorName = "CrawlerDynamicVariableSpeed"; //set behavior name
if (crawlerDyVSModel)
behaviorParams.Model = crawlerDyVSModel; //assign the model
m_RandomizeWalkSpeedEachEpisode = true; //randomize m_TargetWalkingSpeed during training
SpawnTarget(dynamicTargetPrefab, transform.position); //spawn target
break;
}
case CrawlerAgentBehaviorType.CrawlerStatic:
{
behaviorParams.BehaviorName = "CrawlerStatic"; //set behavior name
if (crawlerStModel)
behaviorParams.Model = crawlerStModel; //assign the model
m_RandomizeWalkSpeedEachEpisode = false; //do not randomize m_TargetWalkingSpeed during training
SpawnTarget(staticTargetPrefab, transform.TransformPoint(new Vector3(0, 0, 1000))); //spawn target
break;
}
case CrawlerAgentBehaviorType.CrawlerStaticVariableSpeed:
{
behaviorParams.BehaviorName = "CrawlerStaticVariableSpeed"; //set behavior name
if (crawlerStVSModel)
behaviorParams.Model = crawlerStVSModel; //assign the model
m_RandomizeWalkSpeedEachEpisode = true; //randomize m_TargetWalkingSpeed during training
SpawnTarget(staticTargetPrefab, transform.TransformPoint(new Vector3(0, 0, 1000))); //spawn target
break;
}
}
}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()

}
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
body.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
UpdateOrientationObjects();
orientationCube.UpdateOrientation(body, target.transform);
//Set our goal walking speed
TargetWalkingSpeed =
m_RandomizeWalkSpeedEachEpisode ? Random.Range(0.1f, m_maxWalkingSpeed) : TargetWalkingSpeed;
}
/// <summary>

/// </summary>
public override void CollectObservations(VectorSensor sensor)
{
var cubeForward = m_OrientationCube.transform.forward;
//velocity we want to match
var velGoal = cubeForward * TargetWalkingSpeed;
//ragdoll's avg vel
var avgVel = GetAvgVelocity();
//current ragdoll velocity. normalized
sensor.AddObservation(Vector3.Distance(velGoal, avgVel));
//avg body vel relative to cube
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(avgVel));
//vel goal relative to cube
sensor.AddObservation(m_OrientationCube.transform.InverseTransformDirection(velGoal));
//rotation delta
sensor.AddObservation(Quaternion.FromToRotation(body.forward, cubeForward));
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.transform.position));
sensor.AddObservation(m_OrientationCube.transform.InverseTransformPoint(m_Target.transform.position));
RaycastHit hit;
float maxRaycastDist = 10;

}
}
/// <summary>
/// Agent touched the target
/// </summary>
public void TouchedTarget()
{
AddReward(1f);
}
{
// The dictionary with all the body parts in it are in the jdController
var bpDict = m_JdController.bodyPartsDict;

void FixedUpdate()
{
orientationCube.UpdateOrientation(body, target.transform);
UpdateOrientationObjects();
// If enabled the feet will light up green when the foot is grounded.
// This is just a visualization and isn't necessary for function

? groundedMaterial
: unGroundedMaterial;
}
var cubeForward = m_OrientationCube.transform.forward;
if (rewardMovingTowardsTarget)
{
RewardFunctionMovingTowards();
}
// a. Match target speed
//This reward will approach 1 if it matches perfectly and approach zero as it deviates
var matchSpeedReward = GetMatchingVelocityReward(cubeForward * TargetWalkingSpeed, GetAvgVelocity());
if (rewardFacingTarget)
{
RewardFunctionFacingTarget();
}
// b. Rotation alignment with target direction.
//This reward will approach 1 if it faces the target direction perfectly and approach zero as it deviates
var lookAtTargetReward = (Vector3.Dot(cubeForward, body.forward) + 1) * .5F;
if (rewardUseTimePenalty)
{
RewardFunctionTimePenalty();
}
AddReward(matchSpeedReward * lookAtTargetReward);
/// Reward moving towards target & Penalize moving away from target.
/// Update OrientationCube and DirectionIndicator
void RewardFunctionMovingTowards()
void UpdateOrientationObjects()
var movingTowardsDot = Vector3.Dot(orientationCube.transform.forward,
Vector3.ClampMagnitude(m_JdController.bodyPartsDict[body].rb.velocity, maximumWalkingSpeed));
if (float.IsNaN(movingTowardsDot))
m_OrientationCube.UpdateOrientation(body, m_Target);
if (m_DirectionIndicator)
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}"
);
m_DirectionIndicator.MatchOrientation(m_OrientationCube.transform);
AddReward(0.03f * movingTowardsDot);
/// Reward facing target & Penalize facing away from target
///Returns the average velocity of all of the body parts
///Using the velocity of the body only has shown to result in more erratic movement from the limbs
///Using the average helps prevent this erratic movement
void RewardFunctionFacingTarget()
Vector3 GetAvgVelocity()
var facingReward = Vector3.Dot(orientationCube.transform.forward, body.forward);
if (float.IsNaN(facingReward))
Vector3 velSum = Vector3.zero;
Vector3 avgVel = Vector3.zero;
//ALL RBS
int numOfRB = 0;
foreach (var item in m_JdController.bodyPartsList)
throw new ArgumentException(
"NaN in movingTowardsDot.\n" +
$" orientationCube.transform.forward: {orientationCube.transform.forward}\n" +
$" body.forward: {body.forward}"
);
numOfRB++;
velSum += item.rb.velocity;
AddReward(0.01f * facingReward);
avgVel = velSum / numOfRB;
return avgVel;
/// Existential penalty for time-contrained tasks.
/// Normalized value of the difference in actual speed vs goal walking speed.
void RewardFunctionTimePenalty()
public float GetMatchingVelocityReward(Vector3 velocityGoal, Vector3 actualVelocity)
AddReward(-0.001f);
//distance between our actual velocity and goal velocity
var velDeltaMagnitude = Mathf.Clamp(Vector3.Distance(actualVelocity, velocityGoal), 0, TargetWalkingSpeed);
//return the value on a declining sigmoid shaped curve that decays from 1 to 0
//This reward will approach 1 if it matches perfectly and approach zero as it deviates
return Mathf.Pow(1 - Mathf.Pow(velDeltaMagnitude / TargetWalkingSpeed, 2), 2);
}
/// <summary>
/// Agent touched the target
/// </summary>
public void TouchedTarget()
{
AddReward(1f);
}
}

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

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


fileFormatVersion: 2
guid: 7040ebdb10cab44a7b516d0933dcd0d2
guid: 2dc51465533e7468d8bcafc17250cebf
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: ff52bf4e5f6124657b7139e8dfe730e7
guid: e88b5542c96104c01b56f1ed82d8ccc8
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj

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


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6271460
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6271464}
- component: {fileID: 6271463}
- component: {fileID: 6271462}
- component: {fileID: 6271461}
m_Layer: 0
m_Name: Wall (1)
m_TagString: wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &6271464
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6271460}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 9.75, y: 1.5, z: 0}
m_LocalScale: {x: 0.5, y: 4, z: 50}
m_Children: []
m_Father: {fileID: 139180208}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6271463
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6271460}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &6271462
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6271460}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &6271461
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6271460}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &139180207
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 139180208}
m_Layer: 0
m_Name: Walls
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &139180208
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 139180207}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1877223448}
- {fileID: 6271464}
- {fileID: 1901930596}
- {fileID: 1101848052}
m_Father: {fileID: 4726744827719472}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1101848051
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1101848052}
- component: {fileID: 1101848055}
- component: {fileID: 1101848054}
- component: {fileID: 1101848053}
m_Layer: 0
m_Name: Wall (3)
m_TagString: wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1101848052
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1101848051}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1.5, z: 25}
m_LocalScale: {x: 20, y: 4, z: 0.5}
m_Children: []
m_Father: {fileID: 139180208}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1101848055
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1101848051}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1101848054
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1101848051}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1101848053
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1101848051}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &1877223444
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1877223448}
- component: {fileID: 1877223447}
- component: {fileID: 1877223446}
- component: {fileID: 1877223445}
m_Layer: 0
m_Name: Wall
m_TagString: wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1877223448
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1877223444}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -9.75, y: 1.5, z: 0}
m_LocalScale: {x: 0.5, y: 4, z: 50}
m_Children: []
m_Father: {fileID: 139180208}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1877223447
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1877223444}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1877223446
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1877223444}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1877223445
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1877223444}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &1901930592
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1901930596}
- component: {fileID: 1901930595}
- component: {fileID: 1901930594}
- component: {fileID: 1901930593}
m_Layer: 0
m_Name: Wall (2)
m_TagString: wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1901930596
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1901930592}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1.5, z: -25}
m_LocalScale: {x: 20, y: 4, z: 0.5}
m_Children: []
m_Father: {fileID: 139180208}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1901930595
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1901930592}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1901930594
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1901930592}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1901930593
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1901930592}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &1046873139535794
GameObject:
m_ObjectHideFlags: 0

m_Children:
- {fileID: 4550696105768750}
m_Father: {fileID: 4726744827719472}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33368765186644042
MeshFilter:

m_Children:
- {fileID: 4636946730449310}
m_Father: {fileID: 4726744827719472}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33644261660755068
MeshFilter:

m_Children:
- {fileID: 4554881122711646}
m_Father: {fileID: 4726744827719472}
m_RootOrder: 6
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33239636981323174
MeshFilter:

- {fileID: 4752404825858662}
- {fileID: 4485815012731950}
m_Father: {fileID: 4726744827719472}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &65639693558106190
BoxCollider:

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

m_UseChildActuators: 1
m_ObservableAttributeHandling: 0
--- !u!114 &114286701363010626
MonoBehaviour:
m_ObjectHideFlags: 0

agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 3000
MaxStep: 3000
ground: {fileID: 1510027348950282}
area: {fileID: 1745841960385024}
symbolOGoal: {fileID: 1410733827718496}

m_EditorClassIdentifier:
DecisionPeriod: 6
TakeActionsBetweenDecisions: 1
offsetStep: 0
--- !u!114 &3959905707628515947
MonoBehaviour:
m_ObjectHideFlags: 0

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

m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
m_Children: []
m_Father: {fileID: 4726744827719472}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33805377152746384
MeshFilter:

serializedVersion: 2
m_Size: {x: 2000, y: 100, z: 5000}
m_Center: {x: -1.5001221, y: -50, z: 0}
--- !u!1 &1533322278349912
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4835292705109926}
- component: {fileID: 33154046133733934}
- component: {fileID: 23977612469543640}
- component: {fileID: 64424740271835272}
m_Layer: 0
m_Name: Walls
m_TagString: wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &4835292705109926
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1533322278349912}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.01499878, y: -0.5, z: 0}
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
m_Children: []
m_Father: {fileID: 4726744827719472}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33154046133733934
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}