Ervin Teng
4 年前
当前提交
f409c40c
共有 250 个文件被更改,包括 4552 次插入 和 1343 次删除
-
3.github/workflows/pytest.yml
-
3.pre-commit-config.yaml
-
2.yamato/com.unity.ml-agents-test.yml
-
16DevProject/Packages/manifest.json
-
42DevProject/ProjectSettings/ProjectSettings.asset
-
4DevProject/ProjectSettings/ProjectVersion.txt
-
929Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab
-
935Project/Assets/ML-Agents/Examples/Soccer/Prefabs/StrikersVsGoalieField.prefab
-
22Project/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity
-
1Project/Assets/ML-Agents/Examples/Soccer/Scenes/StrikersVsGoalie.unity
-
2Project/Assets/ML-Agents/Examples/Sorter/Prefabs/Area.prefab
-
4Project/Packages/manifest.json
-
2Project/ProjectSettings/ProjectVersion.txt
-
126com.unity.ml-agents.extensions/Documentation~/Grid-Sensor.md
-
13com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md
-
3com.unity.ml-agents.extensions/Runtime/Unity.ML-Agents.Extensions.asmdef
-
2com.unity.ml-agents.extensions/package.json
-
8com.unity.ml-agents/CHANGELOG.md
-
8com.unity.ml-agents/Documentation~/com.unity.ml-agents.md
-
10com.unity.ml-agents/Runtime/Academy.cs
-
45com.unity.ml-agents/Runtime/Actuators/ActionSpec.cs
-
12com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs
-
10com.unity.ml-agents/Runtime/Actuators/VectorActuator.cs
-
27com.unity.ml-agents/Runtime/Agent.cs
-
8com.unity.ml-agents/Runtime/Agent.deprecated.cs
-
3com.unity.ml-agents/Runtime/Analytics/Events.cs
-
1com.unity.ml-agents/Runtime/AssemblyInfo.cs
-
49com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
-
28com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
-
2com.unity.ml-agents/Tests/Editor/Analytics/InferenceAnalyticsTests.cs
-
46com.unity.ml-agents/Tests/Editor/BehaviorParameterTests.cs
-
12com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs
-
4com.unity.ml-agents/package.json
-
6config/imitation/CrawlerStatic.yaml
-
6config/imitation/FoodCollector.yaml
-
3config/imitation/Hallway.yaml
-
18config/imitation/PushBlock.yaml
-
4config/imitation/Pyramids.yaml
-
3config/ppo/Pyramids.yaml
-
4config/ppo/PyramidsRND.yaml
-
3config/ppo/VisualPyramids.yaml
-
1config/sac/Pyramids.yaml
-
1config/sac/VisualPyramids.yaml
-
24docs/Installation.md
-
4docs/Learning-Environment-Design-Agents.md
-
2docs/Learning-Environment-Examples.md
-
23docs/ML-Agents-Overview.md
-
6docs/Training-Configuration-File.md
-
2gym-unity/README.md
-
2gym-unity/gym_unity/__init__.py
-
4gym-unity/gym_unity/envs/__init__.py
-
2ml-agents-envs/mlagents_envs/__init__.py
-
8ml-agents/mlagents/plugins/stats_writer.py
-
2ml-agents/mlagents/trainers/__init__.py
-
20ml-agents/mlagents/trainers/settings.py
-
28ml-agents/mlagents/trainers/torch/components/reward_providers/curiosity_reward_provider.py
-
27ml-agents/mlagents/trainers/torch/components/reward_providers/gail_reward_provider.py
-
18ml-agents/mlagents/trainers/torch/components/reward_providers/rnd_reward_provider.py
-
4ml-agents/tests/yamato/standalone_build_tests.py
-
11ml-agents/tests/yamato/yamato_utils.py
-
30.yamato/standalone-build-webgl-test.yml
-
2DevProject/DevProject.sln.DotSettings
-
519DevProject/Packages/packages-lock.json
-
57com.unity.ml-agents.extensions/Documentation~/InputActuatorComponent.md
-
3com.unity.ml-agents.extensions/Editor/Input.meta
-
3com.unity.ml-agents.extensions/Runtime/Input.meta
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input.meta
-
35com.unity.ml-agents/Runtime/Communicator/CommunicatorFactory.cs
-
3com.unity.ml-agents/Runtime/Communicator/CommunicatorFactory.cs.meta
-
143com.unity.ml-agents/Runtime/SimpleMultiAgentGroup.cs
-
11com.unity.ml-agents/Runtime/SimpleMultiAgentGroup.cs.meta
-
40com.unity.ml-agents/Tests/Editor/Actuators/ActionSpecTests.cs
-
3com.unity.ml-agents/Tests/Editor/Actuators/ActionSpecTests.cs.meta
-
120com.unity.ml-agents/Tests/Editor/MultiAgentGroupTests.cs
-
11com.unity.ml-agents/Tests/Editor/MultiAgentGroupTests.cs.meta
-
7DevProject/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json
-
70ML-Agents-Input-Example/.gitignore
-
33ML-Agents-Input-Example/Assets/InputSystem.inputsettings.asset
-
8ML-Agents-Input-Example/Assets/InputSystem.inputsettings.asset.meta
-
8ML-Agents-Input-Example/Assets/ML-Agents.meta
-
8ML-Agents-Input-Example/Assets/ML-Agents/Examples.meta
-
10ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock.meta
-
8ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/Meshes.meta
-
1001ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/Meshes/PushBlockCourt.fbx
-
120ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/Meshes/PushBlockCourt.fbx.meta
-
10ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/Prefabs.meta
-
1001ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab
-
10ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab.meta
|
|||
m_EditorVersion: 2019.4.7f1 |
|||
m_EditorVersionWithRevision: 2019.4.7f1 (e992b1a16e65) |
|||
m_EditorVersion: 2019.4.19f1 |
|||
m_EditorVersionWithRevision: 2019.4.19f1 (ca5b14067cec) |
929
Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
935
Project/Assets/ML-Agents/Examples/Soccer/Prefabs/StrikersVsGoalieField.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
m_EditorVersion: 2018.4.24f1 |
|||
m_EditorVersion: 2018.4.32f1 |
|
|||
# Version of the library that will be used to upload to pypi |
|||
__version__ = "0.24.0.dev0" |
|||
__version__ = "0.25.0.dev0" |
|||
|
|||
# Git tag that will be checked to determine whether to trigger upload to pypi |
|||
__release_tag__ = None |
|
|||
# Version of the library that will be used to upload to pypi |
|||
__version__ = "0.24.0.dev0" |
|||
__version__ = "0.25.0.dev0" |
|||
|
|||
# Git tag that will be checked to determine whether to trigger upload to pypi |
|||
__release_tag__ = None |
|
|||
# Version of the library that will be used to upload to pypi |
|||
__version__ = "0.24.0.dev0" |
|||
__version__ = "0.25.0.dev0" |
|||
|
|||
# Git tag that will be checked to determine whether to trigger upload to pypi |
|||
__release_tag__ = None |
|
|||
{% capture editor_version %}2020.2{% endcapture %} |
|||
test_webgl_standalone_{{ editor_version }}: |
|||
name: Test WebGL Standalone {{ editor_version }} |
|||
agent: |
|||
type: Unity::VM |
|||
image: package-ci/ubuntu:stable |
|||
flavor: b1.large |
|||
variables: |
|||
UNITY_VERSION: {{ editor_version }} |
|||
commands: |
|||
- | |
|||
python3 -m venv venv && source venv/bin/activate |
|||
python -m pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple |
|||
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 {{ editor_version }} -c editor -c WebGL --wait --fast |
|||
python -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=webgl |
|||
|
|||
triggers: |
|||
cancel_old_ci: true |
|||
recurring: |
|||
- branch: master |
|||
frequency: weekly |
|||
artifacts: |
|||
logs: |
|||
paths: |
|||
- "artifacts/standalone_build.txt" |
|||
standalonebuild: |
|||
paths: |
|||
- "artifacts/testPlayer*/**" |
|||
- "artifacts/**/UnityPlayer.so" |
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
|||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RL/@EntryIndexedValue">RL</s:String></wpf:ResourceDictionary> |
|
|||
{ |
|||
"dependencies": { |
|||
"com.unity.2d.sprite": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.2d.tilemap": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.ads": { |
|||
"version": "3.6.1", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ugui": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.analytics": { |
|||
"version": "3.3.5", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ugui": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.barracuda": { |
|||
"version": "1.3.0-preview", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.burst": "1.3.4", |
|||
"com.unity.modules.jsonserialize": "1.0.0", |
|||
"com.unity.modules.imageconversion": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.burst": { |
|||
"version": "1.3.4", |
|||
"depth": 2, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.mathematics": "1.2.1" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.coding": { |
|||
"version": "0.1.0-preview.13", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"nuget.moq": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.collab-proxy": { |
|||
"version": "1.2.16", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ext.nunit": { |
|||
"version": "1.0.6", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ide.rider": { |
|||
"version": "1.1.4", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.test-framework": "1.1.1" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ide.vscode": { |
|||
"version": "1.2.3", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.inputsystem": { |
|||
"version": "1.1.0-preview.3", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.mathematics": { |
|||
"version": "1.2.1", |
|||
"depth": 3, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ml-agents": { |
|||
"version": "file:../../com.unity.ml-agents", |
|||
"depth": 0, |
|||
"source": "local", |
|||
"dependencies": { |
|||
"com.unity.barracuda": "1.3.0-preview", |
|||
"com.unity.modules.imageconversion": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0", |
|||
"com.unity.modules.physics": "1.0.0", |
|||
"com.unity.modules.physics2d": "1.0.0", |
|||
"com.unity.modules.unityanalytics": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.ml-agents.extensions": { |
|||
"version": "file:../../com.unity.ml-agents.extensions", |
|||
"depth": 0, |
|||
"source": "local", |
|||
"dependencies": { |
|||
"com.unity.ml-agents": "1.7.2-preview" |
|||
} |
|||
}, |
|||
"com.unity.multiplayer-hlapi": { |
|||
"version": "1.0.8", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"nuget.mono-cecil": "0.1.6-preview" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.nuget.mono-cecil": { |
|||
"version": "0.1.6-preview.2", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"nuget.mono-cecil": "0.1.6-preview" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.nuget.newtonsoft-json": { |
|||
"version": "2.0.0-preview", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.package-manager-doctools": { |
|||
"version": "1.7.0-preview", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.package-validation-suite": "0.10.0-preview", |
|||
"com.unity.nuget.newtonsoft-json": "2.0.0-preview" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.package-validation-suite": { |
|||
"version": "0.19.0-preview", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.nuget.mono-cecil": "0.1.6-preview.2" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.purchasing": { |
|||
"version": "2.2.1", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ugui": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.settings-manager": { |
|||
"version": "1.0.1", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.test-framework": { |
|||
"version": "1.1.20", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ext.nunit": "1.0.6", |
|||
"com.unity.modules.imgui": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.test-framework.performance": { |
|||
"version": "2.2.0-preview", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.test-framework": "1.1.0", |
|||
"com.unity.nuget.newtonsoft-json": "2.0.0-preview" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.testtools.codecoverage": { |
|||
"version": "1.0.0-pre.3", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.test-framework": "1.0.16", |
|||
"com.unity.settings-manager": "1.0.1" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.textmeshpro": { |
|||
"version": "2.0.1", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ugui": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.timeline": { |
|||
"version": "1.2.12", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ugui": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.ui": "1.0.0", |
|||
"com.unity.modules.imgui": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.xr.legacyinputhelpers": { |
|||
"version": "2.1.7", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.modules.vr": "1.0.0", |
|||
"com.unity.modules.xr": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"nuget.castle-core": { |
|||
"version": "1.0.1", |
|||
"depth": 2, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"nuget.mono-cecil": { |
|||
"version": "0.1.6-preview", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"nuget.moq": { |
|||
"version": "1.0.0", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"nuget.castle-core": "1.0.1" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.modules.ai": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.androidjni": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.animation": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.assetbundle": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.audio": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.cloth": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.director": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.audio": "1.0.0", |
|||
"com.unity.modules.animation": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.imageconversion": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.imgui": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.jsonserialize": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.particlesystem": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.physics": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.physics2d": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.screencapture": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.imageconversion": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.subsystems": { |
|||
"version": "1.0.0", |
|||
"depth": 1, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.jsonserialize": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.terrain": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.terrainphysics": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics": "1.0.0", |
|||
"com.unity.modules.terrain": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.tilemap": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics2d": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.ui": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.uielements": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.imgui": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.umbra": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.unityanalytics": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.unitywebrequest": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.unitywebrequestassetbundle": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.assetbundle": "1.0.0", |
|||
"com.unity.modules.unitywebrequest": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.unitywebrequestaudio": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.audio": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.unitywebrequesttexture": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.imageconversion": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.unitywebrequestwww": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0", |
|||
"com.unity.modules.unitywebrequestaudio": "1.0.0", |
|||
"com.unity.modules.audio": "1.0.0", |
|||
"com.unity.modules.assetbundle": "1.0.0", |
|||
"com.unity.modules.imageconversion": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.vehicles": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.video": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.audio": "1.0.0", |
|||
"com.unity.modules.ui": "1.0.0", |
|||
"com.unity.modules.unitywebrequest": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.vr": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.jsonserialize": "1.0.0", |
|||
"com.unity.modules.physics": "1.0.0", |
|||
"com.unity.modules.xr": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.wind": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.xr": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0", |
|||
"com.unity.modules.subsystems": "1.0.0" |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
# Integration of the Input System Package with ML-Agents |
|||
|
|||
## Overview |
|||
One area we are always trying to improve is getting developers up and running with ML-Agents. With this in mind, |
|||
we have implemented an `InputActuatorComponent`. This component integrates with the |
|||
[Input System Package](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.1/manual/QuickStartGuide.html) |
|||
to set up an action space for your `Agent` based on an `InputActionAsset` that is referenced by the |
|||
`IInputActionAssetProvider` interface, or the `PlayerInput` component that may be living on your player controlled |
|||
`Agent`. This means that if you have code outside of your agent that handles input, you will not need to implement |
|||
the Heuristic function in agent as well. The `InputActuatorComponent` will handle this for you. You can now train and |
|||
run inference on `Agents` with an action space defined by an `InputActionAsset`. |
|||
|
|||
This implementation includes: |
|||
|
|||
* C# `InputActuatorComponent` you can attach to your Agent. |
|||
* Implement the `IInputActionAssetProvider` in the `Componenet` where you handle player input. |
|||
* An example environment where the input handling code is not in the Heuristic function of the Agent subclass. |
|||
|
|||
### Feedback |
|||
We have only implemented a small subset of `InputControl` types that we thought would cover a large portion of what |
|||
most developers would use. Please let us know if you want more control types implemented by posting in the [ML-Agents |
|||
forum.](https://forum.unity.com/forums/ml-agents.453/) |
|||
|
|||
We would also like your feedback on the workflow of integrating this into your games. If you run |
|||
into workflow issues please let us know in the ML-Agents forums, or if you've discovered a bug, |
|||
please file a bug on our GitHub page. |
|||
|
|||
## Getting started |
|||
The C# code for the `InputActuatorComponent` exists inside of the extensions package (com.unity.ml-agents.extensions). A good first step would be to familiarize with the extensions package by reading the document [here](com.unity.ml-agents.extensions.md). The second step would be to take a look at how we have implemented the C# code in the example Input Integration scene (located under ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/). Once you have some familiarity, then the next step would be to add the InputActuatorComponent to your player Agent. The example we have implemented uses C# Events to send information from the Input System. |
|||
|
|||
Additionally, see below for additional technical specifications on the C# code for the InputActuatorComponent. |
|||
|
|||
## Technical specifications for the InputActuatorComponent |
|||
|
|||
### `IInputActionsAssetProvider` Interface |
|||
The `InputActuatorComponent` searches for a `Component` that implements |
|||
`IInputActionAssetProvider` on the `GameObject` they both are attached to. It is important to note |
|||
that if multiple `Components` on your `GameObject` need to access an `InputActionAsset` to handle events, |
|||
they will need to share the same instance of the `InputActionAsset` that is returned from the |
|||
`IInputActionAssetProvider`. |
|||
|
|||
### `InputActuatorComponent` class |
|||
The `InputActuatorComponent` is the bridge between ML-Agents and the Input System.. It allows ML-Agents to |
|||
* create an `ActionSpec` for your Agent based on an `InputActionAsset` that comes from an |
|||
`IInputActionAssetProvider`. |
|||
* send simulated input from a training process or a neural network |
|||
* let developers keep their input handling code in one place |
|||
|
|||
This is accomplished by adding the `InputActuatorComponenet` to an Agent which already has the PlayerInput component attached. |
|||
|
|||
### Setting up a scene using the `InputActuatorComponent` |
|||
1. Add the `com.unity.inputsystem` version 1.1.0-preview.3 or later to your project via the Package Manager window. |
|||
2. If you have already setup an InputActionAsset skip to Step 3, otherwise follow these sub steps: |
|||
1. Create an InputActionAsset to allow your Agent to be controlled by the Input System. |
|||
2. Handle the events from the Input System where you normally would (i.e. a script external to your Agent class). |
|||
3. Add the InputSystemActuatorComponent to the GameObject that has the `PlayerInput` and `Agent` components attached. |
|||
|
|
|||
fileFormatVersion: 2 |
|||
guid: 1f773a20e85042999e87f5d3c7b55281 |
|||
timeCreated: 1613637190 |
|
|||
fileFormatVersion: 2 |
|||
guid: 1694e881b9ec420ba1c201f0612392d6 |
|||
timeCreated: 1610754907 |
|
|||
fileFormatVersion: 2 |
|||
guid: 27f8e1ce37d7485f814ce50a37101203 |
|||
timeCreated: 1612908869 |
|
|||
namespace Unity.MLAgents |
|||
{ |
|||
/// <summary>
|
|||
/// Factory class for an ICommunicator instance. This is used to the <see cref="Academy"/> at startup.
|
|||
/// By default, on desktop platforms, an ICommunicator will be created and attempt to connect
|
|||
/// to a trainer. This behavior can be prevented by setting <see cref="CommunicatorFactory.Enabled"/> to false
|
|||
/// *before* the <see cref="Academy"/> is initialized.
|
|||
/// </summary>
|
|||
public static class CommunicatorFactory |
|||
{ |
|||
static bool s_Enabled = true; |
|||
|
|||
/// <summary>
|
|||
/// Whether or not an ICommunicator instance will be created when the <see cref="Academy"/> is initialized.
|
|||
/// Changing this has no effect after the <see cref="Academy"/> has already been initialized.
|
|||
/// </summary>
|
|||
public static bool Enabled |
|||
{ |
|||
get => s_Enabled; |
|||
set => s_Enabled = value; |
|||
} |
|||
|
|||
internal static ICommunicator Create() |
|||
{ |
|||
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
|
|||
if (s_Enabled) |
|||
{ |
|||
return new RpcCommunicator(); |
|||
} |
|||
#endif
|
|||
// Non-desktop or disabled
|
|||
return null; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0b604cddc07e4484a2cdaba630a971ea |
|||
timeCreated: 1613617949 |
|
|||
using System; |
|||
using System.Linq; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Unity.MLAgents |
|||
{ |
|||
/// <summary>
|
|||
/// A basic class implementation of MultiAgentGroup.
|
|||
/// </summary>
|
|||
internal class SimpleMultiAgentGroup : IMultiAgentGroup, IDisposable |
|||
{ |
|||
readonly int m_Id = MultiAgentGroupIdCounter.GetGroupId(); |
|||
HashSet<Agent> m_Agents = new HashSet<Agent>(); |
|||
|
|||
|
|||
public virtual void Dispose() |
|||
{ |
|||
while (m_Agents.Count > 0) |
|||
{ |
|||
UnregisterAgent(m_Agents.First()); |
|||
} |
|||
} |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual void RegisterAgent(Agent agent) |
|||
{ |
|||
if (!m_Agents.Contains(agent)) |
|||
{ |
|||
agent.SetMultiAgentGroup(this); |
|||
m_Agents.Add(agent); |
|||
agent.OnAgentDisabled += UnregisterAgent; |
|||
} |
|||
} |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual void UnregisterAgent(Agent agent) |
|||
{ |
|||
if (m_Agents.Contains(agent)) |
|||
{ |
|||
agent.SetMultiAgentGroup(null); |
|||
m_Agents.Remove(agent); |
|||
agent.OnAgentDisabled -= UnregisterAgent; |
|||
} |
|||
} |
|||
|
|||
/// <inheritdoc />
|
|||
public int GetId() |
|||
{ |
|||
return m_Id; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Get list of all agents currently registered to this MultiAgentGroup.
|
|||
/// </summary>
|
|||
/// <returns>
|
|||
/// List of agents registered to the MultiAgentGroup.
|
|||
/// </returns>
|
|||
public IReadOnlyCollection<Agent> GetRegisteredAgents() |
|||
{ |
|||
return (IReadOnlyCollection<Agent>)m_Agents; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Increments the group rewards for all agents in this MultiAgentGroup.
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// This function increases or decreases the group rewards by a given amount for all agents
|
|||
/// in the group. Use <see cref="SetGroupReward(float)"/> to set the group reward assigned
|
|||
/// to the current step with a specific value rather than increasing or decreasing it.
|
|||
///
|
|||
/// A positive group reward indicates the whole group's accomplishments or desired behaviors.
|
|||
/// Every agent in the group will receive the same group reward no matter whether the
|
|||
/// agent's act directly leads to the reward. Group rewards are meant to reinforce agents
|
|||
/// to act in the group's best interest instead of individual ones.
|
|||
/// Group rewards are treated differently than individual agent rewards during training, so
|
|||
/// calling AddGroupReward() is not equivalent to calling agent.AddReward() on each agent in the group.
|
|||
/// </remarks>
|
|||
/// <param name="reward">Incremental group reward value.</param>
|
|||
public void AddGroupReward(float reward) |
|||
{ |
|||
foreach (var agent in m_Agents) |
|||
{ |
|||
agent.AddGroupReward(reward); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Set the group rewards for all agents in this MultiAgentGroup.
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// This function replaces any group rewards given during the current step for all agents in the group.
|
|||
/// Use <see cref="AddGroupReward(float)"/> to incrementally change the group reward rather than
|
|||
/// overriding it.
|
|||
///
|
|||
/// A positive group reward indicates the whole group's accomplishments or desired behaviors.
|
|||
/// Every agent in the group will receive the same group reward no matter whether the
|
|||
/// agent's act directly leads to the reward. Group rewards are meant to reinforce agents
|
|||
/// to act in the group's best interest instead of indivisual ones.
|
|||
/// Group rewards are treated differently than individual agent rewards during training, so
|
|||
/// calling SetGroupReward() is not equivalent to calling agent.SetReward() on each agent in the group.
|
|||
/// </remarks>
|
|||
/// <param name="reward">The new value of the group reward.</param>
|
|||
public void SetGroupReward(float reward) |
|||
{ |
|||
foreach (var agent in m_Agents) |
|||
{ |
|||
agent.SetGroupReward(reward); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// End episodes for all agents in this MultiAgentGroup.
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// This should be used when the episode can no longer continue, such as when the group
|
|||
/// reaches the goal or fails at the task.
|
|||
/// </remarks>
|
|||
public void EndGroupEpisode() |
|||
{ |
|||
foreach (var agent in m_Agents) |
|||
{ |
|||
agent.EndEpisode(); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Indicate that the episode is over but not due to the "fault" of the group.
|
|||
/// This has the same end result as calling <see cref="EndGroupEpisode"/>, but has a
|
|||
/// slightly different effect on training.
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// This should be used when the episode could continue, but has gone on for
|
|||
/// a sufficient number of steps, such as if the environment hits some maximum number of steps.
|
|||
/// </remarks>
|
|||
public void GroupEpisodeInterrupted() |
|||
{ |
|||
foreach (var agent in m_Agents) |
|||
{ |
|||
agent.EpisodeInterrupted(); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 3454e3c3c70964dca93b63ee4b650095 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using NUnit.Framework; |
|||
using Unity.MLAgents.Actuators; |
|||
using UnityEngine.TestTools.Constraints; |
|||
using Is = UnityEngine.TestTools.Constraints.Is; |
|||
|
|||
namespace Unity.MLAgents.Tests.Actuators |
|||
{ |
|||
[TestFixture] |
|||
public class ActionSpecTests |
|||
{ |
|||
[Test] |
|||
public void ActionSpecCombineTest() |
|||
{ |
|||
var as0 = new ActionSpec(3, new[] { 3, 2, 1 }); |
|||
var as1 = new ActionSpec(1, new[] { 35, 122, 1, 3, 8, 3 }); |
|||
|
|||
var as0NumCon = 3; |
|||
var as0NumDis = as0.NumDiscreteActions; |
|||
var as1NumCon = 1; |
|||
var as1NumDis = as1.NumDiscreteActions; |
|||
var branchSizes = new List<int>(); |
|||
branchSizes.AddRange(as0.BranchSizes); |
|||
branchSizes.AddRange(as1.BranchSizes); |
|||
|
|||
var asc = ActionSpec.Combine(as0, as1); |
|||
|
|||
Assert.AreEqual(as0NumCon + as1NumCon, asc.NumContinuousActions); |
|||
Assert.AreEqual(as0NumDis + as1NumDis, asc.NumDiscreteActions); |
|||
Assert.IsTrue(branchSizes.ToArray().SequenceEqual(asc.BranchSizes)); |
|||
|
|||
as0 = new ActionSpec(3); |
|||
as1 = new ActionSpec(1); |
|||
asc = ActionSpec.Combine(as0, as1); |
|||
Assert.IsEmpty(asc.BranchSizes); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 99d76ec04c944b75bc6b85abfff4ac4e |
|||
timeCreated: 1613680505 |
|
|||
using Unity.MLAgents; |
|||
using System; |
|||
using System.Reflection; |
|||
using NUnit.Framework; |
|||
using UnityEngine; |
|||
using Unity; |
|||
|
|||
namespace Unity.MLAgents.Tests |
|||
{ |
|||
public class MultiAgentGroupTests |
|||
{ |
|||
class TestAgent : Agent |
|||
{ |
|||
internal int _GroupId |
|||
{ |
|||
get |
|||
{ |
|||
return (int)typeof(Agent).GetField("m_GroupId", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this); |
|||
} |
|||
} |
|||
|
|||
internal float _GroupReward |
|||
{ |
|||
get |
|||
{ |
|||
return (float)typeof(Agent).GetField("m_GroupReward", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this); |
|||
} |
|||
} |
|||
|
|||
internal Action<Agent> _OnAgentDisabledActions |
|||
{ |
|||
get |
|||
{ |
|||
return (Action<Agent>)typeof(Agent).GetField("OnAgentDisabled", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this); |
|||
} |
|||
} |
|||
} |
|||
|
|||
[Test] |
|||
public void TestRegisteredAgentGroupId() |
|||
{ |
|||
var agentGo = new GameObject("TestAgent"); |
|||
agentGo.AddComponent<TestAgent>(); |
|||
var agent = agentGo.GetComponent<TestAgent>(); |
|||
|
|||
// test register
|
|||
SimpleMultiAgentGroup agentGroup1 = new SimpleMultiAgentGroup(); |
|||
agentGroup1.RegisterAgent(agent); |
|||
Assert.AreEqual(agentGroup1.GetId(), agent._GroupId); |
|||
Assert.IsNotNull(agent._OnAgentDisabledActions); |
|||
|
|||
// should not be able to registered to multiple groups
|
|||
SimpleMultiAgentGroup agentGroup2 = new SimpleMultiAgentGroup(); |
|||
Assert.Throws<UnityAgentsException>( |
|||
() => agentGroup2.RegisterAgent(agent)); |
|||
Assert.AreEqual(agentGroup1.GetId(), agent._GroupId); |
|||
|
|||
// test unregister
|
|||
agentGroup1.UnregisterAgent(agent); |
|||
Assert.AreEqual(0, agent._GroupId); |
|||
Assert.IsNull(agent._OnAgentDisabledActions); |
|||
|
|||
// test register to another group after unregister
|
|||
agentGroup2.RegisterAgent(agent); |
|||
Assert.AreEqual(agentGroup2.GetId(), agent._GroupId); |
|||
Assert.IsNotNull(agent._OnAgentDisabledActions); |
|||
} |
|||
|
|||
[Test] |
|||
public void TestRegisterMultipleAgent() |
|||
{ |
|||
var agentGo1 = new GameObject("TestAgent"); |
|||
agentGo1.AddComponent<TestAgent>(); |
|||
var agent1 = agentGo1.GetComponent<TestAgent>(); |
|||
var agentGo2 = new GameObject("TestAgent"); |
|||
agentGo2.AddComponent<TestAgent>(); |
|||
var agent2 = agentGo2.GetComponent<TestAgent>(); |
|||
|
|||
SimpleMultiAgentGroup agentGroup = new SimpleMultiAgentGroup(); |
|||
agentGroup.RegisterAgent(agent1); // register
|
|||
Assert.AreEqual(agentGroup.GetRegisteredAgents().Count, 1); |
|||
agentGroup.UnregisterAgent(agent2); // unregister non-member agent
|
|||
Assert.AreEqual(agentGroup.GetRegisteredAgents().Count, 1); |
|||
agentGroup.UnregisterAgent(agent1); // unregister
|
|||
Assert.AreEqual(agentGroup.GetRegisteredAgents().Count, 0); |
|||
agentGroup.RegisterAgent(agent1); |
|||
agentGroup.RegisterAgent(agent1); // duplicated register
|
|||
Assert.AreEqual(agentGroup.GetRegisteredAgents().Count, 1); |
|||
agentGroup.RegisterAgent(agent2); // register another
|
|||
Assert.AreEqual(agentGroup.GetRegisteredAgents().Count, 2); |
|||
|
|||
// test add/set group rewards
|
|||
agentGroup.AddGroupReward(0.1f); |
|||
Assert.AreEqual(0.1f, agent1._GroupReward); |
|||
agentGroup.AddGroupReward(0.5f); |
|||
Assert.AreEqual(0.6f, agent1._GroupReward); |
|||
agentGroup.SetGroupReward(0.3f); |
|||
Assert.AreEqual(0.3f, agent1._GroupReward); |
|||
// unregistered agent should not receive group reward
|
|||
agentGroup.UnregisterAgent(agent1); |
|||
agentGroup.AddGroupReward(0.2f); |
|||
Assert.AreEqual(0.3f, agent1._GroupReward); |
|||
Assert.AreEqual(0.5f, agent2._GroupReward); |
|||
|
|||
// dispose group should automatically unregister all
|
|||
agentGroup.Dispose(); |
|||
Assert.AreEqual(0, agent1._GroupId); |
|||
Assert.AreEqual(0, agent2._GroupId); |
|||
} |
|||
|
|||
[Test] |
|||
public void TestGroupIdCounter() |
|||
{ |
|||
SimpleMultiAgentGroup group1 = new SimpleMultiAgentGroup(); |
|||
SimpleMultiAgentGroup group2 = new SimpleMultiAgentGroup(); |
|||
// id should be unique
|
|||
Assert.AreNotEqual(group1.GetId(), group2.GetId()); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ef0158fde748d478ca5ee3bbe22a4c9e |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
{ |
|||
"m_Name": "Settings", |
|||
"m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json", |
|||
"m_Dictionary": { |
|||
"m_DictionaryValues": [] |
|||
} |
|||
} |
|
|||
/[Ll]ibrary/ |
|||
/Logs/ |
|||
/[Tt]emp/ |
|||
/[Oo]bj/ |
|||
/[Bb]uild/ |
|||
/[Bb]uilds/ |
|||
/Assets/AssetStoreTools* |
|||
/Assets/Plugins* |
|||
/Assets/Demonstrations* |
|||
/Assets/ML-Agents/Timers* |
|||
/*_timers.json |
|||
|
|||
# Environemnt logfile |
|||
*Project.log |
|||
|
|||
# Visual Studio 2015 cache directory |
|||
/.vs/ |
|||
|
|||
# Autogenerated VS/MD/Consulo solution and project files |
|||
/ProjectExportedObj/ |
|||
/Project.consulo/ |
|||
*.csproj |
|||
*.unityproj |
|||
*.sln |
|||
*.suo |
|||
*.tmp |
|||
*.user |
|||
*.userprefs |
|||
*.pidb |
|||
*.booproj |
|||
*.svd |
|||
*.pdb |
|||
|
|||
# Unity3D generated meta files |
|||
*.pidb.meta |
|||
|
|||
# Unity3D Generated File On Crash Reports |
|||
/sysinfo.txt |
|||
|
|||
# Builds |
|||
*.apk |
|||
*.unitypackage |
|||
*.app |
|||
*.exe |
|||
*.x86_64 |
|||
*.x86 |
|||
|
|||
# Plugins |
|||
/Assets/VideoRecorder* |
|||
|
|||
# Mac hidden files |
|||
*.DS_Store |
|||
*/.ipynb_checkpoints |
|||
*/.idea |
|||
*.pyc |
|||
*.idea/misc.xml |
|||
*.idea/modules.xml |
|||
*.idea/ |
|||
*.iml |
|||
*.cache |
|||
*/build/ |
|||
*/dist/ |
|||
*.egg-info* |
|||
*.eggs* |
|||
*.gitignore.swp |
|||
|
|||
# VSCode hidden files |
|||
*.vscode/ |
|||
|
|||
.DS_Store |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3} |
|||
m_Name: InputSystem.inputsettings |
|||
m_EditorClassIdentifier: |
|||
m_SupportedDevices: |
|||
- Keyboard |
|||
- Gamepad |
|||
m_UpdateMode: 2 |
|||
m_CompensateForScreenOrientation: 0 |
|||
m_FilterNoiseOnCurrent: 0 |
|||
m_DefaultDeadzoneMin: 0.125 |
|||
m_DefaultDeadzoneMax: 0.925 |
|||
m_DefaultButtonPressPoint: 0.5 |
|||
m_ButtonReleaseThreshold: 0.75 |
|||
m_DefaultTapTime: 0.2 |
|||
m_DefaultSlowTapTime: 0.5 |
|||
m_DefaultHoldTime: 0.4 |
|||
m_TapRadius: 5 |
|||
m_MultiTapDelayTime: 0.75 |
|||
m_iOSSettings: |
|||
m_MotionUsage: |
|||
m_Enabled: 0 |
|||
m_Description: |
|
|||
fileFormatVersion: 2 |
|||
guid: 778a63fac82734ee1b70a0b7c3e975c0 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 11630fa83cc8b4194b94352e3e6cdb9d |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 6584f096f53dc43eeb32803b91f36c5c |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 4197ece8ca6d74a00adc6bafbabda158 |
|||
folderAsset: yes |
|||
timeCreated: 1506303336 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: e806d68316eff0e46a3fda372ae42c44 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/Meshes/PushBlockCourt.fbx
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: c639386c12f5f7841892163a199dfacc |
|||
ModelImporter: |
|||
serializedVersion: 22 |
|||
fileIDToRecycleName: |
|||
100000: GoalArea |
|||
100002: Ground |
|||
100004: //RootNode |
|||
100006: WallsOuter |
|||
400000: GoalArea |
|||
400002: Ground |
|||
400004: //RootNode |
|||
400006: WallsOuter |
|||
2100000: rep_WhiteWalls |
|||
2100002: rep_Floor |
|||
2100004: rep_Checkers |
|||
2300000: GoalArea |
|||
2300002: Ground |
|||
2300004: WallsOuter |
|||
3300000: GoalArea |
|||
3300002: Ground |
|||
3300004: WallsOuter |
|||
4300000: WallsOuter |
|||
4300002: Ground |
|||
4300004: GoalArea |
|||
externalObjects: |
|||
- first: |
|||
type: UnityEngine:Material |
|||
assembly: UnityEngine.CoreModule |
|||
name: rep_Checkers |
|||
second: {fileID: 2100000, guid: 36c7baa347d68f347a9aa9698aa1bcdd, type: 2} |
|||
- first: |
|||
type: UnityEngine:Material |
|||
assembly: UnityEngine.CoreModule |
|||
name: rep_Floor |
|||
second: {fileID: 2100000, guid: bc723809e6ff3174fad3e774cae1aed0, type: 2} |
|||
- first: |
|||
type: UnityEngine:Material |
|||
assembly: UnityEngine.CoreModule |
|||
name: rep_WhiteWalls |
|||
second: {fileID: 2100000, guid: 6a39c0407dd85684384bf0277294e9b6, type: 2} |
|||
materials: |
|||
importMaterials: 1 |
|||
materialName: 0 |
|||
materialSearch: 1 |
|||
materialLocation: 1 |
|||
animations: |
|||
legacyGenerateAnimations: 4 |
|||
bakeSimulation: 0 |
|||
resampleCurves: 1 |
|||
optimizeGameObjects: 0 |
|||
motionNodeName: |
|||
rigImportErrors: |
|||
rigImportWarnings: |
|||
animationImportErrors: |
|||
animationImportWarnings: |
|||
animationRetargetingWarnings: |
|||
animationDoRetargetingWarnings: 0 |
|||
importAnimatedCustomProperties: 0 |
|||
animationCompression: 1 |
|||
animationRotationError: 0.5 |
|||
animationPositionError: 0.5 |
|||
animationScaleError: 0.5 |
|||
animationWrapMode: 0 |
|||
extraExposedTransformPaths: [] |
|||
extraUserProperties: [] |
|||
clipAnimations: [] |
|||
isReadable: 1 |
|||
meshes: |
|||
lODScreenPercentages: [] |
|||
globalScale: 1 |
|||
meshCompression: 0 |
|||
addColliders: 0 |
|||
importVisibility: 1 |
|||
importBlendShapes: 1 |
|||
importCameras: 1 |
|||
importLights: 1 |
|||
swapUVChannels: 0 |
|||
generateSecondaryUV: 1 |
|||
useFileUnits: 1 |
|||
optimizeMeshForGPU: 1 |
|||
keepQuads: 0 |
|||
weldVertices: 1 |
|||
preserveHierarchy: 0 |
|||
indexFormat: 0 |
|||
secondaryUVAngleDistortion: 8 |
|||
secondaryUVAreaDistortion: 15.000001 |
|||
secondaryUVHardAngle: 88 |
|||
secondaryUVPackMargin: 4 |
|||
useFileScale: 1 |
|||
tangentSpace: |
|||
normalSmoothAngle: 60 |
|||
normalImportMode: 0 |
|||
tangentImportMode: 3 |
|||
normalCalculationMode: 4 |
|||
importAnimation: 1 |
|||
copyAvatar: 0 |
|||
humanDescription: |
|||
serializedVersion: 2 |
|||
human: [] |
|||
skeleton: [] |
|||
armTwist: 0.5 |
|||
foreArmTwist: 0.5 |
|||
upperLegTwist: 0.5 |
|||
legTwist: 0.5 |
|||
armStretch: 0.05 |
|||
legStretch: 0.05 |
|||
feetSpacing: 0 |
|||
rootMotionBoneName: |
|||
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
hasTranslationDoF: 0 |
|||
hasExtraRoot: 0 |
|||
skeletonHasParents: 1 |
|||
lastHumanDescriptionAvatarSource: {instanceID: 0} |
|||
animationType: 0 |
|||
humanoidOversampling: 1 |
|||
additionalBone: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 3d2b9d5547d934200a786212743850c4 |
|||
folderAsset: yes |
|||
timeCreated: 1514922259 |
|||
licenseType: Free |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 03bcc81e249714a22bb411dddcc5d15e |
|||
timeCreated: 1515023875 |
|||
licenseType: Free |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 100100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue