diff --git a/.github/workflows/publish_pypi.yaml b/.github/workflows/publish_pypi.yaml
index a6f5f06455..2a00b82a89 100644
--- a/.github/workflows/publish_pypi.yaml
+++ b/.github/workflows/publish_pypi.yaml
@@ -35,7 +35,7 @@ jobs:
python setup.py bdist_wheel
- name: Publish distribution 📦 to Test PyPI
if: startsWith(github.ref, 'refs/tags') && contains(github.ref, 'test')
- uses: pypa/gh-action-pypi-publish@master
+ uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_url: https://test.pypi.org/legacy/
diff --git a/.yamato/pytest-gpu.yml b/.yamato/pytest-gpu.yml
index 291cbf8207..c6cb72c509 100644
--- a/.yamato/pytest-gpu.yml
+++ b/.yamato/pytest-gpu.yml
@@ -2,7 +2,7 @@ pytest_gpu:
name: Pytest GPU
agent:
type: Unity::VM::GPU
- image: ml-agents/ml-agents-ubuntu-18.04:latest
+ image: ml-agents/ubuntu-ci:v1.0.0
flavor: b1.large
commands:
- |
diff --git a/.yamato/standalone-build-test.yml b/.yamato/standalone-build-test.yml
index 733c9ea5c9..e56ab1d3f3 100644
--- a/.yamato/standalone-build-test.yml
+++ b/.yamato/standalone-build-test.yml
@@ -5,7 +5,7 @@ test_linux_standalone_{{ editor.version }}_{{ editor.extra_test }}:
name: Test Linux Standalone {{ editor.version }} {{ editor.extra_test }}
agent:
type: Unity::VM
- image: ml-agents/ml-agents-ubuntu-18.04:latest
+ image: ml-agents/ubuntu-ci:v1.0.0
flavor: b1.large
variables:
UNITY_VERSION: {{ editor.version }}
diff --git a/.yamato/wrench/api-validation-jobs.yml b/.yamato/wrench/api-validation-jobs.yml
new file mode 100644
index 0000000000..0151a4827a
--- /dev/null
+++ b/.yamato/wrench/api-validation-jobs.yml
@@ -0,0 +1,47 @@
+# Auto-generated by Recipe Engine, do not modify manually.
+# This job is generated by the wrench recipe engine module, see find the docs here: .
+
+# upm-ci validation tests for API Validation - ml-agents - 2023.2 - windows (2023.2 - Windows).
+api_validation_-_ml-agents_-_2023_2_-_windows:
+ name: API Validation - ml-agents - 2023.2 - windows
+ agent:
+ image: package-ci/win10:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl %WRENCH_LOCAL_APV_DOWNLOAD_URL% -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
+ timeout: 20
+ retries: 10
+ - command: unity-downloader-cli -u 2023.2 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: python PythonScripts/PackageJsonCondersor.py
+ timeout: 1
+ retries: 0
+ - command: upm-ci package test -u .Editor --package-path com.unity.ml-agents --type vetting-tests || exit 0
+ timeout: 30
+ retries: 0
+ - command: python PythonScripts/parse_upm_ci_results.py --package-path=com.unity.ml-agents
+ timeout: 2
+ retries: 0
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ packages:
+ paths:
+ - upm-ci~/**/*
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ triggers:
+ expression: push.branch match "^release/.*"
+ cancel_old_ci: true
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+
diff --git a/.yamato/wrench/package-pack-jobs.yml b/.yamato/wrench/package-pack-jobs.yml
new file mode 100644
index 0000000000..aad709d94a
--- /dev/null
+++ b/.yamato/wrench/package-pack-jobs.yml
@@ -0,0 +1,32 @@
+# Auto-generated by Recipe Engine, do not modify manually.
+# This job is generated by the wrench recipe engine module, see find the docs here: .
+
+# Pack and Sign ML Agents
+package_pack_-_ml-agents:
+ name: Package Pack - ml-agents
+ agent:
+ image: package-ci/ubuntu-20.04:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
+ timeout: 20
+ retries: 10
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: upm-ci package pack --package-path com.unity.ml-agents
+ - command: cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.ml-agents_packages.json
+ artifacts:
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ variables:
+ UPMCI_ACK_LARGE_PACKAGE: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+
+
+
diff --git a/.yamato/wrench/preview-a-p-v.yml b/.yamato/wrench/preview-a-p-v.yml
new file mode 100644
index 0000000000..b94446d55b
--- /dev/null
+++ b/.yamato/wrench/preview-a-p-v.yml
@@ -0,0 +1,164 @@
+# Auto-generated by Recipe Engine, do not modify manually.
+# This job is generated by the wrench recipe engine module, see find the docs here: .
+
+# Parent Preview APV Job.
+all_preview_apv_jobs:
+ name: All Preview APV Jobs
+ dependencies:
+ - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_0_-_macos
+ - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_0_-_ubuntu
+ - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_0_-_windows
+ triggers:
+ expression: push.branch match "^release/.*"
+ cancel_old_ci: true
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+
+# Functional tests for dependents found in the latest 6000.0 manifest (MacOS).
+preview_apv_-_6000_0_-_macos:
+ name: Preview APV - 6000.0 - macos
+ agent:
+ image: package-ci/macos-13:default
+ type: Unity::VM::osx
+ flavor: b1.xlarge
+ commands:
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
+ timeout: 20
+ retries: 10
+ - command: unity-downloader-cli -u 6000.0 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.0 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~
+ - command: echo 'Skipping Editor Manifest Validator as it is only supported on Windows'
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ logs:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - upm-ci~/test-results/**/*
+ - upm-ci~/temp/*/Logs/**
+ - upm-ci~/temp/*/Library/*.log
+ - upm-ci~/temp/*/*.log
+ - upm-ci~/temp/Builds/*.log
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ PreviewAPVResults:
+ paths:
+ - PreviewApvArtifacts~/**
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+
+# Functional tests for dependents found in the latest 6000.0 manifest (Ubuntu).
+preview_apv_-_6000_0_-_ubuntu:
+ name: Preview APV - 6000.0 - ubuntu
+ agent:
+ image: package-ci/ubuntu-20.04:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
+ timeout: 20
+ retries: 10
+ - command: unity-downloader-cli -u 6000.0 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.0 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~
+ - command: echo 'Skipping Editor Manifest Validator as it is only supported on Windows'
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ logs:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - upm-ci~/test-results/**/*
+ - upm-ci~/temp/*/Logs/**
+ - upm-ci~/temp/*/Library/*.log
+ - upm-ci~/temp/*/*.log
+ - upm-ci~/temp/Builds/*.log
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ PreviewAPVResults:
+ paths:
+ - PreviewApvArtifacts~/**
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+
+# Functional tests for dependents found in the latest 6000.0 manifest (Windows).
+preview_apv_-_6000_0_-_windows:
+ name: Preview APV - 6000.0 - windows
+ agent:
+ image: package-ci/win10:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl %WRENCH_LOCAL_APV_DOWNLOAD_URL% -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
+ timeout: 20
+ retries: 10
+ - command: unity-downloader-cli -u 6000.0 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.0 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~
+ - command: python PythonScripts/editor_manifest_validator.py --version=6000.0 --wrench-config=.yamato/wrench/wrench_config.json
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ logs:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - upm-ci~/test-results/**/*
+ - upm-ci~/temp/*/Logs/**
+ - upm-ci~/temp/*/Library/*.log
+ - upm-ci~/temp/*/*.log
+ - upm-ci~/temp/Builds/*.log
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ PreviewAPVResults:
+ paths:
+ - PreviewApvArtifacts~/**
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+
diff --git a/.yamato/wrench/promotion-jobs.yml b/.yamato/wrench/promotion-jobs.yml
new file mode 100644
index 0000000000..6a19462cfd
--- /dev/null
+++ b/.yamato/wrench/promotion-jobs.yml
@@ -0,0 +1,152 @@
+# Auto-generated by Recipe Engine, do not modify manually.
+# This job is generated by the wrench recipe engine module, see find the docs here: .
+
+# Publish Dry Run for ml-agents to https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-npm
+publish_dry_run_ml-agents:
+ name: Publish Dry Run ml-agents
+ agent:
+ image: package-ci/ubuntu-20.04:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: upm-pvp publish --packages "upm-ci~/packages/*.tgz" --evidence results --dry-run
+ artifacts:
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_2023_2_-_macos
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-2023.2-macos
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-2023.2-macos
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_2023_2_-_ubuntu
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-2023.2-ubuntu
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-2023.2-ubuntu
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_2023_2_-_windows
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-2023.2-windows
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-2023.2-windows
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_6000_0_-_macos
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-6000.0-macos
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-6000.0-macos
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_6000_0_-_ubuntu
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-6000.0-ubuntu
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-6000.0-ubuntu
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_6000_0_-_windows
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-6000.0-windows
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-6000.0-windows
+ unzip: true
+ variables:
+ UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ triggers:
+ expression: push.branch match "^release/.*"
+ cancel_old_ci: true
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+
+# Publish for ml-agents to https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-npm
+publish_ml-agents:
+ name: Publish ml-agents
+ agent:
+ image: package-ci/ubuntu-20.04:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: python PythonScripts/ignore_existing_package_failure.py
+ artifacts:
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_2023_2_-_macos
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-2023.2-macos
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-2023.2-macos
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_2023_2_-_ubuntu
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-2023.2-ubuntu
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-2023.2-ubuntu
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_2023_2_-_windows
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-2023.2-windows
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-2023.2-windows
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_6000_0_-_macos
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-6000.0-macos
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-6000.0-macos
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_6000_0_-_ubuntu
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-6000.0-ubuntu
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-6000.0-ubuntu
+ unzip: true
+ - path: .yamato/wrench/validation-jobs.yml#validate_-_ml-agents_-_6000_0_-_windows
+ specific_options:
+ UTR:
+ location: results/UTR/validate-ml-agents-6000.0-windows
+ unzip: true
+ pvp-results:
+ location: results/pvp/validate-ml-agents-6000.0-windows
+ unzip: true
+ variables:
+ UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+
diff --git a/.yamato/wrench/validation-jobs.yml b/.yamato/wrench/validation-jobs.yml
new file mode 100644
index 0000000000..908e1a98f4
--- /dev/null
+++ b/.yamato/wrench/validation-jobs.yml
@@ -0,0 +1,353 @@
+# Auto-generated by Recipe Engine, do not modify manually.
+# This job is generated by the wrench recipe engine module, see find the docs here: .
+
+# PVP Editor and Playmode tests for Validate - ml-agents - 2023.2 - macos (2023.2 - MacOS).
+validate_-_ml-agents_-_2023_2_-_macos:
+ name: Validate - ml-agents - 2023.2 - macos
+ agent:
+ image: package-ci/macos-13:default
+ type: Unity::VM::osx
+ flavor: b1.xlarge
+ commands:
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: unity-downloader-cli -u 2023.2 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: upm-pvp create-test-project test-ml-agents --packages "upm-ci~/packages/*.tgz" --unity .Editor
+ timeout: 10
+ retries: 1
+ - command: echo No internal packages to add.
+ - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp
+ timeout: 20
+ retries: 0
+ - command: upm-pvp require "PVP-160-1" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json
+ timeout: 5
+ retries: 0
+ - command: echo No additional PVP profiles to declared to check.
+ - command: UnifiedTestRunner --testproject=test-ml-agents --editor-location=.Editor --reruncount=1 --clean-library-on-rerun --artifacts_path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}"
+ timeout: 30
+ retries: 1
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ UTR:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - artifacts/**/*
+ - test-ml-agents/Logs/**
+ - test-ml-agents/Library/*.log
+ - test-ml-agents/*.log
+ - test-ml-agents/Builds/*.log
+ - build/test-results/**
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+ labels:
+ - Packages:ml-agents
+
+# PVP Editor and Playmode tests for Validate - ml-agents - 2023.2 - ubuntu (2023.2 - Ubuntu).
+validate_-_ml-agents_-_2023_2_-_ubuntu:
+ name: Validate - ml-agents - 2023.2 - ubuntu
+ agent:
+ image: package-ci/ubuntu-20.04:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: unity-downloader-cli -u 2023.2 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: upm-pvp create-test-project test-ml-agents --packages "upm-ci~/packages/*.tgz" --unity .Editor
+ timeout: 10
+ retries: 1
+ - command: echo No internal packages to add.
+ - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp
+ timeout: 20
+ retries: 0
+ - command: upm-pvp require "PVP-160-1" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json
+ timeout: 5
+ retries: 0
+ - command: echo No additional PVP profiles to declared to check.
+ - command: UnifiedTestRunner --testproject=test-ml-agents --editor-location=.Editor --reruncount=1 --clean-library-on-rerun --artifacts_path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}"
+ timeout: 30
+ retries: 1
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ UTR:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - artifacts/**/*
+ - test-ml-agents/Logs/**
+ - test-ml-agents/Library/*.log
+ - test-ml-agents/*.log
+ - test-ml-agents/Builds/*.log
+ - build/test-results/**
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+ labels:
+ - Packages:ml-agents
+
+# PVP Editor and Playmode tests for Validate - ml-agents - 2023.2 - windows (2023.2 - Windows).
+validate_-_ml-agents_-_2023_2_-_windows:
+ name: Validate - ml-agents - 2023.2 - windows
+ agent:
+ image: package-ci/win10:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl %WRENCH_LOCAL_APV_DOWNLOAD_URL% -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: unity-downloader-cli -u 2023.2 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: upm-pvp create-test-project test-ml-agents --packages "upm-ci~/packages/*.tgz" --unity .Editor
+ timeout: 10
+ retries: 1
+ - command: echo No internal packages to add.
+ - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp
+ timeout: 20
+ retries: 0
+ - command: echo Skipping check for PVP-160-1 as there is a bug on Windows. https://jira.unity3d.com/browse/PETS-1462
+ - command: echo No additional PVP profiles to declared to check.
+ - command: UnifiedTestRunner.exe --testproject=test-ml-agents --editor-location=.Editor --reruncount=1 --clean-library-on-rerun --artifacts_path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}"
+ timeout: 30
+ retries: 1
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ UTR:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - artifacts/**/*
+ - test-ml-agents/Logs/**
+ - test-ml-agents/Library/*.log
+ - test-ml-agents/*.log
+ - test-ml-agents/Builds/*.log
+ - build/test-results/**
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+ labels:
+ - Packages:ml-agents
+
+# PVP Editor and Playmode tests for Validate - ml-agents - 6000.0 - macos (6000.0 - MacOS).
+validate_-_ml-agents_-_6000_0_-_macos:
+ name: Validate - ml-agents - 6000.0 - macos
+ agent:
+ image: package-ci/macos-13:default
+ type: Unity::VM::osx
+ flavor: b1.xlarge
+ commands:
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: unity-downloader-cli -u 6000.0 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: upm-pvp create-test-project test-ml-agents --packages "upm-ci~/packages/*.tgz" --unity .Editor
+ timeout: 10
+ retries: 1
+ - command: echo No internal packages to add.
+ - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp
+ timeout: 20
+ retries: 0
+ - command: upm-pvp require "PVP-160-1" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json
+ timeout: 5
+ retries: 0
+ - command: echo No additional PVP profiles to declared to check.
+ - command: UnifiedTestRunner --testproject=test-ml-agents --editor-location=.Editor --reruncount=1 --clean-library-on-rerun --artifacts_path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}"
+ timeout: 30
+ retries: 1
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ UTR:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - artifacts/**/*
+ - test-ml-agents/Logs/**
+ - test-ml-agents/Library/*.log
+ - test-ml-agents/*.log
+ - test-ml-agents/Builds/*.log
+ - build/test-results/**
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+ labels:
+ - Packages:ml-agents
+
+# PVP Editor and Playmode tests for Validate - ml-agents - 6000.0 - ubuntu (6000.0 - Ubuntu).
+validate_-_ml-agents_-_6000_0_-_ubuntu:
+ name: Validate - ml-agents - 6000.0 - ubuntu
+ agent:
+ image: package-ci/ubuntu-20.04:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl $WRENCH_LOCAL_APV_DOWNLOAD_URL -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: unity-downloader-cli -u 6000.0 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: upm-pvp create-test-project test-ml-agents --packages "upm-ci~/packages/*.tgz" --unity .Editor
+ timeout: 10
+ retries: 1
+ - command: echo No internal packages to add.
+ - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp
+ timeout: 20
+ retries: 0
+ - command: upm-pvp require "PVP-160-1" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json
+ timeout: 5
+ retries: 0
+ - command: echo No additional PVP profiles to declared to check.
+ - command: UnifiedTestRunner --testproject=test-ml-agents --editor-location=.Editor --reruncount=1 --clean-library-on-rerun --artifacts_path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}"
+ timeout: 30
+ retries: 1
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ UTR:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - artifacts/**/*
+ - test-ml-agents/Logs/**
+ - test-ml-agents/Library/*.log
+ - test-ml-agents/*.log
+ - test-ml-agents/Builds/*.log
+ - build/test-results/**
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+ labels:
+ - Packages:ml-agents
+
+# PVP Editor and Playmode tests for Validate - ml-agents - 6000.0 - windows (6000.0 - Windows).
+validate_-_ml-agents_-_6000_0_-_windows:
+ name: Validate - ml-agents - 6000.0 - windows
+ agent:
+ image: package-ci/win10:default
+ type: Unity::VM
+ flavor: b1.large
+ commands:
+ - command: curl %WRENCH_LOCAL_APV_DOWNLOAD_URL% -o wrench-localapv.zip
+ - command: 7z x wrench-localapv.zip
+ - command: python PythonScripts/print_machine_info.py
+ - command: unity-downloader-cli -u 6000.0 -c Editor --fast
+ timeout: 10
+ retries: 3
+ - command: upm-pvp create-test-project test-ml-agents --packages "upm-ci~/packages/*.tgz" --unity .Editor
+ timeout: 10
+ retries: 1
+ - command: echo No internal packages to add.
+ - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp
+ timeout: 20
+ retries: 0
+ - command: echo Skipping check for PVP-160-1 as there is a bug on Windows. https://jira.unity3d.com/browse/PETS-1462
+ - command: echo No additional PVP profiles to declared to check.
+ - command: UnifiedTestRunner.exe --testproject=test-ml-agents --editor-location=.Editor --reruncount=1 --clean-library-on-rerun --artifacts_path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}"
+ timeout: 30
+ retries: 1
+ artifacts:
+ Crash Dumps:
+ paths:
+ - CrashDumps/**
+ packages:
+ paths:
+ - upm-ci~/packages/**/*
+ pvp-results:
+ paths:
+ - upm-ci~/pvp/**/*
+ UTR:
+ paths:
+ - '*.log'
+ - '*.xml'
+ - artifacts/**/*
+ - test-ml-agents/Logs/**
+ - test-ml-agents/Library/*.log
+ - test-ml-agents/*.log
+ - test-ml-agents/Builds/*.log
+ - build/test-results/**
+ dependencies:
+ - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_ml-agents
+ variables:
+ UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1
+ UPMPVP_CONTEXT_WRENCH: 0.10.5.0
+ metadata:
+ Job Maintainers: '#rm-packageworks'
+ Wrench: 0.10.5.0
+ labels:
+ - Packages:ml-agents
+
diff --git a/.yamato/wrench/wrench_config.json b/.yamato/wrench/wrench_config.json
new file mode 100644
index 0000000000..7347f99bf5
--- /dev/null
+++ b/.yamato/wrench/wrench_config.json
@@ -0,0 +1,27 @@
+{
+ "project_path": "Tools/CI",
+ "schema_version": 0.5,
+ "packages": {
+ "com.unity.ml-agents": {
+ "directory": "com.unity.ml-agents/",
+ "prePackCommands": [],
+ "preTestCommands": {},
+ "InternalOnly": false,
+ "NeverPublish": false
+ }
+ },
+ "releasing_packages": [
+ "com.unity.ml-agents"
+ ],
+ "jobs_to_monitor": {
+ "com.unity.ml-agents": [
+ ".yamato/wrench/api-validation-jobs.yml#api_validation_-_ml-agents_-_2023_2_-_windows",
+ ".yamato/wrench/preview-a-p-v.yml#all_preview_apv_jobs",
+ ".yamato/wrench/promotion-jobs.yml#publish_dry_run_ml-agents"
+ ]
+ },
+ "publishing_job": ".yamato/wrench/promotion-jobs.yml#publish_ml-agents",
+ "branch_pattern": "ReleaseSlash",
+ "wrench_version": "0.10.5.0",
+ "pvp_exemption_path": ".yamato/wrench/pvp-exemptions.json"
+}
diff --git a/com.unity.ml-agents/CODEOWNERS b/CODEOWNERS
similarity index 100%
rename from com.unity.ml-agents/CODEOWNERS
rename to CODEOWNERS
diff --git a/DevProject/Packages/packages-lock.json b/DevProject/Packages/packages-lock.json
index 65747ed276..fcb1b62a69 100644
--- a/DevProject/Packages/packages-lock.json
+++ b/DevProject/Packages/packages-lock.json
@@ -10,7 +10,7 @@
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.burst": {
- "version": "1.8.12",
+ "version": "1.8.17",
"depth": 2,
"source": "registry",
"dependencies": {
@@ -29,14 +29,14 @@
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.collections": {
- "version": "2.2.1",
+ "version": "2.4.3",
"depth": 2,
"source": "registry",
"dependencies": {
- "com.unity.burst": "1.8.8",
- "com.unity.modules.unityanalytics": "1.0.0",
+ "com.unity.burst": "1.8.13",
"com.unity.nuget.mono-cecil": "1.11.4",
- "com.unity.test-framework.performance": "3.0.2"
+ "com.unity.test-framework": "1.4.3",
+ "com.unity.test-framework.performance": "3.0.3"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
},
@@ -68,7 +68,7 @@
"depth": 0,
"source": "local",
"dependencies": {
- "com.unity.sentis": "2.0.0",
+ "com.unity.sentis": "2.1.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.physics": "1.0.0"
@@ -79,7 +79,7 @@
"depth": 0,
"source": "local",
"dependencies": {
- "com.unity.ml-agents": "3.0.0-exp.1",
+ "com.unity.ml-agents": "3.0.0",
"com.unity.modules.physics": "1.0.0"
}
},
@@ -118,12 +118,12 @@
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.sentis": {
- "version": "2.0.0",
+ "version": "2.1.0",
"depth": 1,
"source": "registry",
"dependencies": {
- "com.unity.burst": "1.8.12",
- "com.unity.collections": "2.2.1",
+ "com.unity.burst": "1.8.17",
+ "com.unity.collections": "2.4.3",
"com.unity.modules.imageconversion": "1.0.0"
},
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
@@ -143,8 +143,8 @@
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.test-framework": {
- "version": "1.3.9",
- "depth": 0,
+ "version": "1.4.3",
+ "depth": 3,
"source": "registry",
"dependencies": {
"com.unity.ext.nunit": "2.0.3",
diff --git a/DevProject/ProjectSettings/EditorBuildSettings.asset b/DevProject/ProjectSettings/EditorBuildSettings.asset
index 630ce117a9..7a81c6578a 100644
--- a/DevProject/ProjectSettings/EditorBuildSettings.asset
+++ b/DevProject/ProjectSettings/EditorBuildSettings.asset
@@ -9,6 +9,6 @@ EditorBuildSettings:
path: Assets/ML-Agents/Scripts/Tests/Runtime/AcademyTest/AcademyStepperTestScene.unity
guid: 9bafc50b1e55b43b2b1ae9620f1f8311
m_configObjects:
- com.unity.ml-agents.settings: {fileID: 11400000, guid: 8c1549da419d94fa285f5b29eab859e9,
+ com.unity.ml-agents.settings: {fileID: 11400000, guid: b176c44294f5e434bb5109ddfc43274e,
type: 2}
m_UseUCBPForAssetBundles: 0
diff --git a/LICENSE.md b/LICENSE.md
index 06fa0d94e5..4ddbb5310f 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright 2017-2021 Unity Technologies
+ML Agents copyright © 2017 Unity Technologies
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -11,192 +11,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
diff --git a/Project/Assets/ML-Agents/Examples/Basic/Scripts/BasicActuatorComponent.cs b/Project/Assets/ML-Agents/Examples/Basic/Scripts/BasicActuatorComponent.cs
index 9a02b6765e..4634db8839 100644
--- a/Project/Assets/ML-Agents/Examples/Basic/Scripts/BasicActuatorComponent.cs
+++ b/Project/Assets/ML-Agents/Examples/Basic/Scripts/BasicActuatorComponent.cs
@@ -16,7 +16,7 @@ public class BasicActuatorComponent : ActuatorComponent
///
/// Creates a BasicActuator.
///
- ///
+ /// Corresponding actuators.
public override IActuator[] CreateActuators()
{
return new IActuator[] { new BasicActuator(basicController) };
diff --git a/Project/Assets/ML-Agents/Examples/Basic/Scripts/BasicSensorComponent.cs b/Project/Assets/ML-Agents/Examples/Basic/Scripts/BasicSensorComponent.cs
index f956d747ad..dedb941557 100644
--- a/Project/Assets/ML-Agents/Examples/Basic/Scripts/BasicSensorComponent.cs
+++ b/Project/Assets/ML-Agents/Examples/Basic/Scripts/BasicSensorComponent.cs
@@ -14,7 +14,7 @@ public class BasicSensorComponent : SensorComponent
///
/// Creates a BasicSensor.
///
- ///
+ /// Corresponding sensors.
public override ISensor[] CreateSensors()
{
return new ISensor[] { new BasicSensor(basicController) };
diff --git a/Project/Assets/ML-Agents/Examples/DungeonEscape/Scripts/DungeonEscapeEnvController.cs b/Project/Assets/ML-Agents/Examples/DungeonEscape/Scripts/DungeonEscapeEnvController.cs
index d9a8d80cd3..1e884578ba 100644
--- a/Project/Assets/ML-Agents/Examples/DungeonEscape/Scripts/DungeonEscapeEnvController.cs
+++ b/Project/Assets/ML-Agents/Examples/DungeonEscape/Scripts/DungeonEscapeEnvController.cs
@@ -38,7 +38,7 @@ public class DragonInfo
///
/// Max Academy steps before this platform resets
///
- ///
+ /// The maximum steps before this platform resets.
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
private int m_ResetTimer;
diff --git a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Board.cs b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Board.cs
index df6c3a56a4..f2c342b64e 100644
--- a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Board.cs
+++ b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Board.cs
@@ -193,7 +193,7 @@ public bool MarkMatchedCells(int[,] cells = null)
///
/// Sets cells that are matched to the empty cell, and returns the score earned.
///
- ///
+ /// The number of earned points.
public int ClearMatchedCells()
{
var pointsByType = new[] { BasicCellPoints, SpecialCell1Points, SpecialCell2Points };
diff --git a/Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockEnvController.cs b/Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockEnvController.cs
index 1b4634820f..b000b2b0ee 100644
--- a/Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockEnvController.cs
+++ b/Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockEnvController.cs
@@ -32,7 +32,6 @@ public class BlockInfo
///
/// Max Academy steps before this platform resets
///
- ///
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
///
diff --git a/Project/Assets/ML-Agents/Examples/PushBlockWithInput/Scripts/PushBlockWithInputPlayerController.cs b/Project/Assets/ML-Agents/Examples/PushBlockWithInput/Scripts/PushBlockWithInputPlayerController.cs
index 9e9922429d..e110ad83ad 100644
--- a/Project/Assets/ML-Agents/Examples/PushBlockWithInput/Scripts/PushBlockWithInputPlayerController.cs
+++ b/Project/Assets/ML-Agents/Examples/PushBlockWithInput/Scripts/PushBlockWithInputPlayerController.cs
@@ -105,7 +105,7 @@ static float CreateForwardVector(Vector2 move)
/// listening to C# events, Unity Events, or receiving Messages from the Input System Package as those callbacks
/// are set up through the generated .
///
- ///
+ /// Corresponing action collection tuple.
public (InputActionAsset, IInputActionCollection2) GetInputActionAsset()
{
LazyInitializeActions();
diff --git a/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs b/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
index 07ea9ae6b3..150e7c49b3 100644
--- a/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
+++ b/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
@@ -111,7 +111,6 @@ public static string GetOverrideBehaviorName(string originalBehaviorName)
/// Get the asset path to use from the commandline arguments.
/// Can be called multiple times - if m_HaveProcessedCommandLine is set, will have no effect.
///
- ///
void GetAssetPathFromCommandLine()
{
if (m_HaveProcessedCommandLine)
diff --git a/Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs b/Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs
index d76d43ef92..076de1e27a 100644
--- a/Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs
+++ b/Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs
@@ -20,7 +20,6 @@ public class PlayerInfo
///
/// Max Academy steps before this platform resets
///
- ///
[Tooltip("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
///
diff --git a/Project/Packages/packages-lock.json b/Project/Packages/packages-lock.json
index 0b3f6a0b62..1fcbf50632 100644
--- a/Project/Packages/packages-lock.json
+++ b/Project/Packages/packages-lock.json
@@ -17,7 +17,7 @@
"url": "https://packages.unity.com"
},
"com.unity.burst": {
- "version": "1.8.12",
+ "version": "1.8.17",
"depth": 2,
"source": "registry",
"dependencies": {
@@ -27,14 +27,14 @@
"url": "https://packages.unity.com"
},
"com.unity.collections": {
- "version": "2.2.1",
+ "version": "2.4.3",
"depth": 2,
"source": "registry",
"dependencies": {
- "com.unity.burst": "1.8.8",
- "com.unity.modules.unityanalytics": "1.0.0",
+ "com.unity.burst": "1.8.13",
+ "com.unity.test-framework": "1.4.3",
"com.unity.nuget.mono-cecil": "1.11.4",
- "com.unity.test-framework.performance": "3.0.2"
+ "com.unity.test-framework.performance": "3.0.3"
},
"url": "https://packages.unity.com"
},
@@ -50,8 +50,8 @@
"depth": 0,
"source": "registry",
"dependencies": {
- "com.unity.timeline": "1.7.1",
- "com.autodesk.fbx": "5.1.0"
+ "com.autodesk.fbx": "5.1.0",
+ "com.unity.timeline": "1.7.1"
},
"url": "https://packages.unity.com"
},
@@ -85,7 +85,7 @@
"depth": 0,
"source": "local",
"dependencies": {
- "com.unity.sentis": "2.0.0",
+ "com.unity.sentis": "2.1.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.physics": "1.0.0"
@@ -96,7 +96,7 @@
"depth": 0,
"source": "local",
"dependencies": {
- "com.unity.ml-agents": "3.0.0-exp.1",
+ "com.unity.ml-agents": "3.0.0",
"com.unity.modules.physics": "1.0.0"
}
},
@@ -124,12 +124,12 @@
"url": "https://packages.unity.com"
},
"com.unity.sentis": {
- "version": "2.0.0",
+ "version": "2.1.0",
"depth": 1,
"source": "registry",
"dependencies": {
- "com.unity.burst": "1.8.12",
- "com.unity.collections": "2.2.1",
+ "com.unity.burst": "1.8.17",
+ "com.unity.collections": "2.4.3",
"com.unity.modules.imageconversion": "1.0.0"
},
"url": "https://packages.unity.com"
@@ -151,8 +151,8 @@
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
- "version": "1.3.9",
- "depth": 0,
+ "version": "1.4.3",
+ "depth": 3,
"source": "registry",
"dependencies": {
"com.unity.ext.nunit": "2.0.3",
@@ -162,7 +162,7 @@
"url": "https://packages.unity.com"
},
"com.unity.test-framework.performance": {
- "version": "3.0.2",
+ "version": "3.0.3",
"depth": 3,
"source": "registry",
"dependencies": {
@@ -176,9 +176,9 @@
"depth": 1,
"source": "registry",
"dependencies": {
+ "com.unity.modules.audio": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.animation": "1.0.0",
- "com.unity.modules.audio": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0"
},
"url": "https://packages.unity.com"
diff --git a/Third Party Notices.md b/Third Party Notices.md
new file mode 100644
index 0000000000..76fbc64ee1
--- /dev/null
+++ b/Third Party Notices.md
@@ -0,0 +1,206 @@
+This package contains third-party software components governed by the license(s) indicated below:
+ ---------
+
+ Component Name: System.Buffers.dll
+
+ License Type: MIT
+
+https://www.nuget.org/packages/System.Buffers/
+
+ The MIT License (MIT)
+
+ Copyright (c) .NET Foundation and Contributors
+
+ All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+
+ ---------
+
+Component Name: System.Numerics.Vectors.dll
+
+License Type: MIT
+
+https://www.nuget.org/packages/System.Numerics.Vectors/
+
+The MIT License (MIT)
+
+Copyright (c) .NET Foundation and Contributors
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+ ---------
+
+Component Name: System.Runtime.CompilerServices.Unsafe
+
+License Type: MIT
+
+https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe
+
+The MIT License (MIT)
+
+Copyright (c) .NET Foundation and Contributors
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+ ---------
+
+Component Name: System.Memory.dll
+
+License Type: MIT
+
+https://www.nuget.org/packages/System.Memory/
+
+The MIT License (MIT)
+
+Copyright (c) .NET Foundation and Contributors
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+ ---------
+
+Component Name: System.IO.Abstractions
+
+License Type: MIT
+
+https://github.com/TestableIO/System.IO.Abstractions
+
+The MIT License (MIT)
+
+Copyright (c) Tatham Oddie and Contributors
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+ ---------
+
+Component Name: System.Interactive.Async.dll
+
+License Type: Apache-2.0
+
+https://www.nuget.org/packages/System.Interactive.Async/
+
+Copyright (c) .NET Foundation and Contributors
+All Rights Reserved
+
+Licensed under the Apache License, Version 2.0 (the "License"); you
+may not use this file except in compliance with the License. You may
+obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied. See the License for the specific language governing permissions
+and limitations under the License.
+
+ ---------
+
+Component Name: Grpc
+
+License Type: Apache-2.0
+
+https://github.com/grpc/grpc
+
+Copyright 2015-2024 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/com.unity.ml-agents/catalog-info.yaml b/catalog-info.yaml
similarity index 100%
rename from com.unity.ml-agents/catalog-info.yaml
rename to catalog-info.yaml
diff --git a/colab/Colab_UnityEnvironment_1_Run.ipynb b/colab/Colab_UnityEnvironment_1_Run.ipynb
index 8d9dc53638..b221ac8421 100644
--- a/colab/Colab_UnityEnvironment_1_Run.ipynb
+++ b/colab/Colab_UnityEnvironment_1_Run.ipynb
@@ -32,7 +32,7 @@
},
"source": [
"# ML-Agents Open a UnityEnvironment\n",
- "
"
+ "
"
]
},
{
@@ -149,7 +149,7 @@
" import mlagents\n",
" print(\"ml-agents already installed\")\n",
"except ImportError:\n",
- " !python -m pip install -q mlagents==1.0.0\n",
+ " !python -m pip install -q mlagents==1.1.0\n",
" print(\"Installed ml-agents\")"
],
"execution_count": 1,
diff --git a/colab/Colab_UnityEnvironment_2_Train.ipynb b/colab/Colab_UnityEnvironment_2_Train.ipynb
index 08014a790e..80b82b428e 100644
--- a/colab/Colab_UnityEnvironment_2_Train.ipynb
+++ b/colab/Colab_UnityEnvironment_2_Train.ipynb
@@ -22,7 +22,7 @@
},
"source": [
"# ML-Agents Q-Learning with GridWorld\n",
- "
"
+ "
"
]
},
{
@@ -152,7 +152,7 @@
" import mlagents\n",
" print(\"ml-agents already installed\")\n",
"except ImportError:\n",
- " !python -m pip install -q mlagents==1.0.0\n",
+ " !python -m pip install -q mlagents==1.1.0\n",
" print(\"Installed ml-agents\")"
],
"execution_count": 2,
@@ -190,7 +190,7 @@
"id": "pZhVRfdoyPmv"
},
"source": [
- "The [GridWorld](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Examples.md#gridworld) Environment is a simple Unity visual environment. The Agent is a blue square in a 3x3 grid that is trying to reach a green __`+`__ while avoiding a red __`x`__.\n",
+ "The [GridWorld](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Examples.md#gridworld) Environment is a simple Unity visual environment. The Agent is a blue square in a 3x3 grid that is trying to reach a green __`+`__ while avoiding a red __`x`__.\n",
"\n",
"The observation is an image obtained by a camera on top of the grid.\n",
"\n",
diff --git a/colab/Colab_UnityEnvironment_3_SideChannel.ipynb b/colab/Colab_UnityEnvironment_3_SideChannel.ipynb
index 06ea8c493c..646a01defe 100644
--- a/colab/Colab_UnityEnvironment_3_SideChannel.ipynb
+++ b/colab/Colab_UnityEnvironment_3_SideChannel.ipynb
@@ -23,7 +23,7 @@
},
"source": [
"# ML-Agents Use SideChannels\n",
- "
"
+ "
"
]
},
{
@@ -153,7 +153,7 @@
" import mlagents\n",
" print(\"ml-agents already installed\")\n",
"except ImportError:\n",
- " !python -m pip install -q mlagents==1.0.0\n",
+ " !python -m pip install -q mlagents==1.1.0\n",
" print(\"Installed ml-agents\")"
],
"execution_count": 2,
@@ -176,7 +176,7 @@
"## Side Channel\n",
"\n",
"SideChannels are objects that can be passed to the constructor of a UnityEnvironment or the `make()` method of a registry entry to send non Reinforcement Learning related data.\n",
- "More information available [here](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Python-API.md#communicating-additional-information-with-the-environment)\n",
+ "More information available [here](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Python-API.md#communicating-additional-information-with-the-environment)\n",
"\n",
"\n",
"\n"
@@ -189,7 +189,7 @@
},
"source": [
"### Engine Configuration SideChannel\n",
- "The [Engine Configuration Side Channel](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Python-API.md#engineconfigurationchannel) is used to configure how the Unity Engine should run.\n",
+ "The [Engine Configuration Side Channel](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Python-API.md#engineconfigurationchannel) is used to configure how the Unity Engine should run.\n",
"We will use the GridWorld environment to demonstrate how to use the EngineConfigurationChannel."
]
},
@@ -282,7 +282,7 @@
},
"source": [
"### Environment Parameters Channel\n",
- "The [Environment Parameters Side Channel](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Python-API.md#environmentparameters) is used to modify environment parameters during the simulation.\n",
+ "The [Environment Parameters Side Channel](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Python-API.md#environmentparameters) is used to modify environment parameters during the simulation.\n",
"We will use the GridWorld environment to demonstrate how to use the EngineConfigurationChannel."
]
},
@@ -419,7 +419,7 @@
},
"source": [
"### Creating your own Side Channels\n",
- "You can send various kinds of data between a Unity Environment and Python but you will need to [create your own implementation of a Side Channel](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Custom-SideChannels.md#custom-side-channels) for advanced use cases.\n"
+ "You can send various kinds of data between a Unity Environment and Python but you will need to [create your own implementation of a Side Channel](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Custom-SideChannels.md#custom-side-channels) for advanced use cases.\n"
]
},
{
diff --git a/colab/Colab_UnityEnvironment_4_SB3VectorEnv.ipynb b/colab/Colab_UnityEnvironment_4_SB3VectorEnv.ipynb
index 59fa645884..e5d3d45c8b 100644
--- a/colab/Colab_UnityEnvironment_4_SB3VectorEnv.ipynb
+++ b/colab/Colab_UnityEnvironment_4_SB3VectorEnv.ipynb
@@ -7,7 +7,7 @@
},
"source": [
"# ML-Agents run with Stable Baselines 3\n",
- "
"
+ "
"
]
},
{
@@ -127,7 +127,7 @@
" import mlagents\n",
" print(\"ml-agents already installed\")\n",
"except ImportError:\n",
- " !python -m pip install -q mlagents==1.0.0\n",
+ " !python -m pip install -q mlagents==1.1.0\n",
" print(\"Installed ml-agents\")"
]
},
diff --git a/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md b/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md
index 73ecb70fec..9421ae1484 100644
--- a/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md
+++ b/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md
@@ -28,24 +28,24 @@ The ML-Agents Extensions package is not currently available in the Package Manag
recommended ways to install the package:
### Local Installation
-[Clone the repository](https://github.com/Unity-Technologies/ml-agents/tree/release_21_docs/docs/Installation.md#clone-the-ml-agents-toolkit-repository-optional) and follow the
-[Local Installation for Development](https://github.com/Unity-Technologies/ml-agents/tree/release_21_docs/docs/Installation.md#advanced-local-installation-for-development-1)
+[Clone the repository](https://github.com/Unity-Technologies/ml-agents/tree/release_22_docs/docs/Installation.md#clone-the-ml-agents-toolkit-repository-optional) and follow the
+[Local Installation for Development](https://github.com/Unity-Technologies/ml-agents/tree/release_22_docs/docs/Installation.md#advanced-local-installation-for-development-1)
directions (substituting `com.unity.ml-agents.extensions` for the package name).
### Github via Package Manager
In Unity 2019.4 or later, open the Package Manager, hit the "+" button, and select "Add package from git URL".
-
+
In the dialog that appears, enter
```
-git+https://github.com/Unity-Technologies/ml-agents.git?path=com.unity.ml-agents.extensions#release_21
+git+https://github.com/Unity-Technologies/ml-agents.git?path=com.unity.ml-agents.extensions#release_22
```
You can also edit your project's `manifest.json` directly and add the following line to the `dependencies`
section:
```
-"com.unity.ml-agents.extensions": "git+https://github.com/Unity-Technologies/ml-agents.git?path=com.unity.ml-agents.extensions#release_21",
+"com.unity.ml-agents.extensions": "git+https://github.com/Unity-Technologies/ml-agents.git?path=com.unity.ml-agents.extensions#release_22",
```
See [Git dependencies](https://docs.unity3d.com/Manual/upm-git.html#subfolder) for more information. Note that this
may take several minutes to resolve the packages the first time that you add it.
@@ -67,4 +67,4 @@ If using the `InputActuatorComponent`
- No way to customize the action space of the `InputActuatorComponent`
## Need Help?
-The main [README](https://github.com/Unity-Technologies/ml-agents/tree/release_21_docs/README.md) contains links for contacting the team or getting support.
+The main [README](https://github.com/Unity-Technologies/ml-agents/tree/release_22_docs/README.md) contains links for contacting the team or getting support.
diff --git a/com.unity.ml-agents.extensions/LICENSE.md b/com.unity.ml-agents.extensions/LICENSE.md
index 5653ad84f2..00559059c0 100644
--- a/com.unity.ml-agents.extensions/LICENSE.md
+++ b/com.unity.ml-agents.extensions/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright 2020-2021 Unity Technologies
+Copyright 2017-2024 Unity Technologies
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs
index b37582422a..d16ad28a95 100644
--- a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs
+++ b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs
@@ -19,7 +19,7 @@ public class ButtonInputActionAdaptor : IRLActionInputAdaptor
/// for pressed.
///
/// The action associated with this adaptor to help determine the action space.
- ///
+ /// ActionSpec with 1 branch of size 2.
public ActionSpec GetActionSpecForInputAction(InputAction action)
{
return ActionSpec.MakeDiscrete(2);
diff --git a/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs b/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs
index ac8ae75236..b1a75d233b 100644
--- a/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs
+++ b/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs
@@ -182,7 +182,7 @@ internal static IActuator[] CreateActuatorsFromMap(InputActionMap inputActionMap
///
/// true if the Agent connected to this GameObject is working in
/// Heuristic mode.
- ///
+ ///
internal void UpdateDeviceBinding(bool isInHeuristicMode)
{
if (ReferenceEquals(m_Device, null))
@@ -259,7 +259,6 @@ internal static InputControlScheme CreateControlScheme(InputControl device,
///
///
///
- ///
internal static void RegisterLayoutBuilder(InputActionMap defaultMap, string layoutName)
{
if (InputSystem.LoadLayout(layoutName) == null)
diff --git a/com.unity.ml-agents.extensions/Runtime/Sensors/ArticulationBodySensorComponent.cs b/com.unity.ml-agents.extensions/Runtime/Sensors/ArticulationBodySensorComponent.cs
index 41e8acde56..277f01269d 100644
--- a/com.unity.ml-agents.extensions/Runtime/Sensors/ArticulationBodySensorComponent.cs
+++ b/com.unity.ml-agents.extensions/Runtime/Sensors/ArticulationBodySensorComponent.cs
@@ -15,7 +15,7 @@ public class ArticulationBodySensorComponent : SensorComponent
///
/// Creates a PhysicsBodySensor.
///
- ///
+ /// Corresponding sensors.
public override ISensor[] CreateSensors()
{
return new ISensor[] {new PhysicsBodySensor(RootBody, Settings, sensorName)};
diff --git a/com.unity.ml-agents.extensions/Runtime/Sensors/CountingGridSensor.cs b/com.unity.ml-agents.extensions/Runtime/Sensors/CountingGridSensor.cs
index f7a212be1e..b48deb995f 100644
--- a/com.unity.ml-agents.extensions/Runtime/Sensors/CountingGridSensor.cs
+++ b/com.unity.ml-agents.extensions/Runtime/Sensors/CountingGridSensor.cs
@@ -51,7 +51,7 @@ protected internal override ProcessCollidersMethod GetProcessCollidersMethod()
/// The game object that was detected within a certain cell
/// The index of the detectedObject's tag in the DetectableObjects list
/// The buffer to write the observation values.
- /// The buffer size is configured by .
+ /// The buffer size is configured by .
///
protected override void GetObjectData(GameObject detectedObject, int tagIndex, float[] dataBuffer)
{
diff --git a/com.unity.ml-agents.extensions/Runtime/Sensors/PhysicsSensorSettings.cs b/com.unity.ml-agents.extensions/Runtime/Sensors/PhysicsSensorSettings.cs
index d9f9c0d441..ecfa4417db 100644
--- a/com.unity.ml-agents.extensions/Runtime/Sensors/PhysicsSensorSettings.cs
+++ b/com.unity.ml-agents.extensions/Runtime/Sensors/PhysicsSensorSettings.cs
@@ -52,7 +52,7 @@ public struct PhysicsSensorSettings
///
/// Creates a PhysicsSensorSettings with reasonable default values.
///
- ///
+ /// `PhysicsSensorSettings` with reasonable default values.
public static PhysicsSensorSettings Default()
{
return new PhysicsSensorSettings
diff --git a/com.unity.ml-agents.extensions/Runtime/Sensors/PoseExtractor.cs b/com.unity.ml-agents.extensions/Runtime/Sensors/PoseExtractor.cs
index 9777473a95..a528dde90a 100644
--- a/com.unity.ml-agents.extensions/Runtime/Sensors/PoseExtractor.cs
+++ b/com.unity.ml-agents.extensions/Runtime/Sensors/PoseExtractor.cs
@@ -136,7 +136,7 @@ public int NumPoses
/// Get the parent index of the body at the specified index.
///
///
- ///
+ /// The parent index of the body at the specified index.
public int GetParentIndex(int index)
{
if (m_ParentIndices == null)
@@ -195,14 +195,14 @@ protected void Setup(int[] parentIndices)
/// Return the world space Pose of the i'th object.
///
///
- ///
+ /// The world space Pose at given index.
protected internal abstract Pose GetPoseAt(int index);
///
/// Return the world space linear velocity of the i'th object.
///
///
- ///
+ /// The world space linear velocity at given index.
protected internal abstract Vector3 GetLinearVelocityAt(int index);
///
@@ -210,7 +210,7 @@ protected void Setup(int[] parentIndices)
/// used for display in the inspector.
///
///
- ///
+ /// The `Object` at given index.
protected internal virtual Object GetObjectAt(int index)
{
return null;
@@ -285,7 +285,7 @@ public void UpdateLocalSpacePoses()
/// Compute the number of floats needed to represent the poses for the given PhysicsSensorSettings.
///
///
- ///
+ /// The number of floats needed to represent the poses for the given `PhysicsSensorSettings`.
public int GetNumPoseObservations(PhysicsSensorSettings settings)
{
int obsPerPose = 0;
@@ -355,7 +355,7 @@ internal struct DisplayNode
///
/// Get a list of display nodes in depth-first order.
///
- ///
+ /// The display nodes.
internal IList GetDisplayNodes()
{
if (NumPoses == 0)
@@ -434,7 +434,7 @@ public static class PoseExtensions
/// will equal the identity pose (within tolerance).
///
///
- ///
+ /// Inverse `Pose`.
public static Pose Inverse(this Pose pose)
{
var rotationInverse = Quaternion.Inverse(pose.rotation);
@@ -447,7 +447,7 @@ public static Pose Inverse(this Pose pose)
///
///
///
- ///
+ /// Multiplied `Pose`.
public static Pose Multiply(this Pose pose, Pose rhs)
{
return rhs.GetTransformedBy(pose);
@@ -460,7 +460,7 @@ public static Pose Multiply(this Pose pose, Pose rhs)
///
///
///
- ///
+ /// Multiplied `Pose`.
public static Vector3 Multiply(this Pose pose, Vector3 rhs)
{
return pose.rotation * rhs + pose.position;
diff --git a/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodyPoseExtractor.cs b/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodyPoseExtractor.cs
index 38fad10fde..694b5974ab 100644
--- a/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodyPoseExtractor.cs
+++ b/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodyPoseExtractor.cs
@@ -163,7 +163,7 @@ protected internal override Object GetObjectAt(int index)
///
/// Get a dictionary indicating which Rigidbodies' poses are enabled or disabled.
///
- ///
+ /// `Dictionary` indicating which Rigidbodies' poses are enabled or disabled.
internal Dictionary GetBodyPosesEnabled()
{
var bodyPosesEnabled = new Dictionary(m_Bodies.Length);
diff --git a/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodySensorComponent.cs b/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodySensorComponent.cs
index 283a37b3a5..6cfc4aa666 100644
--- a/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodySensorComponent.cs
+++ b/com.unity.ml-agents.extensions/Runtime/Sensors/RigidBodySensorComponent.cs
@@ -38,7 +38,7 @@ public class RigidBodySensorComponent : SensorComponent
///
/// Creates a PhysicsBodySensor.
///
- ///
+ /// Corresponding sensors.
public override ISensor[] CreateSensors()
{
var _sensorName = string.IsNullOrEmpty(sensorName) ? $"PhysicsBodySensor:{RootBody?.name}" : sensorName;
@@ -48,7 +48,7 @@ public override ISensor[] CreateSensors()
///
/// Get the DisplayNodes of the hierarchy.
///
- ///
+ /// The `DisplayNodes` of the hierarchy.
internal IList GetDisplayNodes()
{
return GetPoseExtractor().GetDisplayNodes();
@@ -57,7 +57,7 @@ public override ISensor[] CreateSensors()
///
/// Lazy construction of the PoseExtractor.
///
- ///
+ /// Corresponding `RigidBodyPoseExtractor`
RigidBodyPoseExtractor GetPoseExtractor()
{
if (m_PoseExtractor == null)
diff --git a/com.unity.ml-agents.extensions/package.json b/com.unity.ml-agents.extensions/package.json
index 71d3035c37..4f44bcd6c0 100644
--- a/com.unity.ml-agents.extensions/package.json
+++ b/com.unity.ml-agents.extensions/package.json
@@ -5,7 +5,7 @@
"unity": "2023.2",
"description": "A source-only package for new features based on ML-Agents",
"dependencies": {
- "com.unity.ml-agents": "3.0.0-exp.1",
+ "com.unity.ml-agents": "3.0.0",
"com.unity.modules.physics": "1.0.0"
}
}
diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md
index 8d963fe65e..827dd787ec 100755
--- a/com.unity.ml-agents/CHANGELOG.md
+++ b/com.unity.ml-agents/CHANGELOG.md
@@ -6,9 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
-## [Unreleased]
+## [3.0.0] - 2024-09-02
### Major Changes
#### com.unity.ml-agents / com.unity.ml-agents.extensions (C#)
+- Upgraded to Sentis 2.1.0 ()
+- Upgraded to Sentis 2.0.0 (#6137)
- Upgraded to Sentis 1.3.0-pre.3 (#6070)
- Upgraded to Sentis 1.3.0-exp.2 (#6013)
- The minimum supported Unity version was updated to 2023.2. (#6071)
@@ -21,13 +23,20 @@ and this project adheres to
- Added no-graphics-monitor. (#6014)
#### ml-agents / ml-agents-envs
+- Update Installation.md (#6004)
+- Updated Using-Virtual-Environment.md (#6033)
### Bug Fixes
#### com.unity.ml-agents / com.unity.ml-agents.extensions (C#)
+- Fix failing ci post upgrade (#6141)
+- Fixed missing assembly reference for google protobuf. (#6099)
- Fixed missing tensor Dispose in ModelRunner. (#6028)
- Fixed 3DBall sample package to remove Barracuda dependency. (#6030)
#### ml-agents / ml-agents-envs
+- Fix sample code indentation in migrating.md (#5840)
+- Fixed continuous integration tests (#6079)
+- Fixed bad like format (#6078)
- Bumped numpy version to >=1.23.5,<1.24.0 (#6082)
- Bumped onnx version to 1.15.0 (#6062)
- Bumped protobuf version to >=3.6,<21 (#6062)
@@ -78,7 +87,7 @@ versioned under `ml-agents-envs` package in the future (#)
### Minor Changes
#### com.unity.ml-agents / com.unity.ml-agents.extensions (C#)
- Added switch to RayPerceptionSensor to allow rays to be ordered left to right. (#26)
- - Current alternating order is still the default but will be deprecated.
+ - Current alternating order is still the default but will be deprecated.
- Added support for enabling/disabling camera object attached to camera sensor in order to improve performance. (#31)
#### ml-agents / ml-agents-envs
@@ -952,4 +961,4 @@ vector observations to be used simultaneously. (#3981) Thank you @shakenes !
### This is the first release of _Unity Package ML-Agents_.
-_Short description of this release_
+ - Initial release.
diff --git a/com.unity.ml-agents/CODEOWNERS.meta b/com.unity.ml-agents/CODEOWNERS.meta
deleted file mode 100644
index f288a23537..0000000000
--- a/com.unity.ml-agents/CODEOWNERS.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 5de323c2110f44676ba99dc49409363c
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md
index bfb9ec4b1b..f1cf051892 100644
--- a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md
+++ b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md
@@ -1,35 +1,20 @@
-# About ML-Agents package (`com.unity.ml-agents`)
-
-The _ML-Agents_ package contains the primary C# SDK for the [Unity ML-Agents
-Toolkit].
-
-The package allows you to convert any Unity scene into a learning environment
-and train character behaviors using a variety of machine learning algorithms.
-Additionally, it allows you to embed these trained behaviors back into Unity
-scenes to control your characters. More specifically, the package provides the
-following core functionalities:
-
-- Define Agents: entities, or characters, whose behavior will be learned. Agents
- are entities that generate observations (through sensors), take actions, and
- receive rewards from the environment.
-- Define Behaviors: entities that specify how an agent should act. Multiple
- agents can share the same Behavior and a scene may have multiple Behaviors.
-- Record demonstrations of an agent within the Editor. You can use
- demonstrations to help train a behavior for that agent.
-- Embedding a trained behavior into the scene via the [Unity Inference Engine].
- Embedded behaviors allow you to switch an Agent between learning and
- inference.
-
-Note that the _ML-Agents_ package does not contain the machine learning
-algorithms for training behaviors. The _ML-Agents_ package only supports
-instrumenting a Unity scene, setting it up for training, and then embedding the
-trained model back into your Unity scene. The machine learning algorithms that
-orchestrate training are part of the companion [Python package].
-
-Note that we also provide an _ML-Agents Extensions_ package
-(`com.unity.ml-agents.extensions`) that contains early/experimental features
-that you may find useful. This package is only available from the [ML-Agents
-GitHub repo].
+# ML-Agents Overview
+ML-agents enable games and simulations to serve as environments for training intelligent agents in Unity. Training can be done with reinforcement learning, imitation learning, neuroevolution, or any other methods. Trained agents can be used for many use cases, including controlling NPC behavior (in a variety of settings such as multi-agent and adversarial), automated testing of game builds and evaluating different game design decisions pre-release.
+
+The _ML-Agents_ package has a C# SDK for the [Unity ML-Agents Toolkit], which can be used outside of Unity. The scope of these docs is just to get started in the context of Unity, but further details and samples are located on the [github docs].
+
+## Capabilities
+The package allows you to convert any Unity scene into a learning environment and train character behaviors using a variety of machine-learning algorithms. Additionally, it allows you to embed these trained behaviors back into Unity scenes to control your characters. More specifically, the package provides the following core functionalities:
+
+* Define Agents: entities, or characters, whose behavior will be learned. Agents are entities that generate observations (through sensors), take actions, and receive rewards from the environment.
+* Define Behaviors: entities that specify how an agent should act. Multiple agents can share the same Behavior and a scene may have multiple Behaviors.
+* Record demonstrations: To show the behaviors of an agent within the Editor. You can use demonstrations to help train a behavior for that agent.
+* Embed a trained behavior (aka: run your ML model) in the scene via the [Unity Sentis] inference engine. Embedded behaviors allow you to switch an Agent between learning and inference.
+
+## Special Notes
+Note that the ML-Agents package does not contain the machine learning algorithms for training behaviors. The ML-Agents package only supports instrumenting a Unity scene, setting it up for training, and then embedding the trained model back into your Unity scene. The machine learning algorithms that orchestrate training are part of the companion [python package].
+Note that we also provide an ML-Agents Extensions package (`com.unity.ml-agents.extensions`) that contains early/experimental features that you may find useful. This package is only available from the [ML-Agents GitHub repo].
+
## Package contents
@@ -47,49 +32,15 @@ The following table describes the package folder structure:
## Installation
+To add the ML-Agents package to a Unity project:
-To install this _ML-Agents_ package, follow the instructions in the [Package
-Manager documentation].
-
-To install the companion Python package to enable training behaviors, follow the
-[installation instructions] on our [GitHub repository].
-
-### Advanced Installation
-With the changes to Unity Package Manager in 2021, experimental packages will not show up in the package list and have to be installed manually. There are two recommended ways to install the package manually:
-
-#### Github via Package Manager
-
-In Unity 2019.4 or later, open the Package Manager, hit the "+" button, and select "Add package from git URL".
-
-
-
-In the dialog that appears, enter
-
-```
-git+https://github.com/Unity-Technologies/ml-agents.git?path=com.unity.ml-agents#release_21
-```
-
-You can also edit your project's `manifest.json` directly and add the following line to the `dependencies`
-section:
-
-```
-"com.unity.ml-agents": "git+https://github.com/Unity-Technologies/ml-agents.git?path=com.unity.ml-agents#release_21",
-```
-
-See [Git dependencies](https://docs.unity3d.com/Manual/upm-git.html#subfolder) for more information. Note that this
-may take several minutes to resolve the packages the first time that you add it.
+* Create a new Unity project with Unity 2023.2 (or later) or open an existing one.
+* To open the Package Manager, navigate to Window > Package Manager.
+* Click + and select Add package by name...
+* Enter com.unity.ml-agents
+*Click Add to add the package to your project.
-#### Local Installation for Development
-
-[Clone the repository](https://github.com/Unity-Technologies/ml-agents/tree/release_21_docs/docs/Installation.md#clone-the-ml-agents-toolkit-repository-optional) and follow the
-[Local Installation for Development](https://github.com/Unity-Technologies/ml-agents/tree/release_21_docs/docs/Installation.md#advanced-local-installation-for-development-1) directions.
-
-## Requirements
-
-This version of the Unity ML-Agents package is compatible with the following
-versions of the Unity Editor:
-
-- 2019.4 and later
+To install the companion Python package to enable training behaviors, follow the [installation instructions] on our [GitHub repository].
## Known Limitations
@@ -102,62 +53,33 @@ mode if training is not supported or is not currently running.
### Inference
-Inference is executed via the
-[Unity Inference Engine](https://docs.unity3d.com/Packages/com.unity.sentis@latest/index.html).
-
-**CPU**
-
-All platforms supported.
-
-**GPU**
-
-All platforms supported except:
-
-- WebGL and GLES 3/2 on Android / iPhone
-
-**NOTE:** Mobile platform support includes:
-
-- Vulkan for Android
-- Metal for iOS.
+Inference is executed via [Unity Sentis](https://docs.unity3d.com/Packages/com.unity.sentis@latest/index.html) on the end-user device. Therefore, it is subject to the performance limitations of the end-user CPU or GPU. Also, only models created with our trainers are supported for running ML-Agents with a neural network behavior.
### Headless Mode
-If you enable Headless mode, you will not be able to collect visual observations
-from your agents.
+If you enable Headless mode, you will not be able to collect visual observations from your agents.
### Rendering Speed and Synchronization
-Currently the speed of the game physics can only be increased to 100x real-time.
-The Academy also moves in time with FixedUpdate() rather than Update(), so game
-behavior implemented in Update() may be out of sync with the agent decision
-making. See [Execution Order of Event Functions] for more information.
-
-You can control the frequency of Academy stepping by calling
-`Academy.Instance.DisableAutomaticStepping()`, and then calling
-`Academy.Instance.EnvironmentStep()`
+Currently the speed of the game physics can only be increased to 100x real-time. The Academy (the sentinel that controls the stepping of the game to make sure everything is synchronized, from collection of observations to applying actions generated from policy inference to the agent) also moves in time with `FixedUpdate()` rather than `Update()`, so game behavior implemented in Update() may be out of sync with the agent decision-making. See [Execution Order of Event Functions] for more information.
-### Unity Inference Engine Models
+You can control the frequency of Academy stepping by calling `Academy.Instance.DisableAutomaticStepping()`, and then calling `Academy.Instance.EnvironmentStep()`.
-Currently, only models created with our trainers are supported for running
-ML-Agents with a neural network behavior.
+## Additional Resources
-## Helpful links
+* [GitHub repository]
+* [Unity Discussions]
+* [Discord]
+* [Website]
-If you are new to the Unity ML-Agents package, or have a question after reading
-the documentation, you can checkout our [GitHub Repository], which also includes
-a number of ways to [connect with us] including our [ML-Agents Forum].
-
-In order to improve the developer experience for Unity ML-Agents Toolkit, we have added in-editor analytics.
-Please refer to "Information that is passively collected by Unity" in the
-[Unity Privacy Policy](https://unity3d.com/legal/privacy-policy).
-
-[unity ML-Agents Toolkit]: https://github.com/Unity-Technologies/ml-agents
-[unity inference engine]: https://docs.unity3d.com/Packages/com.unity.sentis@latest/index.html
-[package manager documentation]: https://docs.unity3d.com/Manual/upm-ui-install.html
-[installation instructions]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Installation.md
-[github repository]: https://github.com/Unity-Technologies/ml-agents
+[github docs]: https://unity-technologies.github.io/ml-agents/
+[installation instructions]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Installation.md
+[Unity Sentis]: https://docs.unity3d.com/Packages/com.unity.sentis@2.1/manual/index.html
[python package]: https://github.com/Unity-Technologies/ml-agents
-[execution order of event functions]: https://docs.unity3d.com/Manual/ExecutionOrder.html
-[connect with us]: https://github.com/Unity-Technologies/ml-agents#community-and-feedback
-[ml-agents forum]: https://forum.unity.com/forums/ml-agents.453/
-[ML-Agents GitHub repo]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/com.unity.ml-agents.extensions
+[ML-Agents GitHub repo]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/com.unity.ml-agents.extensions
+[GitHub repository]: https://github.com/Unity-Technologies/ml-agents
+[Execution Order of Event Functions]: https://docs.unity3d.com/Manual/ExecutionOrder.html
+[Unity Discussions]: https://discussions.unity.com/tag/ml-agents
+[Discord]: https://discord.com/channels/489222168727519232/1202574086115557446
+[Website]: https://unity-technologies.github.io/ml-agents/
+
diff --git a/com.unity.ml-agents/Documentation~/filter.yml b/com.unity.ml-agents/Documentation~/filter.yml
index ce144daf61..cf9dd6c148 100755
--- a/com.unity.ml-agents/Documentation~/filter.yml
+++ b/com.unity.ml-agents/Documentation~/filter.yml
@@ -3,12 +3,12 @@ apiRules:
uidRegex: .*Test.*
type: Namespace
- exclude:
- uidRegex: ^Unity.MLAgents\.CommunicatorObjects$
+ uidRegex: ^Unity\.MLAgents\.CommunicatorObjects$
type: Namespace
- exclude:
- uidRegex: ^Unity.MLAgents\.Editor$
+ uidRegex: ^Unity\.MLAgents\.Editor$
type: Namespace
- exclude:
- uidRegex: ^Unity.MLAgentsExamples$
+ uidRegex: ^Unity\.MLAgentsExamples$
type: Namespace
diff --git a/com.unity.ml-agents/Editor/DemonstrationDrawer.cs b/com.unity.ml-agents/Editor/DemonstrationDrawer.cs
index 484e6b6a9a..7a8f4854bd 100644
--- a/com.unity.ml-agents/Editor/DemonstrationDrawer.cs
+++ b/com.unity.ml-agents/Editor/DemonstrationDrawer.cs
@@ -95,7 +95,7 @@ void MakeActionsProperty(SerializedProperty property)
///
/// Render the observation shapes of a DemonstrationSummary.
///
- ///
+ /// Serialized properties.
void MakeObservationsProperty(SerializedProperty obsSummariesProperty)
{
var shapesLabels = new List();
diff --git a/com.unity.ml-agents/Editor/EditorUtilities.cs b/com.unity.ml-agents/Editor/EditorUtilities.cs
index 8ef266f259..1238bce7c3 100644
--- a/com.unity.ml-agents/Editor/EditorUtilities.cs
+++ b/com.unity.ml-agents/Editor/EditorUtilities.cs
@@ -10,7 +10,7 @@ public static class EditorUtilities
///
/// Whether or not properties that affect the model can be updated at the current time.
///
- ///
+ /// True if the model can be updated, False if not.
public static bool CanUpdateModelProperties()
{
return !Application.isPlaying;
diff --git a/com.unity.ml-agents/LICENSE.md b/com.unity.ml-agents/LICENSE.md
index 42863a2c98..4ddbb5310f 100644
--- a/com.unity.ml-agents/LICENSE.md
+++ b/com.unity.ml-agents/LICENSE.md
@@ -1,4 +1,4 @@
-com.unity.ml-agents copyright © 2017 Unity Technologies
+ML Agents copyright © 2017 Unity Technologies
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -11,192 +11,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
diff --git a/com.unity.ml-agents/Runtime/Academy.cs b/com.unity.ml-agents/Runtime/Academy.cs
index 52bfabb478..7916a001b9 100644
--- a/com.unity.ml-agents/Runtime/Academy.cs
+++ b/com.unity.ml-agents/Runtime/Academy.cs
@@ -20,7 +20,7 @@
* API. For more information on each of these entities, in addition to how to
* set-up a learning environment and train the behavior of characters in a
* Unity scene, please browse our documentation pages on GitHub:
- * https://github.com/Unity-Technologies/ml-agents/tree/release_21_docs/docs/
+ * https://github.com/Unity-Technologies/ml-agents/tree/release_22_docs/docs/
*/
namespace Unity.MLAgents
@@ -61,7 +61,7 @@ void FixedUpdate()
/// fall back to inference or heuristic decisions. (You can also set agents to always use
/// inference or heuristics.)
///
- [HelpURL("https://github.com/Unity-Technologies/ml-agents/tree/release_21_docs/" +
+ [HelpURL("https://github.com/Unity-Technologies/ml-agents/tree/release_22_docs/" +
"docs/Learning-Environment-Design.md")]
public class Academy : IDisposable
{
@@ -107,7 +107,7 @@ public class Academy : IDisposable
/// Unity package version of com.unity.ml-agents.
/// This must match the version string in package.json and is checked in a unit test.
///
- internal const string k_PackageVersion = "3.0.0-exp.1";
+ internal const string k_PackageVersion = "3.0.0";
const int k_EditorTrainingPort = 5004;
@@ -400,7 +400,7 @@ static int ReadPortFromArgs()
/// then the values of the parameters generated from the training process can be
/// retrieved here.
///
- ///
+ /// The `EnvironmentParameters` instance.
public EnvironmentParameters EnvironmentParameters
{
get { return m_EnvironmentParameters; }
@@ -410,7 +410,6 @@ public EnvironmentParameters EnvironmentParameters
/// Returns the instance. This instance can be used
/// to record any statistics from the Unity environment.
///
- ///
public StatsRecorder StatsRecorder
{
get { return m_StatsRecorder; }
@@ -537,9 +536,6 @@ public int EpisodeCount
///
/// The current step count (within the current episode).
///
- ///
- /// Current step count.
- ///
public int StepCount
{
get { return m_StepCount; }
@@ -548,9 +544,6 @@ public int StepCount
///
/// Returns the total step count.
///
- ///
- /// Total step count.
- ///
public int TotalStepCount
{
get { return m_TotalStepCount; }
diff --git a/com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs b/com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs
index 1ff35557d9..6bb14a7a34 100644
--- a/com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs
+++ b/com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs
@@ -22,7 +22,7 @@ internal class ActuatorManager : IList
///
/// Flag used to check if our IActuators are ready for execution.
///
- ///
+ ///
bool m_ReadyForExecution;
///
@@ -143,7 +143,7 @@ internal static ActionSpec CombineActionSpecs(IList actuators)
///
/// Returns an ActionSpec representing the concatenation of all IActuator's ActionSpecs
///
- ///
+ /// `ActionSpec` representing the concatenation of all `ActionSpec`s.
public ActionSpec GetCombinedActionSpec()
{
ReadyActuatorsForExecution();
diff --git a/com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs b/com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs
index 8f95de62e5..3dbb89d816 100644
--- a/com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs
+++ b/com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs
@@ -43,7 +43,7 @@ public static ActionBuffers FromDiscreteActions(float[] discreteActions)
///
/// Construct an instance with the continuous and discrete actions that will
/// be used.
- /// ///
+ ///
/// The continuous actions to send to an .
/// The discrete actions to send to an .
public ActionBuffers(float[] continuousActions, int[] discreteActions)
@@ -63,7 +63,7 @@ public ActionBuffers(ActionSegment continuousActions, ActionSegment
///
/// Construct an instance with . All values are initialized to zeros.
- /// ///
+ ///
/// The to send to an .
public ActionBuffers(ActionSpec actionSpec)
: this(new ActionSegment(new float[actionSpec.NumContinuousActions]),
@@ -184,7 +184,7 @@ public interface IActionReceiver
///
/// See [Agents - Actions] for more information on masking actions.
///
- /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#actions
+ /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#actions
///
///
void WriteDiscreteActionMask(IDiscreteActionMask actionMask);
diff --git a/com.unity.ml-agents/Runtime/Actuators/IActuator.cs b/com.unity.ml-agents/Runtime/Actuators/IActuator.cs
index aa2675905a..bb408af31c 100644
--- a/com.unity.ml-agents/Runtime/Actuators/IActuator.cs
+++ b/com.unity.ml-agents/Runtime/Actuators/IActuator.cs
@@ -14,7 +14,7 @@ public interface IActuator : IActionReceiver, IHeuristicProvider
///
/// Gets the name of this IActuator which will be used to sort it.
///
- ///
+ /// The string name of this `IActuator`
string Name { get; }
///
@@ -32,8 +32,8 @@ public static class IActuatorExtensions
///
/// Returns the number of discrete branches + the number of continuous actions.
///
- ///
- ///
+ /// Actuator
+ /// The number possible actions.
public static int TotalNumberOfActions(this IActuator actuator)
{
return actuator.ActionSpec.NumContinuousActions + actuator.ActionSpec.NumDiscreteActions;
diff --git a/com.unity.ml-agents/Runtime/Actuators/IDiscreteActionMask.cs b/com.unity.ml-agents/Runtime/Actuators/IDiscreteActionMask.cs
index 5845200cc5..dfb33901ff 100644
--- a/com.unity.ml-agents/Runtime/Actuators/IDiscreteActionMask.cs
+++ b/com.unity.ml-agents/Runtime/Actuators/IDiscreteActionMask.cs
@@ -16,7 +16,7 @@ public interface IDiscreteActionMask
///
/// See [Agents - Actions] for more information on masking actions.
///
- /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#masking-discrete-actions
+ /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#masking-discrete-actions
///
/// The branch for which the actions will be masked.
/// Index of the action.
diff --git a/com.unity.ml-agents/Runtime/Agent.cs b/com.unity.ml-agents/Runtime/Agent.cs
index b1a3320e28..66f4c3821e 100644
--- a/com.unity.ml-agents/Runtime/Agent.cs
+++ b/com.unity.ml-agents/Runtime/Agent.cs
@@ -60,11 +60,18 @@ public struct AgentInfo
///
public int groupId;
+ ///
+ /// Clear stored actions.
+ ///
public void ClearActions()
{
storedActions.Clear();
}
+ ///
+ /// Copy actions.
+ ///
+ /// The ActionBuffers to copy from.
public void CopyActions(ActionBuffers actionBuffers)
{
var continuousActions = storedActions.ContinuousActions;
@@ -128,15 +135,15 @@ public override BuiltInActuatorType GetBuiltInActuatorType()
/// component attached to the agent's [GameObject]. The setting
/// determines how decisions are made:
///
- /// * : decisions are made by the external process,
- /// when connected. Otherwise, decisions are made using inference. If no inference model
- /// is specified in the BehaviorParameters component, then heuristic decision
- /// making is used.
- /// * : decisions are always made using the trained
- /// model specified in the component.
- /// * : when a decision is needed, the agent's
- /// function is called. Your implementation is responsible for
- /// providing the appropriate action.
+ /// : decisions are made by the external process,
+ /// when connected. Otherwise, decisions are made using inference. If no inference model
+ /// is specified in the BehaviorParameters component, then heuristic decision
+ /// making is used.
+ /// : decisions are always made using the trained
+ /// model specified in the component.
+ /// : when a decision is needed, the agent's
+ /// function is called. Your implementation is responsible for
+ /// providing the appropriate action.
///
/// To trigger an agent decision automatically, you can attach a
/// component to the Agent game object. You can also call the agent's
@@ -185,13 +192,13 @@ public override BuiltInActuatorType GetBuiltInActuatorType()
/// [OnDisable()]: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnDisable.html]
/// [OnBeforeSerialize()]: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnBeforeSerialize.html
/// [OnAfterSerialize()]: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnAfterSerialize.html
- /// [Agents]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md
- /// [Reinforcement Learning in Unity]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design.md
+ /// [Agents]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md
+ /// [Reinforcement Learning in Unity]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design.md
/// [Unity ML-Agents Toolkit]: https://github.com/Unity-Technologies/ml-agents
- /// [Unity ML-Agents Toolkit manual]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Readme.md
+ /// [Unity ML-Agents Toolkit manual]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Readme.md
///
///
- [HelpURL("https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/" +
+ [HelpURL("https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/" +
"docs/Learning-Environment-Design-Agents.md")]
[Serializable]
[RequireComponent(typeof(BehaviorParameters))]
@@ -228,20 +235,25 @@ internal struct AgentParameters
/// Set to 0 for unlimited episode length.
///
/// When an episode ends and a new one begins, the Agent object's
- /// function is called. You can implement
+ /// function is called. You can implement
/// to reset the agent or remove it from the
- /// environment. An agent's episode can also end if you call its
+ /// environment. An agent's episode can also end if you call its
/// method or an external process resets the environment through the .
///
/// Consider limiting the number of steps in an episode to avoid wasting time during
/// training. If you set the max step value to a reasonable estimate of the time it should
/// take to complete a task, then agents that haven’t succeeded in that time frame will
/// reset and start a new training episode rather than continue to fail.
+ ///
+ /// **Note:** in general, you should limit the differences between the code you execute
+ /// during training and the code you run during inference.
///
///
+ ///
/// To use a step limit when training while allowing agents to run without resetting
/// outside of training, you can set the max step to 0 in
/// if the is not connected to an external process.
+ ///
///
/// using Unity.MLAgents;
///
@@ -256,8 +268,6 @@ internal struct AgentParameters
/// }
/// }
///
- /// **Note:** in general, you should limit the differences between the code you execute
- /// during training and the code you run during inference.
///
[FormerlySerializedAs("maxStep")]
[HideInInspector] public int MaxStep;
@@ -465,7 +475,7 @@ public void OnAfterDeserialize()
/// Initializes the agent. Can be safely called multiple times.
///
///
- /// This function calls your implementation, if one exists.
+ /// This function calls your implementation, if one exists.
///
public void LazyInitialize()
{
@@ -685,9 +695,7 @@ internal void ReloadPolicy()
///
/// Returns the current step counter (within the current episode).
///
- ///
- /// Current step count.
- ///
+ /// The current step count.
public int StepCount
{
get { return m_StepCount; }
@@ -697,9 +705,6 @@ public int StepCount
/// Returns the number of episodes that the Agent has completed (either
/// was called, or maxSteps was reached).
///
- ///
- /// Current episode count.
- ///
public int CompletedEpisodes
{
get { return m_CompletedEpisodes; }
@@ -723,8 +728,8 @@ public int CompletedEpisodes
/// for information about mixing reward signals from curiosity and Generative Adversarial
/// Imitation Learning (GAIL) with rewards supplied through this method.
///
- /// [Agents - Rewards]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#rewards
- /// [Reward Signals]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/ML-Agents-Overview.md#a-quick-note-on-reward-signals
+ /// [Agents - Rewards]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#rewards
+ /// [Reward Signals]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/ML-Agents-Overview.md#a-quick-note-on-reward-signals
///
/// The new value of the reward.
public void SetReward(float reward)
@@ -738,7 +743,7 @@ public void SetReward(float reward)
/// Increments the step and episode rewards by the provided value.
///
/// Use a positive reward to reinforce desired behavior. You can use a
- /// negative reward to penalize mistakes. Use to
+ /// negative reward to penalize mistakes. Use to
/// set the reward assigned to the current step with a specific value rather than
/// increasing or decreasing it.
///
@@ -751,8 +756,8 @@ public void SetReward(float reward)
/// for information about mixing reward signals from curiosity and Generative Adversarial
/// Imitation Learning (GAIL) with rewards supplied through this method.
///
- /// [Agents - Rewards]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#rewards
- /// [Reward Signals]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/ML-Agents-Overview.md#a-quick-note-on-reward-signals
+ /// [Agents - Rewards]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#rewards
+ /// [Reward Signals]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/ML-Agents-Overview.md#a-quick-note-on-reward-signals
///
/// Incremental reward value.
public void AddReward(float increment)
@@ -822,7 +827,7 @@ public void EpisodeInterrupted()
///
/// Internal method to end the episode and reset the Agent.
///
- ///
+ /// reason to end the episode.
void EndEpisodeAndReset(DoneReason reason)
{
NotifyAgentDone(reason);
@@ -838,11 +843,11 @@ void EndEpisodeAndReset(DoneReason reason)
/// cannot use the decision every step, then you can request a decision less
/// frequently.
///
- /// You can add a component to the agent's
+ /// You can add a component to the agent's
/// [GameObject] to drive the agent's decision making. When you use this component,
/// do not call `RequestDecision()` separately.
///
- /// Note that this function calls ; you do not need to
+ /// Note that this function calls ; you do not need to
/// call both functions at the same time.
///
/// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html
@@ -859,7 +864,7 @@ public void RequestDecision()
///
/// Call `RequestAction()` to repeat the previous action returned by the agent's
/// most recent decision. A new decision is not requested. When you call this function,
- /// the Agent instance invokes with the
+ /// the Agent instance invokes with the
/// existing action vector.
///
/// You can use `RequestAction()` in situations where an agent must take an action
@@ -867,11 +872,11 @@ public void RequestDecision()
/// agent that moves through its environment might need to apply an action to keep
/// moving, but only needs to make a decision to change course or speed occasionally.
///
- /// You can add a component to the agent's
+ /// You can add a component to the agent's
/// [GameObject] to drive the agent's decision making and action frequency. When you
/// use this component, do not call `RequestAction()` separately.
///
- /// Note that calls `RequestAction()`; you do not need to
+ /// Note that calls `RequestAction()`; you do not need to
/// call both functions at the same time.
///
/// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html
@@ -898,7 +903,7 @@ void ResetData()
/// the Agent object needs references to other [GameObjects] in the scene, you
/// can collect and store those references here.
///
- /// Note that is called at the start of each of
+ /// Note that is called at the start of each of
/// the agent's "episodes". You can use that function for items that need to be reset
/// for each episode.
///
@@ -919,7 +924,7 @@ public virtual void Initialize() { }
/// The same array will be reused between steps. It is up to the user to initialize
/// the values on each call, for example by calling `Array.Clear(actionsOut, 0, actionsOut.Length);`.
/// Add values to the array at the same indexes as they are used in your
- /// function, which receives this array and
+ /// function, which receives this array and
/// implements the corresponding agent behavior. See [Actions] for more information
/// about agent actions.
/// Note : Do not create a new float array of action in the `Heuristic()` method,
@@ -940,27 +945,29 @@ public virtual void Initialize() { }
/// implementing a simple heuristic function can aid in debugging agent actions and interactions
/// with its environment.
///
- /// [Demonstration Recorder]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#recording-demonstrations
- /// [Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#actions
+ /// [Demonstration Recorder]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#recording-demonstrations
+ /// [Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#actions
/// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html
///
///
+ ///
/// The following example illustrates a `Heuristic()` function that provides WASD-style
/// keyboard control for an agent that can move in two dimensions as well as jump. See
/// [Input Manager] for more information about the built-in Unity input functions.
/// You can also use the [Input System package], which provides a more flexible and
/// configurable input system.
- ///
- /// public override void Heuristic(in ActionBuffers actionsOut)
- /// {
- /// var continuousActionsOut = actionsOut.ContinuousActions;
- /// continuousActionsOut[0] = Input.GetAxis("Horizontal");
- /// continuousActionsOut[1] = Input.GetKey(KeyCode.Space) ? 1.0f : 0.0f;
- /// continuousActionsOut[2] = Input.GetAxis("Vertical");
- /// }
- ///
/// [Input Manager]: https://docs.unity3d.com/Manual/class-InputManager.html
/// [Input System package]: https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/index.html
+ ///
+ ///
+ /// public override void Heuristic(in ActionBuffers actionsOut)
+ /// {
+ /// var continuousActionsOut = actionsOut.ContinuousActions;
+ /// continuousActionsOut[0] = Input.GetAxis("Horizontal");
+ /// continuousActionsOut[1] = Input.GetKey(KeyCode.Space) ? 1.0f : 0.0f;
+ /// continuousActionsOut[2] = Input.GetAxis("Vertical");
+ /// }
+ ///
///
/// The which contain the continuous and
/// discrete action buffers to write to.
@@ -1175,7 +1182,7 @@ void ResetSensors()
/// implement a `CollectObservations()` function.
///
/// Add vector observations to the parameter passed to
- /// this method by calling the helper methods:
+ /// this method by calling the helper methods:
/// -
/// -
/// -
@@ -1196,7 +1203,7 @@ void ResetSensors()
/// For more information about observations, see [Observations and Sensors].
///
/// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html
- /// [Observations and Sensors]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#observations-and-sensors
+ /// [Observations and Sensors]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#observations-and-sensors
///
public virtual void CollectObservations(VectorSensor sensor)
{
@@ -1238,7 +1245,7 @@ public ReadOnlyCollection GetStackedObservations()
///
/// See [Agents - Actions] for more information on masking actions.
///
- /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#actions
+ /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#actions
///
///
public virtual void WriteDiscreteActionMask(IDiscreteActionMask actionMask) { }
@@ -1248,7 +1255,8 @@ public virtual void WriteDiscreteActionMask(IDiscreteActionMask actionMask) { }
/// on the provided action.
///
///
- /// An action is passed to this function in the form of an .
+ ///
+ /// An action is passed to this function in the form of an .
/// Your implementation must use the array to direct the agent's behavior for the
/// current step.
///
@@ -1258,7 +1266,7 @@ public virtual void WriteDiscreteActionMask(IDiscreteActionMask actionMask) { }
/// three values in ActionBuffers.ContinuousActions array to use as the force components.
/// During training, the agent's policy learns to set those particular elements of
/// the array to maximize the training rewards the agent receives. (Of course,
- /// if you implement a function, it must use the same
+ /// if you implement a function, it must use the same
/// elements of the action array for the same purpose since there is no learning
/// involved.)
///
@@ -1273,7 +1281,7 @@ public virtual void WriteDiscreteActionMask(IDiscreteActionMask actionMask) { }
/// When an agent uses discrete actions, the values in the ActionBuffers.DiscreteActions array
/// are integers that each represent a specific, discrete action. For example,
/// you could define a set of discrete actions such as:
- ///
+ ///
///
/// 0 = Do nothing
/// 1 = Move one space left
@@ -1281,7 +1289,7 @@ public virtual void WriteDiscreteActionMask(IDiscreteActionMask actionMask) { }
/// 3 = Move one space up
/// 4 = Move one space down
///
- ///
+ ///
/// When making a decision, the agent picks one of the five actions and puts the
/// corresponding integer value in the ActionBuffers.DiscreteActions array. For example, if the agent
/// decided to move left, the ActionBuffers.DiscreteActions parameter would be an array with
@@ -1304,7 +1312,8 @@ public virtual void WriteDiscreteActionMask(IDiscreteActionMask actionMask) { }
///
/// For more information about implementing agent actions see [Agents - Actions].
///
- /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#actions
+ /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Learning-Environment-Design-Agents.md#actions
+ ///
///
///
/// Struct containing the buffers of actions to be executed at this step.
diff --git a/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs b/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs
index 76d0cdd53b..7cf2b85ac1 100644
--- a/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs
+++ b/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs
@@ -95,7 +95,6 @@ public static bool IsAnalyticsEnabled()
/// List of ISensors for the Agent. Used to generate information about the observation space.
/// ActionSpec for the Agent. Used to generate information about the action space.
/// List of IActuators for the Agent. Used to generate information about the action space.
- ///
[Conditional("MLA_UNITY_ANALYTICS_MODULE")]
public static void InferenceModelSet(
ModelAsset nnModel,
@@ -142,7 +141,7 @@ IList actuators
///
///
///
- ///
+ /// `InferenceEvent` from the input model.
internal static InferenceEvent GetEventForModel(
ModelAsset nnModel,
string behaviorName,
@@ -203,7 +202,7 @@ IList actuators
/// and the calculations are the same.
///
///
- ///
+ /// The total model weight size in bytes.
static long GetModelWeightSize(Model sentisModel)
{
long totalWeightsSizeInBytes = 0;
@@ -260,7 +259,7 @@ public override string ToString()
/// This increases the chance of a collision, but this should still be extremely rare.
///
///
- ///
+ /// The hash of the model's layer data.
static string GetModelHash(Model sentisModel)
{
var hash = new MLAgentsHash128();
diff --git a/com.unity.ml-agents/Runtime/Communicator/CommunicatorFactory.cs b/com.unity.ml-agents/Runtime/Communicator/CommunicatorFactory.cs
index 02d1e4efbd..712a643b44 100644
--- a/com.unity.ml-agents/Runtime/Communicator/CommunicatorFactory.cs
+++ b/com.unity.ml-agents/Runtime/Communicator/CommunicatorFactory.cs
@@ -23,6 +23,9 @@ public static bool Enabled
set => s_Enabled = value;
}
+ ///
+ /// Check if a communicator has been registered.
+ ///
public static bool CommunicatorRegistered => s_Creator != null;
internal static ICommunicator Create()
@@ -30,11 +33,19 @@ internal static ICommunicator Create()
return s_Enabled ? s_Creator() : null;
}
+ ///
+ /// Register a function that will create an ICommunicator instance.
+ ///
+ /// Creator
+ /// Type of communicator
public static void Register(Func creator) where T : ICommunicator
{
s_Creator = () => creator();
}
+ ///
+ /// Clear the registered creator.
+ ///
public static void ClearCreator()
{
s_Creator = null;
diff --git a/com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs b/com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
index 480ea6dac2..8b9e8d7667 100644
--- a/com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
+++ b/com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
@@ -99,7 +99,7 @@ public static AgentInfoProto ToAgentInfoProto(this AgentInfo ai)
/// Get summaries for the observations in the AgentInfo part of the AgentInfoActionPairProto.
///
///
- ///
+ /// Summary of the observations.
public static List GetObservationSummaries(this AgentInfoActionPairProto infoActionPair)
{
List summariesOut = new List();
@@ -337,7 +337,7 @@ public static ActionBuffers ToActionBuffers(this AgentActionProto proto)
///
///
///
- ///
+ /// `ObservationProto` for the sensor.
public static ObservationProto GetObservationProto(this ISensor sensor, ObservationWriter observationWriter)
{
var obsSpec = sensor.GetObservationSpec();
diff --git a/com.unity.ml-agents/Runtime/Communicator/ICommunicator.cs b/com.unity.ml-agents/Runtime/Communicator/ICommunicator.cs
index 2036a2aa28..c39281990d 100644
--- a/com.unity.ml-agents/Runtime/Communicator/ICommunicator.cs
+++ b/com.unity.ml-agents/Runtime/Communicator/ICommunicator.cs
@@ -5,6 +5,9 @@
namespace Unity.MLAgents
{
+ ///
+ /// Communicator initialization parameters.
+ ///
public struct CommunicatorInitParameters
{
///
@@ -32,6 +35,10 @@ public struct CommunicatorInitParameters
///
public UnityRLCapabilities CSharpCapabilities;
}
+
+ ///
+ /// Initialization parameters for the Unity environment.
+ ///
public struct UnityRLInitParameters
{
///
@@ -83,42 +90,43 @@ internal struct UnityRLInputParameters
///
internal delegate void RLInputReceivedHandler(UnityRLInputParameters inputParams);
- /**
- This is the interface of the Communicators.
- This does not need to be modified nor implemented to create a Unity environment.
-
- When the Unity Communicator is initialized, it will wait for the External Communicator
- to be initialized as well. The two communicators will then exchange their first messages
- that will usually contain information for initialization (information that does not need
- to be resent at each new exchange).
-
- By convention a Unity input is from External to Unity and a Unity output is from Unity to
- External. Inputs and outputs are relative to Unity.
-
- By convention, when the Unity Communicator and External Communicator call exchange, the
- exchange is NOT simultaneous but sequential. This means that when a side of the
- communication calls exchange, the other will receive the result of its previous
- exchange call.
- This is what happens when A calls exchange a single time:
- A sends data_1 to B -> B receives data_1 -> B generates and sends data_2 -> A receives data_2
- When A calls exchange, it sends data_1 and receives data_2
-
- Since the messages are sent back and forth with exchange and simultaneously when calling
- initialize, External sends two messages at initialization.
-
- The structure of the messages is as follows:
- UnityMessage
- ...Header
- ...UnityOutput
- ......UnityRLOutput
- ......UnityRLInitializationOutput
- ...UnityInput
- ......UnityRLInput
- ......UnityRLInitializationInput
-
- UnityOutput and UnityInput can be extended to provide functionalities beyond RL
- UnityRLOutput and UnityRLInput can be extended to provide new RL functionalities
- */
+ ///
+ /// This is the interface of the Communicators.
+ /// This does not need to be modified nor implemented to create a Unity environment.
+ ///
+ /// When the Unity Communicator is initialized, it will wait for the External Communicator
+ /// to be initialized as well. The two communicators will then exchange their first messages
+ /// that will usually contain information for initialization (information that does not need
+ /// to be resent at each new exchange).
+ ///
+ /// By convention a Unity input is from External to Unity and a Unity output is from Unity to
+ /// External. Inputs and outputs are relative to Unity.
+ ///
+ /// By convention, when the Unity Communicator and External Communicator call exchange, the
+ /// exchange is NOT simultaneous but sequential. This means that when a side of the
+ /// communication calls exchange, the other will receive the result of its previous
+ /// xchange call.
+ /// This is what happens when A calls exchange a single time:
+ /// A sends data_1 to B -> B receives data_1 -> B generates and sends data_2 -> A receives data_2
+ /// When A calls exchange, it sends data_1 and receives data_2
+ ///
+ /// Since the messages are sent back and forth with exchange and simultaneously when calling
+ /// initialize, External sends two messages at initialization.
+ ///
+ /// The structure of the messages is as follows:
+ /// UnityMessage
+ /// ...Header
+ /// ...UnityOutput
+ /// ......UnityRLOutput
+ /// ......UnityRLInitializationOutput
+ /// ...UnityInput
+ /// ......UnityRLInput
+ /// ......UnityRLInitializationInput
+ ///
+ /// UnityOutput and UnityInput can be extended to provide functionalities beyond RL
+ /// UnityRLOutput and UnityRLInput can be extended to provide new RL functionalities
+ ///
+ ///
public interface ICommunicator : IDisposable
{
///
@@ -167,7 +175,7 @@ public interface ICommunicator : IDisposable
///
/// A key to identify which behavior actions to get.
/// A key to identify which Agent actions to get.
- ///
+ /// `ActionBuffers` corresponding to the input key.
ActionBuffers GetActions(string key, int agentId);
}
}
diff --git a/com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs b/com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs
index 3dffcf52b7..af91dcd771 100644
--- a/com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs
+++ b/com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs
@@ -2,20 +2,57 @@
namespace Unity.MLAgents
{
+ ///
+ /// A class holding the capabilities flags for Reinforcement Learning across C# and the Trainer codebase.
+ ///
public class UnityRLCapabilities
{
+ ///
+ /// Base RL capabilities.
+ ///
public bool BaseRLCapabilities;
+
+ ///
+ /// Concatenated PNG observations.
+ ///
public bool ConcatenatedPngObservations;
+
+ ///
+ /// Compressed channel mapping.
+ ///
public bool CompressedChannelMapping;
+
+ ///
+ /// Hybrid actions.
+ ///
public bool HybridActions;
+
+ ///
+ /// Training analytics.
+ ///
public bool TrainingAnalytics;
+
+ ///
+ /// Variable length observation.
+ ///
public bool VariableLengthObservation;
+
+ ///
+ /// Multi-agent groups.
+ ///
public bool MultiAgentGroups;
///
/// A class holding the capabilities flags for Reinforcement Learning across C# and the Trainer codebase. This
/// struct will be used to inform users if and when they are using C# / Trainer features that are mismatched.
///
+ /// Base RL capabilities.
+ /// Concatenated PNG observations.
+ /// Compressed channel mapping.
+ /// Hybrid actions.
+ /// Training analytics.
+ /// Variable length observation.
+ /// Multi-agent groups.
public UnityRLCapabilities(
bool baseRlCapabilities = true,
bool concatenatedPngObservations = true,
@@ -36,9 +73,9 @@ public UnityRLCapabilities(
///
/// Will print a warning to the console if Python does not support base capabilities and will
- /// return true if the warning was printed.
+ /// return true if the warning was printed.
///
- ///
+ /// True if the warning was printed, False if not.
public bool WarnOnPythonMissingBaseRLCapabilities()
{
if (BaseRLCapabilities)
diff --git a/com.unity.ml-agents/Runtime/DecisionRequester.cs b/com.unity.ml-agents/Runtime/DecisionRequester.cs
index 37b5ad299c..178c9c0864 100644
--- a/com.unity.ml-agents/Runtime/DecisionRequester.cs
+++ b/com.unity.ml-agents/Runtime/DecisionRequester.cs
@@ -15,7 +15,7 @@ namespace Unity.MLAgents
/// The DecisionRequester component provides a convenient and flexible way to
/// trigger the agent decision making process. Without a DecisionRequester,
/// your implementation must manually call its
- /// function.
+ /// function.
///
[AddComponentMenu("ML Agents/Decision Requester", (int)MenuGroup.Default)]
[RequireComponent(typeof(Agent))]
@@ -115,8 +115,8 @@ void MakeRequests(int academyStepCount)
///
/// Whether Agent.RequestDecision should be called on this update step.
///
- ///
- ///
+ /// `RequestDecision` context.
+ /// True if the agent `RequestDecision` should be called on this update step, False if not.
protected virtual bool ShouldRequestDecision(DecisionRequestContext context)
{
return context.AcademyStepCount % DecisionPeriod == DecisionStep;
@@ -125,8 +125,8 @@ protected virtual bool ShouldRequestDecision(DecisionRequestContext context)
///
/// Whether Agent.RequestAction should be called on this update step.
///
- ///
- ///
+ /// `RequestDecision` context.
+ /// True if the agent `RequestAction` should be called on this update step, False if not.
protected virtual bool ShouldRequestAction(DecisionRequestContext context)
{
return TakeActionsBetweenDecisions;
diff --git a/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs b/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs
index 13d623ebc3..a4101f8976 100644
--- a/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs
+++ b/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs
@@ -19,7 +19,7 @@ namespace Unity.MLAgents.Demonstrations
/// See [Imitation Learning - Recording Demonstrations] for more information.
///
/// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html
- /// [Imitation Learning - Recording Demonstrations]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs//Learning-Environment-Design-Agents.md#recording-demonstrations
+ /// [Imitation Learning - Recording Demonstrations]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs//Learning-Environment-Design-Agents.md#recording-demonstrations
///
[RequireComponent(typeof(Agent))]
[AddComponentMenu("ML Agents/Demonstration Recorder", (int)MenuGroup.Default)]
@@ -150,7 +150,7 @@ internal static string SanitizeName(string demoName, int maxNameLength)
///
///
///
- ///
+ /// Unique path.
internal static string MakeDemonstrationFilePath(
IFileSystem fileSystem, string demonstrationDirectory, string demonstrationName
)
@@ -203,7 +203,7 @@ void OnDestroy()
/// Add additional DemonstrationWriter to the Agent. It is still up to the user to Close this
/// DemonstrationWriters when recording is done.
///
- ///
+ /// `DemonstrationWriter` demonstation writer
public void AddDemonstrationWriterToAgent(DemonstrationWriter demoWriter)
{
var behaviorParams = GetComponent();
@@ -219,7 +219,7 @@ public void AddDemonstrationWriterToAgent(DemonstrationWriter demoWriter)
/// Remove additional DemonstrationWriter to the Agent. It is still up to the user to Close this
/// DemonstrationWriters when recording is done.
///
- ///
+ /// `DemonstrationWriter` demonstation writer
public void RemoveDemonstrationWriterFromAgent(DemonstrationWriter demoWriter)
{
m_Agent.DemonstrationWriters.Remove(demoWriter);
diff --git a/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationWriter.cs b/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationWriter.cs
index bd4426102f..952b0a800d 100644
--- a/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationWriter.cs
+++ b/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationWriter.cs
@@ -26,7 +26,7 @@ public class DemonstrationWriter
/// Create a DemonstrationWriter that will write to the specified stream.
/// The stream must support writes and seeking.
///
- ///
+ /// Target stream
public DemonstrationWriter(Stream stream)
{
m_Writer = stream;
diff --git a/com.unity.ml-agents/Runtime/EnvironmentParameters.cs b/com.unity.ml-agents/Runtime/EnvironmentParameters.cs
index fc1c667cd6..dbf69415b0 100644
--- a/com.unity.ml-agents/Runtime/EnvironmentParameters.cs
+++ b/com.unity.ml-agents/Runtime/EnvironmentParameters.cs
@@ -35,7 +35,7 @@ internal EnvironmentParameters()
///
/// The parameter key
/// Default value for this parameter.
- ///
+ /// The parameter value for the specified key.
public float GetWithDefault(string key, float defaultValue)
{
return m_Channel.GetWithDefault(key, defaultValue);
diff --git a/com.unity.ml-agents/Runtime/Inference/SentisModelInfo.cs b/com.unity.ml-agents/Runtime/Inference/SentisModelInfo.cs
index 791c1319d2..a2ef038299 100644
--- a/com.unity.ml-agents/Runtime/Inference/SentisModelInfo.cs
+++ b/com.unity.ml-agents/Runtime/Inference/SentisModelInfo.cs
@@ -97,7 +97,7 @@ public IReadOnlyList GetInputTensors()
///
/// Gets the Discrete Action Output Shape as a Tensor.
///
- ///
+ /// `Tensor` representation of the discret Action Ouptut Shape.
public Tensor GetDiscreteActionOutputShape()
{
return (Tensor)GetTensorByName(TensorNames.DiscreteActionOutputShape);
diff --git a/com.unity.ml-agents/Runtime/InplaceArray.cs b/com.unity.ml-agents/Runtime/InplaceArray.cs
index 91208136d8..b5472cf010 100644
--- a/com.unity.ml-agents/Runtime/InplaceArray.cs
+++ b/com.unity.ml-agents/Runtime/InplaceArray.cs
@@ -10,7 +10,7 @@ namespace Unity.MLAgents
///
/// This does not implement any interfaces such as IList, in order to avoid any accidental boxing allocations.
///
- ///
+ /// T
public struct InplaceArray : IEquatable> where T : struct
{
private const int k_MaxLength = 4;
@@ -24,7 +24,7 @@ public struct InplaceArray : IEquatable> where T : struct
///
/// Create a length-1 array.
///
- ///
+ /// Length of axis 0.
public InplaceArray(T elem0)
{
m_Length = 1;
@@ -37,8 +37,8 @@ public InplaceArray(T elem0)
///
/// Create a length-2 array.
///
- ///
- ///
+ /// Length of axis 0.
+ /// Length of axis 1.
public InplaceArray(T elem0, T elem1)
{
m_Length = 2;
@@ -51,9 +51,9 @@ public InplaceArray(T elem0, T elem1)
///
/// Create a length-3 array.
///
- ///
- ///
- ///
+ /// Length of axis 0.
+ /// Length of axis 1.
+ /// Length of axis 2.
public InplaceArray(T elem0, T elem1, T elem2)
{
m_Length = 3;
@@ -66,10 +66,10 @@ public InplaceArray(T elem0, T elem1, T elem2)
///
/// Create a length-3 array.
///
- ///
- ///
- ///
- ///
+ /// Length of axis 0.
+ /// Length of axis 1.
+ /// Length of axis 2.
+ /// Length of axis 3.
public InplaceArray(T elem0, T elem1, T elem2, T elem3)
{
m_Length = 4;
@@ -83,9 +83,9 @@ public InplaceArray(T elem0, T elem1, T elem2, T elem3)
/// Construct an InplaceArray from an IList (e.g. Array or List).
/// The source must be non-empty and have at most 4 elements.
///
- ///
- ///
- ///
+ /// The `IList` to construct the array from.
+ /// Corresponding `InplaceArray` from the input IList.
+ /// Argument out of range
public static InplaceArray FromList(IList elems)
{
switch (elems.Count)
@@ -106,8 +106,8 @@ public static InplaceArray FromList(IList elems)
///
/// Per-element access.
///
- ///
- ///
+ /// The index to get or set.
+ /// Index out of range
public T this[int index]
{
get
@@ -170,8 +170,8 @@ public int Length
///
/// Returns a string representation of the array's elements.
///
- ///
- ///
+ /// The string summary of the `InplaceArray`.
+ /// Index out of range
public override string ToString()
{
switch (m_Length)
@@ -192,8 +192,8 @@ public override string ToString()
///
/// Check that the arrays have the same length and have all equal values.
///
- ///
- ///
+ /// The first 'InplaceArray' to compare.
+ /// The second 'InplaceArray' to compare.
/// Whether the arrays are equivalent.
public static bool operator ==(InplaceArray lhs, InplaceArray rhs)
{
@@ -203,22 +203,22 @@ public override string ToString()
///
/// Check that the arrays are not equivalent.
///
- ///
- ///
+ /// The first 'InplaceArray' to compare.
+ /// The second 'InplaceArray' to compare.
/// Whether the arrays are not equivalent
public static bool operator !=(InplaceArray lhs, InplaceArray rhs) => !lhs.Equals(rhs);
///
/// Check that the arrays are equivalent.
///
- ///
+ /// The other 'InplaceArray' to compare.
/// Whether the arrays are not equivalent
public override bool Equals(object other) => other is InplaceArray other1 && this.Equals(other1);
///
/// Check that the arrays are equivalent.
///
- ///
+ /// The other 'InplaceArray' to compare.
/// Whether the arrays are not equivalent
public bool Equals(InplaceArray other)
{
@@ -231,7 +231,7 @@ public bool Equals(InplaceArray other)
///
/// Get a hashcode for the array.
///
- ///
+ /// The hashcode of the `InplaceArray`.
public override int GetHashCode()
{
return (m_Elem0, m_Elem1, m_Elem2, m_Elem3, Length).GetHashCode();
diff --git a/com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs
index d2f218a3f7..585be89197 100644
--- a/com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs
+++ b/com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs
@@ -35,8 +35,8 @@ public struct BoardSize
///
/// Check that all fields of the left-hand BoardSize are less than or equal to the field of the right-hand BoardSize
///
- ///
- ///
+ /// The first 'BoardSize' to compare.
+ /// The second 'BoardSize' to compare.
/// True if all fields are less than or equal.
public static bool operator <=(BoardSize lhs, BoardSize rhs)
{
@@ -47,8 +47,8 @@ public struct BoardSize
///
/// Check that all fields of the left-hand BoardSize are greater than or equal to the field of the right-hand BoardSize
///
- ///
- ///
+ /// The first 'BoardSize' to compare.
+ /// The second 'BoardSize' to compare.
/// True if all fields are greater than or equal.
public static bool operator >=(BoardSize lhs, BoardSize rhs)
{
@@ -59,7 +59,7 @@ public struct BoardSize
///
/// Return a string representation of the BoardSize.
///
- ///
+ /// The string summary of the `BoardSize`.
public override string ToString()
{
return
@@ -76,7 +76,7 @@ public abstract class AbstractBoard : MonoBehaviour
/// Return the maximum size of the board. This is used to determine the size of observations and actions,
/// so the returned values must not change.
///
- ///
+ /// The maxium size of the board.
public abstract BoardSize GetMaxBoardSize();
///
@@ -85,7 +85,7 @@ public abstract class AbstractBoard : MonoBehaviour
/// By default, this will return ; if your board doesn't change size, you don't need to
/// override it.
///
- ///
+ /// The current size of the board.
public virtual BoardSize GetCurrentBoardSize()
{
return GetMaxBoardSize();
@@ -96,9 +96,9 @@ public virtual BoardSize GetCurrentBoardSize()
/// This should be between 0 and BoardSize.NumCellTypes-1 (inclusive).
/// The actual order of the values doesn't matter.
///
- ///
- ///
- ///
+ /// The row index.
+ /// The collunm index.
+ /// Color of piece at given row and column.
public abstract int GetCellType(int row, int col);
///
@@ -106,9 +106,9 @@ public virtual BoardSize GetCurrentBoardSize()
/// This should be between 0 and BoardSize.NumSpecialTypes (inclusive).
/// The actual order of the values doesn't matter.
///
- ///
- ///
- ///
+ /// The row index.
+ /// The collunm index.
+ /// The special type of the piece at the give row and column.
public abstract int GetSpecialType(int row, int col);
///
@@ -121,7 +121,7 @@ public virtual BoardSize GetCurrentBoardSize()
/// passed to IsMoveValid().
///
/// The move to check.
- ///
+ /// True if the move is valid False otherwise.
public abstract bool IsMoveValid(Move m);
///
@@ -130,13 +130,13 @@ public virtual BoardSize GetCurrentBoardSize()
/// requested. If this happens, it is safe to do nothing and request another move.
///
/// The move to carry out.
- ///
+ /// True if the move was made, False otherwise.
public abstract bool MakeMove(Move m);
///
/// Return the total number of moves possible for the board.
///
- ///
+ /// The total number of moves possible for the board.
public int NumMoves()
{
return Move.NumPotentialMoves(GetMaxBoardSize());
@@ -151,7 +151,7 @@ public int NumMoves()
///
/// Iterate through all moves on the board.
///
- ///
+ /// The `IEnumerator` for iterating all moves.
public IEnumerable AllMoves()
{
var maxBoardSize = GetMaxBoardSize();
@@ -171,7 +171,7 @@ public IEnumerable AllMoves()
///
/// Iterate through all valid moves on the board.
///
- ///
+ /// The `IEnumerator` for iterating the valid moves.
public IEnumerable ValidMoves()
{
var maxBoardSize = GetMaxBoardSize();
@@ -193,8 +193,8 @@ public IEnumerable ValidMoves()
/// 3 or more cells of the same type in a row. This assumes that all pieces are allowed
/// to be moved; to add extra logic, incorporate it into your method.
///
- ///
- ///
+ /// The `Move`.
+ /// True if swapping the cells would result in 3 or more cells of the same type in a row.
public bool SimpleIsMoveValid(Move move)
{
using (TimerStack.Instance.Scoped("SimpleIsMoveValid"))
@@ -232,7 +232,7 @@ public bool SimpleIsMoveValid(Move move)
///
///
///
- ///
+ /// True if one of the cells that is swapped during a move matches 3 or more, False otherwise.
bool CheckHalfMove(int newRow, int newCol, int newValue, Direction incomingDirection)
{
var currentBoardSize = GetCurrentBoardSize();
diff --git a/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs
index 9bd60bd571..3c919079bd 100644
--- a/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs
+++ b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs
@@ -19,11 +19,11 @@ public class Match3Actuator : IActuator, IBuiltInActuator
///
/// Create a Match3Actuator.
///
- ///
+ /// Board
/// Whether the inference action should be ignored and the Agent's Heuristic
/// should be called. This should only be used for generating comparison stats of the Heuristic.
/// The seed used to initialize .
- ///
+ /// Name
public Match3Actuator(AbstractBoard board,
bool forceHeuristic,
int seed,
@@ -135,7 +135,7 @@ public void Heuristic(in ActionBuffers actionsOut)
/// By default, EvalMovePoints() returns 1, so all valid moves are equally likely. Inherit from this class and
/// override EvalMovePoints() to use your game's scoring as a better estimate.
///
- ///
+ /// Valid mode.
internal int GreedyMove()
{
var bestMoveIndex = 0;
diff --git a/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs
index 50fcd7ece6..ac0cdccbb1 100644
--- a/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs
+++ b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs
@@ -8,8 +8,9 @@ namespace Unity.MLAgents.Integrations.Match3
///
/// Delegate that provides integer values at a given (x,y) coordinate.
///
- ///
- ///
+ /// X
+ /// Y
+ /// The integer value at the given (x,y) coordinate.
public delegate int GridValueProvider(int x, int y);
///
@@ -89,7 +90,7 @@ public Match3Sensor(AbstractBoard board, GridValueProvider gvp, int oneHotSize,
/// The abstract board.
/// Whether to produce vector or visual observations
/// Name of the sensor.
- ///
+ /// `Match3Sensor` that encodes the board cells as observations.
public static Match3Sensor CellTypeSensor(AbstractBoard board, Match3ObservationType obsType, string name)
{
var maxBoardSize = board.GetMaxBoardSize();
@@ -103,7 +104,7 @@ public static Match3Sensor CellTypeSensor(AbstractBoard board, Match3Observation
/// The abstract board.
/// Whether to produce vector or visual observations
/// Name of the sensor.
- ///
+ /// `Match3Sensor` that encodes the board cell special types as observations.
public static Match3Sensor SpecialTypeSensor(AbstractBoard board, Match3ObservationType obsType, string name)
{
var maxBoardSize = board.GetMaxBoardSize();
diff --git a/com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs
index d4aac5f854..8fc1af6bb9 100644
--- a/com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs
+++ b/com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs
@@ -65,9 +65,9 @@ public struct Move
/// the Move corresponding to an Agent decision.
///
/// Must be between 0 and NumPotentialMoves(maxRows, maxCols).
- ///
- ///
- ///
+ /// Max board size
+ /// Corresponding `Move`.
+ /// Argument out of range
public static Move FromMoveIndex(int moveIndex, BoardSize maxBoardSize)
{
var maxRows = maxBoardSize.Rows;
@@ -104,7 +104,7 @@ public static Move FromMoveIndex(int moveIndex, BoardSize maxBoardSize)
///
/// Increment the Move to the next MoveIndex, and update the Row, Column, and Direction accordingly.
///
- ///
+ /// Max board size
public void Next(BoardSize maxBoardSize)
{
var maxRows = maxBoardSize.Rows;
@@ -143,11 +143,11 @@ public void Next(BoardSize maxBoardSize)
///
/// Construct a Move from the row, column, direction, and board size.
///
- ///
- ///
- ///
- ///
- ///
+ /// Row
+ /// Col
+ /// Dir
+ /// Max board size
+ /// Corresponding `Move`.
public static Move FromPositionAndDirection(int row, int col, Direction dir, BoardSize maxBoardSize)
{
// Check for out-of-bounds
@@ -208,8 +208,8 @@ public static Move FromPositionAndDirection(int row, int col, Direction dir, Boa
/// Check if the move is valid for the given board size.
/// This will be passed the return value from AbstractBoard.GetCurrentBoardSize().
///
- ///
- ///
+ /// Board size
+ /// True if move is valide given input `boardSize`, False if not.
public bool InRangeForBoard(BoardSize boardSize)
{
var (otherRow, otherCol) = OtherCell();
@@ -222,8 +222,8 @@ public bool InRangeForBoard(BoardSize boardSize)
///
/// Get the other row and column that correspond to this move.
///
- ///
- ///
+ /// Corresponding other (row, column) tuple for this move.
+ /// Argument out of range
public (int Row, int Column) OtherCell()
{
switch (Direction)
@@ -244,8 +244,8 @@ public bool InRangeForBoard(BoardSize boardSize)
///
/// Get the opposite direction of this move.
///
- ///
- ///
+ /// Oposit `Direction` of this move.
+ /// Argument out of range
public Direction OtherDirection()
{
switch (Direction)
@@ -267,8 +267,8 @@ public Direction OtherDirection()
/// Return the number of potential moves for a board of the given size.
/// This is equivalent to the number of internal edges in the board.
///
- ///
- ///
+ /// Max board size
+ /// Number of potential moves given a boardsize.
public static int NumPotentialMoves(BoardSize maxBoardSize)
{
return maxBoardSize.Rows * (maxBoardSize.Columns - 1) + (maxBoardSize.Rows - 1) * (maxBoardSize.Columns);
diff --git a/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs b/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
index 598a450d30..06dc8d6e16 100644
--- a/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
+++ b/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
@@ -63,7 +63,7 @@ public enum ObservableAttributeOptions
}
///
- /// A component for setting an instance's behavior and
+ /// A component for setting an instance's behavior and
/// brain properties.
///
/// At runtime, this component generates the agent's policy objects
diff --git a/com.unity.ml-agents/Runtime/Policies/BrainParameters.cs b/com.unity.ml-agents/Runtime/Policies/BrainParameters.cs
index 882521a892..59b1f0e8c0 100644
--- a/com.unity.ml-agents/Runtime/Policies/BrainParameters.cs
+++ b/com.unity.ml-agents/Runtime/Policies/BrainParameters.cs
@@ -28,7 +28,7 @@ internal enum SpaceType
///
///
/// Set brain parameters for an instance using the
- /// component attached to the agent's [GameObject].
+ /// component attached to the agent's [GameObject].
///
/// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html
///
diff --git a/com.unity.ml-agents/Runtime/SensorHelper.cs b/com.unity.ml-agents/Runtime/SensorHelper.cs
index 978fc59f5e..3c3a713051 100644
--- a/com.unity.ml-agents/Runtime/SensorHelper.cs
+++ b/com.unity.ml-agents/Runtime/SensorHelper.cs
@@ -14,10 +14,10 @@ public static class SensorHelper
/// This should not generally be used in production code. It is only intended for
/// simplifying unit tests.
///
- ///
- ///
- ///
- ///
+ /// The `ISensor` to compare observation from.
+ /// The expected observations.
+ /// The error message to throw if sensor observation doesn't match.
+ /// True if the observations for the provided sensor equal the expected values, False if not.
public static bool CompareObservation(ISensor sensor, float[] expected, out string errorMessage)
{
var numExpected = expected.Length;
@@ -76,10 +76,10 @@ public static bool CompareObservation(ISensor sensor, float[] expected, out stri
/// This should not generally be used in production code. It is only intended for
/// simplifying unit tests.
///
- ///
- ///
- ///
- ///
+ /// `ISensor` to generate observation from.
+ /// The expected observations.
+ /// The error message to throw if sensor observation doesn't match.
+ /// True if the generated observation for the provided sensor equal the expected values, False if not.
public static bool CompareObservation(ISensor sensor, float[,,] expected, out string errorMessage)
{
var tensorShape = new TensorShape(0, expected.GetLength(0), expected.GetLength(1), expected.GetLength(2));
diff --git a/com.unity.ml-agents/Runtime/Sensors/BoxOverlapChecker.cs b/com.unity.ml-agents/Runtime/Sensors/BoxOverlapChecker.cs
index 5ec58b1358..c73c36015d 100644
--- a/com.unity.ml-agents/Runtime/Sensors/BoxOverlapChecker.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/BoxOverlapChecker.cs
@@ -152,7 +152,7 @@ public void UpdateGizmo()
///
///
///
- ///
+ /// Found number of overlapping boxes.
int BufferResizingOverlapBoxNonAlloc(Vector3 cellCenter, Vector3 halfCellScale, Quaternion rotation)
{
int numFound;
diff --git a/com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs b/com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs
index 12dc651387..f4e9275d4b 100644
--- a/com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs
@@ -75,7 +75,7 @@ public string GetName()
/// The dimensions have translational equivariance along width and height,
/// and no property along the channels dimension.
///
- ///
+ /// The `ObservationSpec`.
public ObservationSpec GetObservationSpec()
{
return m_ObservationSpec;
@@ -99,7 +99,7 @@ public byte[] GetCompressedObservation()
/// Writes out the generated, uncompressed image to the provided .
///
/// Where the observation is written to.
- ///
+ /// The number of elements written.
public int Write(ObservationWriter writer)
{
using (TimerStack.Instance.Scoped("CameraSensor.WriteToTensor"))
diff --git a/com.unity.ml-agents/Runtime/Sensors/CompressionSpec.cs b/com.unity.ml-agents/Runtime/Sensors/CompressionSpec.cs
index 76e283a14a..52248b2609 100644
--- a/com.unity.ml-agents/Runtime/Sensors/CompressionSpec.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/CompressionSpec.cs
@@ -72,7 +72,7 @@ public CompressionSpec(SensorCompressionType sensorCompressionType, int[] compre
///
/// Return a CompressionSpec indicating no compression. This is recommended for most sensors.
///
- ///
+ /// `CompressionSpec` indicating no compression.
public static CompressionSpec Default()
{
return new CompressionSpec
@@ -86,7 +86,7 @@ public static CompressionSpec Default()
/// Return whether the compressed channel mapping is "trivial"; if so it doesn't need to be sent to the
/// trainer.
///
- ///
+ /// True if the compressed channel mapping is trivial, False if not.
internal bool IsTrivialMapping()
{
var mapping = CompressedChannelMapping;
diff --git a/com.unity.ml-agents/Runtime/Sensors/GridSensorBase.cs b/com.unity.ml-agents/Runtime/Sensors/GridSensorBase.cs
index 09e7c92c40..05325d9207 100644
--- a/com.unity.ml-agents/Runtime/Sensors/GridSensorBase.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/GridSensorBase.cs
@@ -189,16 +189,18 @@ void GridValuesToTexture(int channelIndex, int numChannelsToAdd)
/// Default is to record the detected tag index.
///
/// This method can be overridden to encode the observation differently or get custom data from the object.
- /// When overriding this method, and
+ /// When overriding this method, and
/// might also need to change accordingly.
///
/// The game object that was detected within a certain cell
/// The index of the detectedObject's tag in the DetectableObjects list
/// The buffer to write the observation values.
- /// The buffer size is configured by .
+ /// The buffer size is configured by .
///
///
+ ///
/// Here is an example of overriding GetObjectData to get the velocity of a potential Rigidbody:
+ ///
///
/// protected override void GetObjectData(GameObject detectedObject, int tagIndex, float[] dataBuffer)
/// {
@@ -218,8 +220,8 @@ protected virtual void GetObjectData(GameObject detectedObject, int tagIndex, fl
}
///
- /// Get the observation size for each cell. This will be the size of dataBuffer for .
- /// If overriding , override this method as well to the custom observation size.
+ /// Get the observation size for each cell. This will be the size of dataBuffer for .
+ /// If overriding , override this method as well to the custom observation size.
///
/// The observation size of each cell.
protected virtual int GetCellObservationSize()
@@ -229,7 +231,7 @@ protected virtual int GetCellObservationSize()
///
/// Whether the data is normalized within [0, 1]. The sensor can only use PNG compression if the data is normailzed.
- /// If overriding , override this method as well according to the custom observation values.
+ /// If overriding , override this method as well according to the custom observation values.
///
/// Bool value indicating whether data is normalized.
protected virtual bool IsDataNormalized()
@@ -239,7 +241,7 @@ protected virtual bool IsDataNormalized()
///
/// Whether to process all detected colliders in a cell. Default to false and only use the one closest to the agent.
- /// If overriding , consider override this method when needed.
+ /// If overriding , consider override this method when needed.
///
/// Bool value indicating whether to process all detected colliders in a cell.
protected internal virtual ProcessCollidersMethod GetProcessCollidersMethod()
diff --git a/com.unity.ml-agents/Runtime/Sensors/GridSensorComponent.cs b/com.unity.ml-agents/Runtime/Sensors/GridSensorComponent.cs
index 004a04f396..95f255ba5b 100644
--- a/com.unity.ml-agents/Runtime/Sensors/GridSensorComponent.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/GridSensorComponent.cs
@@ -15,6 +15,9 @@ public class GridSensorComponent : SensorComponent
List m_Sensors;
internal IGridPerception m_GridPerception;
+ ///
+ /// Name of the generated object.
+ ///
[HideInInspector, SerializeField]
protected internal string m_SensorName = "GridSensor";
///
diff --git a/com.unity.ml-agents/Runtime/Sensors/ISensor.cs b/com.unity.ml-agents/Runtime/Sensors/ISensor.cs
index ed93910fa0..46786cf642 100644
--- a/com.unity.ml-agents/Runtime/Sensors/ISensor.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/ISensor.cs
@@ -113,8 +113,8 @@ public static class SensorExtensions
/// Get the total number of elements in the ISensor's observation (i.e. the product of the
/// shape elements).
///
- ///
- ///
+ /// Sensor
+ /// The total number of elements in the `ISensor`'s observation.
public static int ObservationSize(this ISensor sensor)
{
var obsSpec = sensor.GetObservationSpec();
diff --git a/com.unity.ml-agents/Runtime/Sensors/ObservationSpec.cs b/com.unity.ml-agents/Runtime/Sensors/ObservationSpec.cs
index 2974d7982d..0e8de15df1 100644
--- a/com.unity.ml-agents/Runtime/Sensors/ObservationSpec.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/ObservationSpec.cs
@@ -56,9 +56,9 @@ public int Rank
///
/// Construct an ObservationSpec for 1-D observations of the requested length.
///
- ///
- ///
- ///
+ /// Length
+ /// Observation type
+ /// `ObservationSpec` for 1-D observations of the requested length.
public static ObservationSpec Vector(int length, ObservationType obsType = ObservationType.Default)
{
return new ObservationSpec(
@@ -71,9 +71,9 @@ public static ObservationSpec Vector(int length, ObservationType obsType = Obser
///
/// Construct an ObservationSpec for variable-length observations.
///
- ///
- ///
- ///
+ /// Observation size
+ /// Max number of observations
+ /// `ObservationSpec` for variable-length observations.
public static ObservationSpec VariableLength(int obsSize, int maxNumObs)
{
var dimProps = new InplaceArray(
@@ -90,11 +90,11 @@ public static ObservationSpec VariableLength(int obsSize, int maxNumObs)
/// Construct an ObservationSpec for visual-like observations, e.g. observations
/// with a height, width, and possible multiple channels.
///
- ///
- ///
- ///
- ///
- ///
+ /// Height
+ /// Width
+ /// Channels
+ /// Observation type
+ /// `ObservationSpec` for visual-like observations
public static ObservationSpec Visual(int channels, int height, int width, ObservationType obsType = ObservationType.Default)
{
var dimProps = new InplaceArray(
@@ -116,10 +116,10 @@ public static ObservationSpec Visual(int channels, int height, int width, Observ
/// Note that not all combinations of DimensionProperty may be supported by the trainer.
/// shape and dimensionProperties must have the same size.
///
- ///
- ///
- ///
- ///
+ /// Shape
+ /// Dimension properties
+ /// Observation type
+ /// Unity agents exception
public ObservationSpec(
InplaceArray shape,
InplaceArray dimensionProperties,
diff --git a/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs b/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs
index 3a34834b1f..503b4d49c5 100644
--- a/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs
@@ -20,6 +20,9 @@ public class ObservationWriter
TensorShape m_TensorShape;
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ObservationWriter() { }
///
@@ -96,6 +99,11 @@ public float this[int index]
}
}
+ ///
+ /// Write access at the specified channel and width.
+ ///
+ /// Channels
+ /// Width
public float this[int ch, int w]
{
set
@@ -116,9 +124,9 @@ public float this[int index]
///
/// 3D write access at the specified height, width, and channel.
///
- ///
- ///
- ///
+ /// Height
+ /// Width
+ /// Channels
public float this[int ch, int h, int w]
{
set
diff --git a/com.unity.ml-agents/Runtime/Sensors/OneHotGridSensor.cs b/com.unity.ml-agents/Runtime/Sensors/OneHotGridSensor.cs
index 648c702d80..89be650e05 100644
--- a/com.unity.ml-agents/Runtime/Sensors/OneHotGridSensor.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/OneHotGridSensor.cs
@@ -49,7 +49,7 @@ protected internal override ProcessCollidersMethod GetProcessCollidersMethod()
/// The game object that was detected within a certain cell
/// The index of the detectedObject's tag in the DetectableObjects list
/// The buffer to write the observation values.
- /// The buffer size is configured by .
+ /// The buffer size is configured by .
///
protected override void GetObjectData(GameObject detectedObject, int tagIndex, float[] dataBuffer)
{
diff --git a/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs b/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs
index 55a6086660..332b40ad56 100644
--- a/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs
@@ -82,7 +82,7 @@ public struct RayPerceptionInput
///
/// Returns the expected number of floats in the output.
///
- ///
+ /// The expected number of floats in the output.
public int OutputSize()
{
return ((DetectableTags?.Count ?? 0) + 2) * (Angles?.Count ?? 0);
@@ -91,7 +91,7 @@ public int OutputSize()
///
/// Get the cast start and end points for the given ray index/
///
- ///
+ /// Ray index
/// A tuple of the start and end positions in world space.
public (Vector3 StartPositionWorld, Vector3 EndPositionWorld) RayExtents(int rayIndex)
{
@@ -219,8 +219,8 @@ public float ScaledRayLength
/// 3. The 'numDetectableTags+1' element of the sublist will contain the normalized distance to the object
/// hit, or 1.0 if nothing was hit.
///
- ///
- ///
+ /// Number of detectable tags
+ /// Ray index
/// Output buffer. The size must be equal to (numDetectableTags+2) * RayOutputs.Length
public void ToFloatArray(int numDetectableTags, int rayIndex, float[] buffer)
{
@@ -317,7 +317,7 @@ internal void SetRayPerceptionInput(RayPerceptionInput rayInput)
/// .
///
/// Where the ray perception observations are written to.
- ///
+ /// The number of written observations.
public int Write(ObservationWriter writer)
{
using (TimerStack.Instance.Scoped("RayPerceptionSensor.Perceive"))
@@ -425,9 +425,8 @@ public static RayPerceptionOutput Perceive(RayPerceptionInput input, bool batche
///
/// Evaluate the raycast results of all the rays from the RayPerceptionInput as a batch.
///
- ///
- ///
- ///
+ /// Input
+ /// Ray index
internal static void PerceiveBatchedRays(ref RayPerceptionOutput.RayOutput[] batchedRaycastOutputs, RayPerceptionInput input)
{
var numRays = input.Angles.Count;
@@ -552,9 +551,9 @@ internal static void PerceiveBatchedRays(ref RayPerceptionOutput.RayOutput[] bat
///
/// Evaluate the raycast results of a single ray from the RayPerceptionInput.
///
- ///
- ///
- ///
+ /// Input
+ /// Ray index
+ /// `RayOutput` result of a single raycast.
internal static RayPerceptionOutput.RayOutput PerceiveSingleRay(
RayPerceptionInput input,
int rayIndex
diff --git a/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponentBase.cs b/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponentBase.cs
index 35c4fd5320..dbb93a2ea0 100644
--- a/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponentBase.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponentBase.cs
@@ -127,6 +127,9 @@ public int ObservationStacks
set { m_ObservationStacks = value; }
}
+ ///
+ /// Disable to provide the rays in left to right order
+ ///
[HideInInspector, SerializeField]
[Tooltip("Disable to provide the rays in left to right order. Warning: Alternating order will be deprecated, disable it to ensure compatibility with future versions of ML-Agents.")]
public bool m_AlternatingRayOrder = true;
@@ -145,6 +148,9 @@ public bool AlternatingRayOrder
set { m_AlternatingRayOrder = value; }
}
+ ///
+ /// Determines whether to use batched raycasts and the jobs system. Default = false.
+ ///
[HideInInspector, SerializeField]
[Tooltip("Enable to use batched raycasts and the jobs system.")]
public bool m_UseBatchedRaycasts = false;
@@ -188,13 +194,13 @@ public RayPerceptionSensor RaySensor
///
/// Returns the for the associated raycast sensor.
///
- ///
+ /// `RayPerceptionCastType` for the associated raycast sensor.
public abstract RayPerceptionCastType GetCastType();
///
/// Returns the amount that the ray start is offset up or down by.
///
- ///
+ /// The amount that the ray start is offset up or down by.
public virtual float GetStartVerticalOffset()
{
return 0f;
@@ -203,7 +209,7 @@ public virtual float GetStartVerticalOffset()
///
/// Returns the amount that the ray end is offset up or down by.
///
- ///
+ /// The amount that the ray end is offset up or down by.
public virtual float GetEndVerticalOffset()
{
return 0f;
@@ -212,7 +218,7 @@ public virtual float GetEndVerticalOffset()
///
/// Returns an initialized raycast sensor.
///
- ///
+ /// Initialized `ISensor` array.
public override ISensor[] CreateSensors()
{
var rayPerceptionInput = GetRayPerceptionInput();
@@ -240,7 +246,7 @@ public override ISensor[] CreateSensors()
/// Should be deprecated with a future major version release (doing so will break existing
/// models).
///
- ///
+ /// The corresponding ray angles.
internal static float[] GetRayAnglesAlternating(int raysPerDirection, float maxRayDegrees)
{
// Example:
@@ -267,7 +273,7 @@ internal static float[] GetRayAnglesAlternating(int raysPerDirection, float maxR
/// Orders the rays from the left-most to the right-most which makes using a convolution
/// in the model easier.
///
- ///
+ /// The corresponding ray angles.
internal static float[] GetRayAngles(int raysPerDirection, float maxRayDegrees)
{
// Example:
@@ -286,7 +292,7 @@ internal static float[] GetRayAngles(int raysPerDirection, float maxRayDegrees)
///
/// Get the RayPerceptionInput that is used by the .
///
- ///
+ /// `RayPerceptionInput` that is used by the sensor.
public RayPerceptionInput GetRayPerceptionInput()
{
var rayAngles = m_AlternatingRayOrder ?
diff --git a/com.unity.ml-agents/Runtime/Sensors/Reflection/ObservableAttribute.cs b/com.unity.ml-agents/Runtime/Sensors/Reflection/ObservableAttribute.cs
index a88528c873..cdfe9938cd 100644
--- a/com.unity.ml-agents/Runtime/Sensors/Reflection/ObservableAttribute.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/Reflection/ObservableAttribute.cs
@@ -24,8 +24,10 @@ namespace Unity.MLAgents.Sensors.Reflection
/// to fields or properties.
///
///
+ ///
/// This sample class will produce two observations, one for the m_Health field, and one
/// for the HealthPercent property.
+ ///
///
/// using Unity.MLAgents;
/// using Unity.MLAgents.Sensors.Reflection;
@@ -86,7 +88,7 @@ public ObservableAttribute(string name = null, int numStackedObservations = 1)
///
/// Object being reflected
/// Whether to exclude inherited properties or not.
- ///
+ /// `FieldInfo` for all fields that have an O`bservableAttribute`.
static IEnumerable<(FieldInfo, ObservableAttribute)> GetObservableFields(object o, bool excludeInherited)
{
// TODO cache these (and properties) by type, so that we only have to reflect once.
@@ -107,7 +109,7 @@ public ObservableAttribute(string name = null, int numStackedObservations = 1)
///
/// Object being reflected
/// Whether to exclude inherited properties or not.
- ///
+ /// `PropertyInfo` for all fields that have an `ObservableAttribute`.
static IEnumerable<(PropertyInfo, ObservableAttribute)> GetObservableProperties(object o, bool excludeInherited)
{
var bindingFlags = k_BindingFlags | (excludeInherited ? BindingFlags.DeclaredOnly : 0);
@@ -127,7 +129,7 @@ public ObservableAttribute(string name = null, int numStackedObservations = 1)
///
/// Object being reflected
/// Whether to exclude inherited properties or not.
- ///
+ /// Corresponding list of sensors.
internal static List CreateObservableSensors(object o, bool excludeInherited)
{
var sensorsOut = new List();
@@ -165,7 +167,7 @@ internal static List CreateObservableSensors(object o, bool excludeInhe
///
///
///
- ///
+ /// The created `ISensor`.
///
static ISensor CreateReflectionSensor(object o, FieldInfo fieldInfo, PropertyInfo propertyInfo, ObservableAttribute observableAttribute)
{
@@ -237,7 +239,7 @@ static ISensor CreateReflectionSensor(object o, FieldInfo fieldInfo, PropertyInf
///
///
///
- ///
+ /// The total observation size.
internal static int GetTotalObservationSize(object o, bool excludeInherited, List errorsOut)
{
int sizeOut = 0;
diff --git a/com.unity.ml-agents/Runtime/Sensors/Reflection/ReflectionSensorBase.cs b/com.unity.ml-agents/Runtime/Sensors/Reflection/ReflectionSensorBase.cs
index 9a0219146e..49aadfe595 100644
--- a/com.unity.ml-agents/Runtime/Sensors/Reflection/ReflectionSensorBase.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/Reflection/ReflectionSensorBase.cs
@@ -70,7 +70,7 @@ public int Write(ObservationWriter writer)
/// Get either the reflected field, or return the reflected property.
/// This should be used by implementations in their WriteReflectedField() method.
///
- ///
+ /// `object` representing either the reflected field, or return the reflected property.
protected object GetReflectedValue()
{
return m_FieldInfo != null ?
diff --git a/com.unity.ml-agents/Runtime/Sensors/RenderTextureSensor.cs b/com.unity.ml-agents/Runtime/Sensors/RenderTextureSensor.cs
index 2d54d179e3..0980179aa2 100644
--- a/com.unity.ml-agents/Runtime/Sensors/RenderTextureSensor.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/RenderTextureSensor.cs
@@ -33,7 +33,7 @@ public SensorCompressionType CompressionType
/// Whether to convert it to grayscale or not.
/// Name of the sensor.
/// Compression method for the render texture.
- /// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html
+ // [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html
public RenderTextureSensor(
RenderTexture renderTexture, bool grayscale, string name, SensorCompressionType compressionType)
{
diff --git a/com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs b/com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs
index 2d80d75234..879e8924c1 100644
--- a/com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs
@@ -3,6 +3,9 @@
namespace Unity.MLAgents.Sensors
{
+ ///
+ /// Check that List Sensors are the same shape as the previous ones.
+ ///
public class SensorShapeValidator
{
List m_SensorShapes;
@@ -11,6 +14,7 @@ public class SensorShapeValidator
/// Check that the List Sensors are the same shape as the previous ones.
/// If this is the first List of Sensors being checked, its Sensor sizes will be saved.
///
+ /// List of Sensors to validate
public void ValidateSensors(List sensors)
{
if (m_SensorShapes == null)
diff --git a/com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs b/com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs
index d4bd0507c4..3f6a79f4ba 100644
--- a/com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs
@@ -20,7 +20,7 @@ public class VectorSensor : ISensor, IBuiltInSensor
///
/// Number of vector observations.
/// Name of the sensor.
- ///
+ /// Observation type
public VectorSensor(int observationSize, string name = null, ObservationType observationType = ObservationType.Default)
{
if (string.IsNullOrEmpty(name))
diff --git a/com.unity.ml-agents/Runtime/Sensors/VectorSensorComponent.cs b/com.unity.ml-agents/Runtime/Sensors/VectorSensorComponent.cs
index 26deb7434f..71e36d9b5b 100644
--- a/com.unity.ml-agents/Runtime/Sensors/VectorSensorComponent.cs
+++ b/com.unity.ml-agents/Runtime/Sensors/VectorSensorComponent.cs
@@ -64,7 +64,7 @@ public int ObservationStacks
///
/// Creates a VectorSensor.
///
- ///
+ /// `ISensor` array.
public override ISensor[] CreateSensors()
{
m_Sensor = new VectorSensor(m_ObservationSize, m_SensorName, m_ObservationType);
@@ -78,7 +78,7 @@ public override ISensor[] CreateSensors()
///
/// Returns the underlying VectorSensor
///
- ///
+ /// Underlying `VectorSensor`.
public VectorSensor GetSensor()
{
return m_Sensor;
diff --git a/com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs b/com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs
index 0e2b88b6ec..0395ca00c1 100644
--- a/com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs
+++ b/com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs
@@ -111,7 +111,7 @@ protected override void OnMessageReceived(IncomingMessage msg)
///
/// Parameter key.
/// Default value to return.
- ///
+ /// The parameter value associated with the provided key.
public float GetWithDefault(string key, float defaultValue)
{
Func valueOut;
@@ -133,7 +133,7 @@ public void RegisterCallback(string key, Action action)
///
/// Returns all parameter keys that have a registered value.
///
- ///
+ /// All parameter keys that have a registered value.
public IList ListParameters()
{
return new List(m_Parameters.Keys);
diff --git a/com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs b/com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs
index f4c293547b..d93728b0eb 100644
--- a/com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs
+++ b/com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs
@@ -67,7 +67,7 @@ public void Set(string key, float value)
///
/// The string identifier of the property.
/// The default value of the property.
- ///
+ /// The parameter value associated with the provided key.
public float GetWithDefault(string key, float defaultValue)
{
float valueOut;
diff --git a/com.unity.ml-agents/Runtime/SideChannels/IncomingMessage.cs b/com.unity.ml-agents/Runtime/SideChannels/IncomingMessage.cs
index 90425955de..f6991f76d9 100644
--- a/com.unity.ml-agents/Runtime/SideChannels/IncomingMessage.cs
+++ b/com.unity.ml-agents/Runtime/SideChannels/IncomingMessage.cs
@@ -18,7 +18,7 @@ public class IncomingMessage : IDisposable
///
/// Construct an IncomingMessage from the byte array.
///
- ///
+ /// Byte array
public IncomingMessage(byte[] data)
{
m_Data = data;
@@ -30,7 +30,7 @@ public IncomingMessage(byte[] data)
/// Read a boolean value from the message.
///
/// Default value to use if the end of the message is reached.
- ///
+ /// True if boolean was read by the reader, False if not.
public bool ReadBoolean(bool defaultValue = false)
{
return CanReadMore() ? m_Reader.ReadBoolean() : defaultValue;
@@ -40,7 +40,7 @@ public bool ReadBoolean(bool defaultValue = false)
/// Read an integer value from the message.
///
/// Default value to use if the end of the message is reached.
- ///
+ /// True if int32 was read by the reader, False if not.
public int ReadInt32(int defaultValue = 0)
{
return CanReadMore() ? m_Reader.ReadInt32() : defaultValue;
@@ -50,7 +50,7 @@ public int ReadInt32(int defaultValue = 0)
/// Read a float value from the message.
///
/// Default value to use if the end of the message is reached.
- ///
+ /// True if float32 was read by the reader, False if not.
public float ReadFloat32(float defaultValue = 0.0f)
{
return CanReadMore() ? m_Reader.ReadSingle() : defaultValue;
@@ -60,7 +60,7 @@ public float ReadFloat32(float defaultValue = 0.0f)
/// Read a string value from the message.
///
/// Default value to use if the end of the message is reached.
- ///
+ /// True if string was read by the reader, False if not.
public string ReadString(string defaultValue = default)
{
if (!CanReadMore())
@@ -77,7 +77,7 @@ public string ReadString(string defaultValue = default)
/// Reads a list of floats from the message. The length of the list is stored in the message.
///
/// Default value to use if the end of the message is reached.
- ///
+ /// True if list of float was read by the reader, False if not.
public IList ReadFloatList(IList defaultValue = default)
{
if (!CanReadMore())
@@ -99,7 +99,7 @@ public IList ReadFloatList(IList defaultValue = default)
/// Gets the original data of the message. Note that this will return all of the data,
/// even if part of it has already been read.
///
- ///
+ /// Original data of the message.
public byte[] GetRawBytes()
{
return m_Data;
@@ -117,7 +117,7 @@ public void Dispose()
///
/// Whether or not there is more data left in the stream that can be read.
///
- ///
+ /// True if there is still data left in the stream that can be read, False if not.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
bool CanReadMore()
{
diff --git a/com.unity.ml-agents/Runtime/SideChannels/OutgoingMessage.cs b/com.unity.ml-agents/Runtime/SideChannels/OutgoingMessage.cs
index 70a7948e22..7f00b90e74 100644
--- a/com.unity.ml-agents/Runtime/SideChannels/OutgoingMessage.cs
+++ b/com.unity.ml-agents/Runtime/SideChannels/OutgoingMessage.cs
@@ -34,16 +34,16 @@ public void Dispose()
///
/// Write a boolean value to the message.
///
- ///
+ /// Boolean value
public void WriteBoolean(bool b)
{
m_Writer.Write(b);
}
///
- /// Write an interger value to the message.
+ /// Write an integer value to the message.
///
- ///
+ /// Integer value
public void WriteInt32(int i)
{
m_Writer.Write(i);
@@ -52,7 +52,7 @@ public void WriteInt32(int i)
///
/// Write a float values to the message.
///
- ///
+ /// Float value
public void WriteFloat32(float f)
{
m_Writer.Write(f);
@@ -61,7 +61,7 @@ public void WriteFloat32(float f)
///
/// Write a string value to the message.
///
- ///
+ /// String value
public void WriteString(string s)
{
var stringEncoded = Encoding.ASCII.GetBytes(s);
@@ -72,7 +72,7 @@ public void WriteString(string s)
///
/// Write a list or array of floats to the message.
///
- ///
+ /// Float list
public void WriteFloatList(IList floatList)
{
WriteInt32(floatList.Count);
@@ -85,7 +85,7 @@ public void WriteFloatList(IList floatList)
///
/// Overwrite the message with a specific byte array.
///
- ///
+ /// Data
public void SetRawBytes(byte[] data)
{
// Reset first. Set the length to zero so that if there's more data than we're going to
@@ -101,7 +101,7 @@ public void SetRawBytes(byte[] data)
///
/// Read the byte array of the message.
///
- ///
+ /// The byte array of the message.
internal byte[] ToByteArray()
{
return m_Stream.ToArray();
diff --git a/com.unity.ml-agents/Runtime/SideChannels/SideChannel.cs b/com.unity.ml-agents/Runtime/SideChannels/SideChannel.cs
index 250e638b0f..fc94c72c31 100644
--- a/com.unity.ml-agents/Runtime/SideChannels/SideChannel.cs
+++ b/com.unity.ml-agents/Runtime/SideChannels/SideChannel.cs
@@ -26,7 +26,7 @@ public abstract class SideChannel
/// An int identifier for the SideChannel. Ensures that there is only ever one side channel
/// of each type. Ensure the Unity side channels will be linked to their Python equivalent.
///
- /// The integer identifier of the SideChannel.
+ /// The integer identifier of the SideChannel.
public Guid ChannelId
{
get;
diff --git a/com.unity.ml-agents/Runtime/SideChannels/SideChannelManager.cs b/com.unity.ml-agents/Runtime/SideChannels/SideChannelManager.cs
index bdcc596b85..b2d56b9c34 100644
--- a/com.unity.ml-agents/Runtime/SideChannels/SideChannelManager.cs
+++ b/com.unity.ml-agents/Runtime/SideChannels/SideChannelManager.cs
@@ -89,7 +89,7 @@ internal static void UnregisterAllSideChannels()
/// If there are multiple SideChannels of the same type registered, the returned instance is arbitrary.
///
///
- ///
+ /// SideChannel if there is one registered.
internal static T GetSideChannel() where T : SideChannel
{
foreach (var sc in s_RegisteredChannels.Values)
@@ -106,7 +106,7 @@ internal static T GetSideChannel() where T : SideChannel
/// Grabs the messages that the registered side channels will send to Python at the current step
/// into a singe byte array.
///
- ///
+ /// The message that the registered side channels will send to Python at the current step.
internal static byte[] GetSideChannelMessage()
{
return GetSideChannelMessage(s_RegisteredChannels);
@@ -117,7 +117,7 @@ internal static byte[] GetSideChannelMessage()
/// into a singe byte array.
///
/// A dictionary of channel type to channel.
- ///
+ /// The message that the registered side channels will send to Python at the current step.
internal static byte[] GetSideChannelMessage(Dictionary sideChannels)
{
if (!HasOutgoingMessages(sideChannels))
@@ -151,7 +151,7 @@ internal static byte[] GetSideChannelMessage(Dictionary sideC
/// Check whether any of the sidechannels have queued messages.
///
///
- ///
+ /// True if the sidechannel has queued messages, False if not.
static bool HasOutgoingMessages(Dictionary sideChannels)
{
foreach (var sideChannel in sideChannels.Values)
diff --git a/com.unity.ml-agents/Runtime/Timer.cs b/com.unity.ml-agents/Runtime/Timer.cs
index 7de390343f..a0f2bcf8d8 100644
--- a/com.unity.ml-agents/Runtime/Timer.cs
+++ b/com.unity.ml-agents/Runtime/Timer.cs
@@ -160,7 +160,7 @@ public void End()
/// Note that these allocations only happen once for a given timed block.
///
///
- ///
+ /// The `TimerNode` child node.
public TimerNode GetChild(string name)
{
// Lazily create the children dictionary.
@@ -185,7 +185,7 @@ public TimerNode GetChild(string name)
///
///
///
- ///
+ /// The string summary of the `TimerNode`.
public string DebugGetTimerString(string parentName = "", int level = 0)
{
var indent = new string(' ', 2 * level); // TODO generalize
@@ -456,7 +456,7 @@ void Pop()
/// Start a scoped timer. This should be used with the "using" statement.
///
///
- ///
+ /// `TimerStack` scoped timer.
public TimerStack Scoped(string name)
{
Push(name);
@@ -478,7 +478,7 @@ public void Dispose()
/// Get a string representation of the timers.
/// Potentially slow so call sparingly.
///
- ///
+ /// The string summary of the `TimerStack`.
internal string DebugGetTimerString()
{
return m_RootNode.DebugGetTimerString();
diff --git a/com.unity.ml-agents/Samples/3DBall/.sample.json b/com.unity.ml-agents/Samples/3DBall/.sample.json
deleted file mode 100644
index 7055a5b220..0000000000
--- a/com.unity.ml-agents/Samples/3DBall/.sample.json
+++ /dev/null
@@ -1 +0,0 @@
-{"displayName":"3D Ball","description":"The 3D Ball sample is a simple environment that is a great for jumping into ML-Agents to see how things work."}
diff --git a/com.unity.ml-agents/Tests/.tests.json b/com.unity.ml-agents/Tests/.tests.json
deleted file mode 100755
index 327abb29e5..0000000000
--- a/com.unity.ml-agents/Tests/.tests.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "createSeparatePackage": false
-}
diff --git a/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs
index 1dc9d6f150..09d882427a 100644
--- a/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs
+++ b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs
@@ -351,7 +351,7 @@ public void TestCompressedVisualObservationsSpecial(bool fullBoard, bool useSpec
/// Helper method for un-concatenating PNG observations.
///
///
- ///
+ /// The PNG observations.
List SplitPNGs(byte[] concatenated)
{
var pngsOut = new List();
diff --git a/com.unity.ml-agents/Third Party Notices.md b/com.unity.ml-agents/Third Party Notices.md
deleted file mode 100644
index fc124fc468..0000000000
--- a/com.unity.ml-agents/Third Party Notices.md
+++ /dev/null
@@ -1,381 +0,0 @@
-This package contains third-party software components governed by the license(s) indicated below:
- ---------
-
- Component Name: System.Buffers.dll
-
- License Type: MIT
-
- The MIT License (MIT)
-
- Copyright (c) .NET Foundation and Contributors
-
- All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-
- ---------
-
-Component Name: System.Numerics.Vectors.dll
-
-License Type: MIT
-
-The MIT License (MIT)
-
-Copyright (c) .NET Foundation and Contributors
-
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
- ---------
-
-Component Name: System.Runtime.CompilerServices.Unsafe
-
-License Type: MIT
-
-The MIT License (MIT)
-
-Copyright (c) .NET Foundation and Contributors
-
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
- ---------
-
-Component Name: System.Memory.dll
-
-License Type: MIT
-
-The MIT License (MIT)
-
-Copyright (c) .NET Foundation and Contributors
-
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
- ---------
-
-Component Name: System.IO.Abstractions
-
-License Type: MIT
-
-The MIT License (MIT)
-
-Copyright (c) Tatham Oddie and Contributors
-
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
- ---------
-
-Component Name: System.Interactive.Async.dll
-
-License Type: Apache-2.0
-
-Copyright (c) .NET Foundation and Contributors
-All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the "License"); you
-may not use this file except in compliance with the License. You may
-obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-implied. See the License for the specific language governing permissions
-and limitations under the License.
-
- ---------
-
-Component Name: Grpc
-
-License Type: Apache-2.0
-
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/com.unity.ml-agents/Third Party Notices.md.meta b/com.unity.ml-agents/Third Party Notices.md.meta
deleted file mode 100644
index 00901a0666..0000000000
--- a/com.unity.ml-agents/Third Party Notices.md.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 3fb7f1407083340b8921a0520b2d8870
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/com.unity.ml-agents/catalog-info.yaml.meta b/com.unity.ml-agents/catalog-info.yaml.meta
deleted file mode 100644
index 15b7d888e5..0000000000
--- a/com.unity.ml-agents/catalog-info.yaml.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 7d543dec1acb6455fb97a799ca89315c
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/com.unity.ml-agents/package.json b/com.unity.ml-agents/package.json
index 84c20f8ef9..b8987dd3d3 100755
--- a/com.unity.ml-agents/package.json
+++ b/com.unity.ml-agents/package.json
@@ -1,13 +1,20 @@
{
"name": "com.unity.ml-agents",
"displayName": "ML Agents",
- "version": "3.0.0-exp.1",
+ "version": "3.0.0",
"unity": "2023.2",
"description": "Use state-of-the-art machine learning to create intelligent character behaviors in any Unity environment (games, robotics, film, etc.).",
"dependencies": {
- "com.unity.sentis": "2.0.0",
+ "com.unity.sentis": "2.1.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.physics": "1.0.0"
- }
+ },
+ "samples": [
+ {
+ "displayName": "3D Ball",
+ "description": "The 3D Ball sample is a simple environment that is a great for jumping into ML-Agents to see how things work.",
+ "path": "Samples~/3DBall"
+ }
+ ]
}
diff --git a/docs/Installation-Anaconda-Windows.md b/docs/Installation-Anaconda-Windows.md
index ef5053f6e3..3b80adbdf0 100644
--- a/docs/Installation-Anaconda-Windows.md
+++ b/docs/Installation-Anaconda-Windows.md
@@ -123,10 +123,10 @@ commands in an Anaconda Prompt _(if you open a new prompt, be sure to activate
the ml-agents Conda environment by typing `activate ml-agents`)_:
```sh
-git clone --branch release_21 https://github.com/Unity-Technologies/ml-agents.git
+git clone --branch release_22 https://github.com/Unity-Technologies/ml-agents.git
```
-The `--branch release_21` option will switch to the tag of the latest stable
+The `--branch release_22` option will switch to the tag of the latest stable
release. Omitting that will get the `main` branch which is potentially
unstable.
@@ -151,7 +151,7 @@ config files in this directory when running `mlagents-learn`. Make sure you are
connected to the Internet and then type in the Anaconda Prompt:
```console
-python -m pip install mlagents==1.0.0
+python -m pip install mlagents==1.1.0
```
This will complete the installation of all the required Python packages to run
@@ -162,7 +162,7 @@ pip will get stuck when trying to read the cache of the package. If you see
this, you can try:
```console
-python -m pip install mlagents==1.0.0 --no-cache-dir
+python -m pip install mlagents==1.1.0 --no-cache-dir
```
This `--no-cache-dir` tells the pip to disable the cache.
diff --git a/docs/Installation.md b/docs/Installation.md
index b88d8610bd..a3c381c415 100644
--- a/docs/Installation.md
+++ b/docs/Installation.md
@@ -72,10 +72,10 @@ of our tutorials / guides assume you have access to our example environments).
the repository if you would like to explore more examples.
```sh
-git clone --branch release_21 https://github.com/Unity-Technologies/ml-agents.git
+git clone --branch release_22 https://github.com/Unity-Technologies/ml-agents.git
```
-The `--branch release_21` option will switch to the tag of the latest stable
+The `--branch release_22` option will switch to the tag of the latest stable
release. Omitting that will get the `develop` branch which is potentially unstable.
However, if you find that a release branch does not work, the recommendation is to use
the `develop` branch as it may have potential fixes for bugs and dependency issues.
@@ -90,7 +90,7 @@ git clone --branch https://github.com/Unity-Technologies/ml-agents.git
You will need to clone the repository if you plan to modify or extend the
ML-Agents Toolkit for your purposes. If you plan to contribute those changes
-back, make sure to clone the `develop` branch (by omitting `--branch release_21`
+back, make sure to clone the `develop` branch (by omitting `--branch release_22`
from the command above). See our
[Contributions Guidelines](../com.unity.ml-agents/CONTRIBUTING.md) for more
information on contributing to the ML-Agents Toolkit.
@@ -195,7 +195,7 @@ line parameters you can use with `mlagents-learn`.
the following command:
```shell
-python -m pip install mlagents==1.0.0
+python -m pip install mlagents==1.1.0
```
which will install the latest version of ML-Agents and associated dependencies available on PyPi. Note, you need to have the matching version of
diff --git a/docs/Learning-Environment-Design-Agents.md b/docs/Learning-Environment-Design-Agents.md
index f47440c7d8..255dd44b17 100644
--- a/docs/Learning-Environment-Design-Agents.md
+++ b/docs/Learning-Environment-Design-Agents.md
@@ -579,7 +579,7 @@ To allow more variety of observations that grid sensor can capture, the
`GridSensorComponent` and the underlying `GridSensorBase` also provides interfaces
that can be overridden to collect customized observation from detected objects.
See the doc on
-[extending grid Sensors](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/com.unity.ml-agents.extensions/Documentation~/CustomGridSensors.md)
+[extending grid Sensors](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/com.unity.ml-agents.extensions/Documentation~/CustomGridSensors.md)
for more details on custom grid sensors.
__Note__: The `GridSensor` only works in 3D environments and will not behave
diff --git a/docs/ML-Agents-Toolkit-Documentation.md b/docs/ML-Agents-Toolkit-Documentation.md
index 08aae1daab..5cd6548c74 100644
--- a/docs/ML-Agents-Toolkit-Documentation.md
+++ b/docs/ML-Agents-Toolkit-Documentation.md
@@ -41,9 +41,9 @@
## Python Tutorial with Google Colab
-- [Using a UnityEnvironment](https://colab.research.google.com/github/Unity-Technologies/ml-agents/blob/release_21_docs/colab/Colab_UnityEnvironment_1_Run.ipynb)
-- [Q-Learning with a UnityEnvironment](https://colab.research.google.com/github/Unity-Technologies/ml-agents/blob/release_21_docs/colab/Colab_UnityEnvironment_2_Train.ipynb)
-- [Using Side Channels on a UnityEnvironment](https://colab.research.google.com/github/Unity-Technologies/ml-agents/blob/release_21_docs/colab/Colab_UnityEnvironment_3_SideChannel.ipynb)
+- [Using a UnityEnvironment](https://colab.research.google.com/github/Unity-Technologies/ml-agents/blob/release_22_docs/colab/Colab_UnityEnvironment_1_Run.ipynb)
+- [Q-Learning with a UnityEnvironment](https://colab.research.google.com/github/Unity-Technologies/ml-agents/blob/release_22_docs/colab/Colab_UnityEnvironment_2_Train.ipynb)
+- [Using Side Channels on a UnityEnvironment](https://colab.research.google.com/github/Unity-Technologies/ml-agents/blob/release_22_docs/colab/Colab_UnityEnvironment_3_SideChannel.ipynb)
## Help
diff --git a/docs/Migrating.md b/docs/Migrating.md
index 4cf9ae7db1..3559ab369a 100644
--- a/docs/Migrating.md
+++ b/docs/Migrating.md
@@ -223,7 +223,7 @@ folder
- The Parameter Randomization feature has been merged with the Curriculum feature. It is now possible to specify a sampler
in the lesson of a Curriculum. Curriculum has been refactored and is now specified at the level of the parameter, not the
behavior. More information
-[here](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Training-ML-Agents.md).(#4160)
+[here](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Training-ML-Agents.md).(#4160)
### Steps to Migrate
- The configuration format for curriculum and parameter randomization has changed. To upgrade your configuration files,
diff --git a/docs/Readme.md b/docs/Readme.md
index c5a8e06ac4..0c5c6fa53b 100644
--- a/docs/Readme.md
+++ b/docs/Readme.md
@@ -1,6 +1,6 @@
# Unity ML-Agents Toolkit
-[](https://github.com/Unity-Technologies/ml-agents/tree/release_21_docs/docs/)
+[](https://github.com/Unity-Technologies/ml-agents/tree/release_22_docs/docs/)
[](../LICENSE.md)
@@ -44,7 +44,7 @@ See our [ML-Agents Overview](ML-Agents-Overview.md) page for detailed
descriptions of all these features. Or go straight to our [web docs](https://unity-technologies.github.io/ml-agents/).
## Releases & Documentation
-**Our latest, stable release is `Release 21`. Click
+**Our latest, stable release is `Release 22`. Click
[here](Getting-Started.md)
to get started with the latest release of ML-Agents.**
@@ -67,8 +67,9 @@ under active development and may be unstable. A few helpful guidelines:
| **Version** | **Release Date** | **Source** | **Documentation** | **Download** | **Python Package** | **Unity Package** |
|:--------------------------:|:------:|:-------------:|:-------:|:------------:|:------------:|:------------:|
+| **Release 22** | **October 5, 2024** | **[source](https://github.com/Unity-Technologies/ml-agents/tree/release_22)** | **[docs](https://unity-technologies.github.io/ml-agents/)** | **[download](https://github.com/Unity-Technologies/ml-agents/archive/release_22.zip)** | **[1.1.0](https://pypi.org/project/mlagents/1.1.0/)** | **[3.0.0](https://docs.unity3d.com/Packages/com.unity.ml-agents@3.0/manual/index.html)** |
| **develop (unstable)** | -- | [source](https://github.com/Unity-Technologies/ml-agents/tree/develop) | [docs](https://unity-technologies.github.io/ml-agents/) | [download](https://github.com/Unity-Technologies/ml-agents/archive/develop.zip) | -- | -- |
-| **Release 21** | **October 9, 2023** | **[source](https://github.com/Unity-Technologies/ml-agents/tree/release_21)** | **[docs](https://unity-technologies.github.io/ml-agents/)** | **[download](https://github.com/Unity-Technologies/ml-agents/archive/release_21.zip)** | **[1.0.0](https://pypi.org/project/mlagents/1.0.0/)** | **[3.0.0](https://docs.unity3d.com/Packages/com.unity.ml-agents@3.0/manual/index.html)** |
+
If you are a researcher interested in a discussion of Unity as an AI platform,
diff --git a/docs/Sentis.md b/docs/Sentis.md
index f3861ee400..55566f3a53 100644
--- a/docs/Sentis.md
+++ b/docs/Sentis.md
@@ -35,9 +35,9 @@ The ML-Agents Toolkit only supports the models created with our trainers. Model
loading expects certain conventions for constants and tensor names. While it is
possible to construct a model that follows these conventions, we don't provide
any additional help for this. More details can be found in
-[TensorNames.cs](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/com.unity.ml-agents/Runtime/Inference/TensorNames.cs)
+[TensorNames.cs](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/com.unity.ml-agents/Runtime/Inference/TensorNames.cs)
and
-[SentisModelParamLoader.cs](https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs).
+[SentisModelParamLoader.cs](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs).
If you wish to run inference on an externally trained model, you should use
Sentis directly, instead of trying to run it through ML-Agents.
diff --git a/docs/Training-on-Amazon-Web-Service.md b/docs/Training-on-Amazon-Web-Service.md
index a92f04fb89..d6549044d2 100644
--- a/docs/Training-on-Amazon-Web-Service.md
+++ b/docs/Training-on-Amazon-Web-Service.md
@@ -69,7 +69,7 @@ After launching your EC2 instance using the ami and ssh into it:
2. Clone the ML-Agents repo and install the required Python packages
```sh
- git clone --branch release_21 https://github.com/Unity-Technologies/ml-agents.git
+ git clone --branch release_22 https://github.com/Unity-Technologies/ml-agents.git
cd ml-agents/ml-agents/
pip3 install -e .
```
diff --git a/docs/Training-on-Microsoft-Azure.md b/docs/Training-on-Microsoft-Azure.md
index 5c7062551b..759cc145c9 100644
--- a/docs/Training-on-Microsoft-Azure.md
+++ b/docs/Training-on-Microsoft-Azure.md
@@ -33,7 +33,7 @@ view the documentation for doing so [here](#custom-instances).
instance, and set it as the working directory.
2. Install the required packages:
Torch: `pip3 install torch==1.7.0 -f https://download.pytorch.org/whl/torch_stable.html` and
- MLAgents: `python -m pip install mlagents==1.0.0`
+ MLAgents: `python -m pip install mlagents==1.1.0`
## Testing
diff --git a/ml-agents-envs/README.md b/ml-agents-envs/README.md
index 6935735ce5..4db68723d2 100644
--- a/ml-agents-envs/README.md
+++ b/ml-agents-envs/README.md
@@ -17,7 +17,7 @@ communication.
Install the `mlagents_envs` package with:
```sh
-python -m pip install mlagents_envs==1.0.0
+python -m pip install mlagents_envs==1.1.0
```
## Usage & More Information
diff --git a/ml-agents-envs/mlagents_envs/__init__.py b/ml-agents-envs/mlagents_envs/__init__.py
index c376dbb366..adda2e26ea 100644
--- a/ml-agents-envs/mlagents_envs/__init__.py
+++ b/ml-agents-envs/mlagents_envs/__init__.py
@@ -1,5 +1,5 @@
# Version of the library that will be used to upload to pypi
-__version__ = "1.1.0.dev0"
+__version__ = "1.1.0"
# Git tag that will be checked to determine whether to trigger upload to pypi
-__release_tag__ = None
+__release_tag__ = "release_22"
diff --git a/ml-agents/README.md b/ml-agents/README.md
index 45432ec547..16b3bada70 100644
--- a/ml-agents/README.md
+++ b/ml-agents/README.md
@@ -16,7 +16,7 @@ package.
Install the `mlagents` package with:
```sh
-python -m pip install mlagents==1.0.0
+python -m pip install mlagents==1.1.0
```
## Usage & More Information
diff --git a/ml-agents/mlagents/torch_utils/torch.py b/ml-agents/mlagents/torch_utils/torch.py
index ce1fec7a57..311304ef54 100644
--- a/ml-agents/mlagents/torch_utils/torch.py
+++ b/ml-agents/mlagents/torch_utils/torch.py
@@ -53,7 +53,7 @@ def set_torch_config(torch_settings: TorchSettings) -> None:
if _device.type == "cuda":
torch.set_default_device(_device.type)
- torch.set_default_dtype(torch.cuda.FloatTensor)
+ torch.set_default_dtype(torch.float32)
else:
torch.set_default_dtype(torch.float32)
logger.debug(f"default Torch device: {_device}")
diff --git a/ml-agents/mlagents/trainers/__init__.py b/ml-agents/mlagents/trainers/__init__.py
index c376dbb366..adda2e26ea 100644
--- a/ml-agents/mlagents/trainers/__init__.py
+++ b/ml-agents/mlagents/trainers/__init__.py
@@ -1,5 +1,5 @@
# Version of the library that will be used to upload to pypi
-__version__ = "1.1.0.dev0"
+__version__ = "1.1.0"
# Git tag that will be checked to determine whether to trigger upload to pypi
-__release_tag__ = None
+__release_tag__ = "release_22"
diff --git a/ml-agents/mlagents/trainers/tests/test_torch_utils.py b/ml-agents/mlagents/trainers/tests/test_torch_utils.py
index f0d69e3564..a8e15a4a26 100644
--- a/ml-agents/mlagents/trainers/tests/test_torch_utils.py
+++ b/ml-agents/mlagents/trainers/tests/test_torch_utils.py
@@ -11,8 +11,8 @@
"device_str, expected_type, expected_index, expected_tensor_type",
[
("cpu", "cpu", None, torch.float32),
- ("cuda", "cuda", None, torch.cuda.FloatTensor),
- ("cuda:42", "cuda", 42, torch.cuda.FloatTensor),
+ ("cuda", "cuda", None, torch.float32),
+ ("cuda:42", "cuda", 42, torch.float32),
("opengl", "opengl", None, torch.float32),
],
)
diff --git a/ml-agents/mlagents/trainers/tests/torch_entities/test_attention.py b/ml-agents/mlagents/trainers/tests/torch_entities/test_attention.py
index f7344a647b..1a210987bc 100644
--- a/ml-agents/mlagents/trainers/tests/torch_entities/test_attention.py
+++ b/ml-agents/mlagents/trainers/tests/torch_entities/test_attention.py
@@ -1,5 +1,5 @@
import pytest
-from mlagents.torch_utils import torch
+from mlagents.torch_utils import torch, default_device
import numpy as np
from mlagents.trainers.torch_entities.utils import ModelUtils
@@ -217,7 +217,7 @@ def test_predict_minimum_training():
argmin = argmin.squeeze()
argmin = argmin.detach()
sliced_oh = onehots[:, : num + 1]
- inp = torch.cat([inp, sliced_oh], dim=2)
+ inp = torch.cat([inp, sliced_oh.to(default_device())], dim=2)
embeddings = entity_embedding(inp, inp)
masks = get_zero_entities_mask([inp])
diff --git a/ml-agents/mlagents/trainers/torch_entities/distributions.py b/ml-agents/mlagents/trainers/torch_entities/distributions.py
index c324e172f4..e5f4cbb52e 100644
--- a/ml-agents/mlagents/trainers/torch_entities/distributions.py
+++ b/ml-agents/mlagents/trainers/torch_entities/distributions.py
@@ -69,13 +69,28 @@ def sample(self):
def deterministic_sample(self):
return self.mean
+ # def log_prob(self, value):
+ # var = self.std**2
+ # log_scale = torch.log(self.std + EPSILON)
+ # return (
+ # -((value - self.mean) ** 2) / (2 * var + EPSILON)
+ # - log_scale
+ # - math.log(math.sqrt(2 * math.pi))
+ # )
+
def log_prob(self, value):
- var = self.std**2
+ value = value.to(self.mean.device)
+ var = self.std ** 2
log_scale = torch.log(self.std + EPSILON)
+ # print("value device:", value.device)
+ # print("mean device :", self.mean.device)
+ # print("std device :", self.std.device)
+ # print("var device :", var.device)
+ # print("log_scale device :", log_scale.device)
return (
-((value - self.mean) ** 2) / (2 * var + EPSILON)
- log_scale
- - math.log(math.sqrt(2 * math.pi))
+ - 0.5 * torch.log(torch.tensor(2 * math.pi, device=self.mean.device))
)
def pdf(self, value):
diff --git a/ml-agents/mlagents/trainers/torch_entities/encoders.py b/ml-agents/mlagents/trainers/torch_entities/encoders.py
index 7805c26015..a8a29d9877 100644
--- a/ml-agents/mlagents/trainers/torch_entities/encoders.py
+++ b/ml-agents/mlagents/trainers/torch_entities/encoders.py
@@ -12,6 +12,7 @@ def __init__(self, vec_obs_size: int):
self.register_buffer("running_variance", torch.ones(vec_obs_size))
def forward(self, inputs: torch.Tensor) -> torch.Tensor:
+ inputs = inputs.to(self.running_mean.device)
normalized_state = torch.clamp(
(inputs - self.running_mean)
/ torch.sqrt(self.running_variance / self.normalization_steps),
diff --git a/ml-agents/mlagents/trainers/torch_entities/networks.py b/ml-agents/mlagents/trainers/torch_entities/networks.py
index 555268075c..9d1d9a3f13 100644
--- a/ml-agents/mlagents/trainers/torch_entities/networks.py
+++ b/ml-agents/mlagents/trainers/torch_entities/networks.py
@@ -87,7 +87,7 @@ def update_normalization(self, buffer: AgentBuffer) -> None:
obs = ObsUtil.from_buffer(buffer, len(self.processors))
for vec_input, enc in zip(obs, self.processors):
if isinstance(enc, VectorInput):
- enc.update_normalization(torch.as_tensor(vec_input.to_ndarray()))
+ enc.update_normalization(torch.as_tensor(vec_input.to_ndarray(), device=enc.normalizer.running_mean.device))
def copy_normalization(self, other_encoder: "ObservationEncoder") -> None:
if self.normalize:
diff --git a/ml-agents/mlagents/trainers/torch_entities/utils.py b/ml-agents/mlagents/trainers/torch_entities/utils.py
index d5381cbecb..f24a4e8b65 100644
--- a/ml-agents/mlagents/trainers/torch_entities/utils.py
+++ b/ml-agents/mlagents/trainers/torch_entities/utils.py
@@ -325,6 +325,8 @@ def masked_mean(tensor: torch.Tensor, masks: torch.Tensor) -> torch.Tensor:
(torch.ones_like(tensor) * masks).float().sum(), min=1.0
)
else:
+ masks = masks.to(tensor.device)
+ # print("Mask Device:",masks.device)
return (
tensor.permute(*torch.arange(tensor.ndim - 1, -1, -1)) * masks
).sum() / torch.clamp(
@@ -416,9 +418,11 @@ def trust_region_value_loss(
value_losses = []
for name, head in values.items():
old_val_tensor = old_values[name]
+ old_val_tensor = old_val_tensor.to(head.device)
returns_tensor = returns[name]
+ returns_tensor = returns_tensor.to(head.device)
clipped_value_estimate = old_val_tensor + torch.clamp(
- head - old_val_tensor, -1 * epsilon, epsilon
+ head - old_val_tensor, -epsilon, epsilon
)
v_opt_a = (returns_tensor - head) ** 2
v_opt_b = (returns_tensor - clipped_value_estimate) ** 2
@@ -443,6 +447,8 @@ def trust_region_policy_loss(
:param loss_masks: Mask for losses. Used with LSTM to ignore 0'ed out experiences.
"""
advantage = advantages.unsqueeze(-1)
+ advantage = advantage.to(log_probs.device)
+ old_log_probs = old_log_probs.to(log_probs.device)
r_theta = torch.exp(log_probs - old_log_probs)
p_opt_a = r_theta * advantage
p_opt_b = torch.clamp(r_theta, 1.0 - epsilon, 1.0 + epsilon) * advantage
diff --git a/ml-agents/setup.py b/ml-agents/setup.py
index 1bf1fb4bf9..c2b862d50e 100644
--- a/ml-agents/setup.py
+++ b/ml-agents/setup.py
@@ -92,4 +92,4 @@ def run(self):
},
# TODO: Remove this once mypy stops having spurious setuptools issues.
cmdclass={"verify": VerifyVersionCommand}, # type: ignore
-)
+)
\ No newline at end of file
diff --git a/utils/make_readme_table.py b/utils/make_readme_table.py
index 12056f31c2..bf467fd731 100644
--- a/utils/make_readme_table.py
+++ b/utils/make_readme_table.py
@@ -140,7 +140,8 @@ def pypi_link(self):
ReleaseInfo("release_18", "2.1.0", "0.27.0", "June 9, 2021"),
ReleaseInfo("release_19", "2.2.1", "0.28.0", "January 14, 2022"),
ReleaseInfo("release_20", "2.3.0", "0.30.0", "November 21, 2022"),
- ReleaseInfo("release_21", "3.0.0", "1.0.0", "October 9, 2023"),
+ ReleaseInfo("release_21", "3.0.0-exp.1", "1.0.0", "October 9, 2023"),
+ ReleaseInfo("release_22", "3.0.0", "1.1.0", "October 5, 2024"),
# Verified releases
# ReleaseInfo("", "1.0.8", "0.16.1", "May 26, 2021", is_verified=True),
# ReleaseInfo("", "1.0.7", "0.16.1", "March 8, 2021", is_verified=True),
diff --git a/utils/validate_versions.py b/utils/validate_versions.py
index 65044ed5a8..c8d0168cdf 100755
--- a/utils/validate_versions.py
+++ b/utils/validate_versions.py
@@ -81,11 +81,13 @@ def set_version(
f.write(new_contents)
if csharp_version is not None:
- package_version = f"{csharp_version}-exp.1"
+ # removed exp.1 tag from version strings since MLA package is a supported package again
+ # package_version = f"{csharp_version}-exp.1"
+ package_version = f"{csharp_version}"
if csharp_extensions_version is not None:
# since this has never been promoted we need to keep
# it in preview forever or CI will fail
- extension_version = f"{csharp_extensions_version}-exp.1"
+ extension_version = f"{csharp_extensions_version}-preview"
print(
f"Setting package version to {package_version} in {MLAGENTS_PACKAGE_JSON_PATH}"
f" and {MLAGENTS_EXTENSIONS_PACKAGE_JSON_PATH}"
@@ -178,7 +180,7 @@ def print_release_tag_commands(
print(f"Updating C# package to version {args.csharp_version}")
if args.csharp_extensions_version:
print(
- f"Updating C# extensions package to version {args.csharp_extensions_version}"
+ f"Updating C# extensions package to version {args.csharp_extensions_version}-exp.1"
)
set_version(
args.python_version,