diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 8baa8914d2..b54b65de7d --- a/.gitignore +++ b/.gitignore @@ -1,30 +1,29 @@ -/UnitySDK/[Ll]ibrary/ -/UnitySDK/[Tt]emp/ -/UnitySDK/[Oo]bj/ -/UnitySDK/[Bb]uild/ -/UnitySDK/[Bb]uilds/ -/UnitySDK/[Pp]ackages/ -/UnitySDK/[Uu]nity[Pp]ackage[Mm]anager/ -/UnitySDK/Assets/AssetStoreTools* -/UnitySDK/Assets/Plugins* -/UnitySDK/Assets/Gizmos* +/unity-environment/[Ll]ibrary/ +/unity-environment/[Tt]emp/ +/unity-environment/[Oo]bj/ +/unity-environment/[Bb]uild/ +/unity-environment/[Bb]uilds/ +/unity-environment/[Pp]ackages/ +/unity-environment/[Uu]nity[Pp]ackage[Mm]anager/ +/unity-environment/Assets/AssetStoreTools* +/unity-environment/Assets/Plugins* +/unity-environment/Assets/Gizmos* # Tensorflow Model Info /models /summaries - -# Training environments -/envs +python/models +python/summaries # Environemnt logfile -*UnitySDK.log +*unity-environment.log # Visual Studio 2015 cache directory -/UnitySDK/.vs/ +/unity-environment/.vs/ # Autogenerated VS/MD/Consulo solution and project files -/UnitySDKExportedObj/ -/UnitySDK.consulo/ +/unity-environmentExportedObj/ +/unity-environment.consulo/ *.csproj *.unityproj *.sln @@ -41,7 +40,7 @@ *.pidb.meta # Unity3D Generated File On Crash Reports -/UnitySDK/sysinfo.txt +/unity-environment/sysinfo.txt # Builds *.apk @@ -52,10 +51,10 @@ *.x86 # Tensorflow Sharp Files -/UnitySDK/Assets/ML-Agents/Plugins/Android* -/UnitySDK/Assets/ML-Agents/Plugins/iOS* -/UnitySDK/Assets/ML-Agents/Plugins/Computer* -/UnitySDK/Assets/ML-Agents/Plugins/System* +/unity-environment/Assets/ML-Agents/Plugins/Android* +/unity-environment/Assets/ML-Agents/Plugins/iOS* +/unity-environment/Assets/ML-Agents/Plugins/Computer* +/unity-environment/Assets/ML-Agents/Plugins/System* # Generated doc folders /docs/html @@ -76,20 +75,5 @@ *.eggs* *.gitignore.swp -# VSCode hidden files -*.vscode/ .DS_Store -.ipynb_checkpoints - -# pytest cache -*.pytest_cache/ - -# Ignore compiled protobuf files. -ml-agents-protobuf/cs -ml-agents-protobuf/python -ml-agents-protobuf/Grpc* - -# Ignore PyPi build files. -dist/ -build/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 24853b18df..f16f58d884 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -67,8 +67,7 @@ members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.4, available at -https://www.contributor-covenant.org/version/1/4/code-of-conduct/ +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct/ [homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2f1b5f5f16..9372673ac2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,56 +1,54 @@ # Contribution Guidelines -Thank you for your interest in contributing to the ML-Agents toolkit! We are -incredibly excited to see how members of our community will use and extend the -ML-Agents toolkit. To facilitate your contributions, we've outlined a brief set -of guidelines to ensure that your extensions can be easily integrated. +Thank you for your interest in contributing to the ML-Agents toolkit! We are incredibly +excited to see how members of our community will use and extend the ML-Agents toolkit. +To facilitate your contributions, we've outlined a brief set of guidelines +to ensure that your extensions can be easily integrated. -## Communication +### Communication -First, please read through our [code of conduct](CODE_OF_CONDUCT.md), as we -expect all our contributors to follow it. +First, please read through our [code of conduct](CODE_OF_CONDUCT.md), +as we expect all our contributors to follow it. -Second, before starting on a project that you intend to contribute to the -ML-Agents toolkit (whether environments or modifications to the codebase), we -**strongly** recommend posting on our -[Issues page](https://github.com/Unity-Technologies/ml-agents/issues) -and briefly outlining the changes you plan to make. This will enable us to -provide some context that may be helpful for you. This could range from advice -and feedback on how to optimally perform your changes or reasons for not doing -it. +Second, before starting on a project that you intend to contribute +to the ML-Agents toolkit (whether environments or modifications to the codebase), +we **strongly** recommend posting on our +[Issues page](https://github.com/Unity-Technologies/ml-agents/issues) and +briefly outlining the changes you plan to make. This will enable us to provide +some context that may be helpful for you. This could range from advice and +feedback on how to optimally perform your changes or reasons for not doing it. Lastly, if you're looking for input on what to contribute, feel free to reach out to us directly at ml-agents@unity3d.com and/or browse the GitHub issues with the `contributions welcome` label. -## Git Branches +### Git Branches -Starting with v0.3, we adopted the +Starting with v0.3, we adopted the [Gitflow Workflow](http://nvie.com/posts/a-successful-git-branching-model/). -Consequently, the `master` branch corresponds to the latest release of +Consequently, the `master` branch corresponds to the latest release of the project, while the `develop` branch corresponds to the most recent, stable, version of the project. Thus, when adding to the project, **please branch off `develop`** and make sure that your Pull Request (PR) contains the following: - * Detailed description of the changes performed -* Corresponding changes to documentation, unit tests and sample environments (if - applicable) +* Corresponding changes to documentation, unit tests and sample environments +(if applicable) * Summary of the tests performed to validate your changes * Issue numbers that the PR resolves (if any) -## Environments +### Environments -We are also actively open to adding community contributed environments as -examples, as long as they are small, simple, demonstrate a unique feature of -the platform, and provide a unique non-trivial challenge to modern +We are also actively open to adding community contributed environments as +examples, as long as they are small, simple, demonstrate a unique feature of +the platform, and provide a unique non-trivial challenge to modern machine learning algorithms. Feel free to submit these environments with a -PR explaining the nature of the environment and task. +PR explaining the nature of the environment and task. -## Style Guide +### Style Guide -When performing changes to the codebase, ensure that you follow the style guide -of the file you're modifying. For Python, we follow -[PEP 8](https://www.python.org/dev/peps/pep-0008/). -For C#, we will soon be adding a formal style guide for our repository. +When performing changes to the codebase, ensure that you follow the style +guide of the file you're modifying. For Python, we follow +[PEP 8](https://www.python.org/dev/peps/pep-0008/). For C#, we will soon be +adding a formal style guide for our repository. diff --git a/Dockerfile b/Dockerfile index f77ecb1bc7..0b2d722774 100644 --- a/Dockerfile +++ b/Dockerfile @@ -122,11 +122,14 @@ RUN apt-get update && apt-get -y upgrade # xvfb is used to do CPU based rendering of Unity RUN apt-get install -y xvfb -COPY ml-agents /ml-agents -WORKDIR /ml-agents -RUN pip install . + +ADD python/requirements.txt . +RUN pip install --trusted-host pypi.python.org -r requirements.txt + +WORKDIR /execute +COPY python /execute/python # port 5005 is the port used in in Editor training. EXPOSE 5005 -ENTRYPOINT ["mlagents-learn"] +ENTRYPOINT ["python", "python/learn.py"] diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 7d496531c2..179cf4f8a7 --- a/README.md +++ b/README.md @@ -1,86 +1,76 @@ - - # Unity ML-Agents Toolkit (Beta) -**The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source -Unity plugin that enables games and simulations to serve as environments for -training intelligent agents. Agents can be trained using reinforcement learning, -imitation learning, neuroevolution, or other machine learning methods through a -simple-to-use Python API. We also provide implementations (based on TensorFlow) -of state-of-the-art algorithms to enable game developers and hobbyists to easily -train intelligent agents for 2D, 3D and VR/AR games. These trained agents can be -used for multiple purposes, 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 -toolkit is mutually beneficial for both game developers and AI researchers as it -provides a central platform where advances in AI can be evaluated on Unity’s -rich environments and then made accessible to the wider research and game -developer communities. +**The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source Unity plugin +that enables games and simulations to serve as environments for training +intelligent agents. Agents can be trained using reinforcement learning, +imitation learning, neuroevolution, or other machine learning methods through +a simple-to-use Python API. We also provide implementations (based on +TensorFlow) of state-of-the-art algorithms to enable game developers +and hobbyists to easily train intelligent agents for 2D, 3D and VR/AR games. +These trained agents can be used for multiple purposes, 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 toolkit is mutually beneficial for both game +developers and AI researchers as it provides a central platform where advances +in AI can be evaluated on Unity’s rich environments and then made accessible +to the wider research and game developer communities. ## Features - * Unity environment control from Python * 10+ sample Unity environments * Support for multiple environment configurations and training scenarios -* Train memory-enhanced agents using deep reinforcement learning +* Train memory-enhanced Agents using deep reinforcement learning * Easily definable Curriculum Learning scenarios -* Broadcasting of agent behavior for supervised learning +* Broadcasting of Agent behavior for supervised learning * Built-in support for Imitation Learning -* Flexible agent control with On Demand Decision Making +* Flexible Agent control with On Demand Decision Making * Visualizing network outputs within the environment * Simplified set-up with Docker -* Wrap learning environments as a gym ## Documentation -* For more information, in addition to installation and usage instructions, see - our [documentation home](docs/Readme.md). -* If you are a researcher interested in a discussion of Unity as an AI platform, see a pre-print of our [reference paper on Unity and the ML-Agents Toolkit](https://arxiv.org/abs/1809.02627). Also, see below for instructions on citing this paper. -* If you have used a version of the ML-Agents toolkit prior to v0.5, we strongly - recommend our [guide on migrating from earlier versions](docs/Migrating.md). +* For more information, in addition to installation and usage +instructions, see our [documentation home](docs/Readme.md). +* If you have +used a version of the ML-Agents toolkit prior to v0.4, we strongly recommend +our [guide on migrating from earlier versions](docs/Migrating.md). -## Additional Resources +## References We have published a series of blog posts that are relevant for ML-Agents: - -* Overviewing reinforcement learning concepts - ([multi-armed bandit](https://blogs.unity3d.com/2017/06/26/unity-ai-themed-blog-entries/) - and - [Q-learning](https://blogs.unity3d.com/2017/08/22/unity-ai-reinforcement-learning-with-q-learning/)) -* [Using Machine Learning Agents in a real game: a beginner’s guide](https://blogs.unity3d.com/2017/12/11/using-machine-learning-agents-in-a-real-game-a-beginners-guide/) -* [Post](https://blogs.unity3d.com/2018/02/28/introducing-the-winners-of-the-first-ml-agents-challenge/) - announcing the winners of our - [first ML-Agents Challenge](https://connect.unity.com/challenges/ml-agents-1) -* [Post](https://blogs.unity3d.com/2018/01/23/designing-safer-cities-through-simulations/) - overviewing how Unity can be leveraged as a simulator to design safer cities. +- Overviewing reinforcement learning concepts +([multi-armed bandit](https://blogs.unity3d.com/2017/06/26/unity-ai-themed-blog-entries/) +and [Q-learning](https://blogs.unity3d.com/2017/08/22/unity-ai-reinforcement-learning-with-q-learning/)) +- [Using Machine Learning Agents in a real game: a beginner’s guide](https://blogs.unity3d.com/2017/12/11/using-machine-learning-agents-in-a-real-game-a-beginners-guide/) +- [Post](https://blogs.unity3d.com/2018/02/28/introducing-the-winners-of-the-first-ml-agents-challenge/) announcing the winners of our +[first ML-Agents Challenge](https://connect.unity.com/challenges/ml-agents-1) +- [Post](https://blogs.unity3d.com/2018/01/23/designing-safer-cities-through-simulations/) +overviewing how Unity can be leveraged as a simulator to design safer cities. In addition to our own documentation, here are some additional, relevant articles: - -* [Unity AI - Unity 3D Artificial Intelligence](https://www.youtube.com/watch?v=bqsfkGbBU6k) -* [A Game Developer Learns Machine Learning](https://mikecann.co.uk/machine-learning/a-game-developer-learns-machine-learning-intent/) -* [Explore Unity Technologies ML-Agents Exclusively on Intel Architecture](https://software.intel.com/en-us/articles/explore-unity-technologies-ml-agents-exclusively-on-intel-architecture) +- [Unity AI - Unity 3D Artificial Intelligence](https://www.youtube.com/watch?v=bqsfkGbBU6k) +- [A Game Developer Learns Machine Learning](https://mikecann.co.uk/machine-learning/a-game-developer-learns-machine-learning-intent/) +- [Explore Unity Technologies ML-Agents Exclusively on Intel Architecture](https://software.intel.com/en-us/articles/explore-unity-technologies-ml-agents-exclusively-on-intel-architecture) ## Community and Feedback -The ML-Agents toolkit is an open-source project and we encourage and welcome -contributions. If you wish to contribute, be sure to review our -[contribution guidelines](CONTRIBUTING.md) and +The ML-Agents toolkit is an open-source project and we encourage and welcome contributions. +If you wish to contribute, be sure to review our +[contribution guidelines](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md). You can connect with us and the broader community through Unity Connect and GitHub: - * Join our - [Unity Machine Learning Channel](https://connect.unity.com/messages/c/035fba4f88400000) - to connect with others using the ML-Agents toolkit and Unity developers - enthusiastic about machine learning. We use that channel to surface updates - regarding the ML-Agents toolkit (and, more broadly, machine learning in - games). -* If you run into any problems using the ML-Agents toolkit, - [submit an issue](https://github.com/Unity-Technologies/ml-agents/issues) and - make sure to include as much detail as possible. +[Unity Machine Learning Channel](https://connect.unity.com/messages/c/035fba4f88400000) +to connect with others using the ML-Agents toolkit and Unity developers enthusiastic +about machine learning. We use that channel to surface updates +regarding the ML-Agents toolkit (and, more broadly, machine learning in games). +* If you run into any problems using the ML-Agents toolkit, +[submit an issue](https://github.com/Unity-Technologies/ml-agents/issues) and +make sure to include as much detail as possible. For any other questions or feedback, connect directly with the ML-Agents team at ml-agents@unity3d.com. @@ -94,14 +84,8 @@ of the documentation to one language (Chinese), but we hope to continue translating more pages and to other languages. Consequently, we welcome any enhancements and improvements from the community. -* [Chinese](docs/localized/zh-CN/) +- [Chinese](docs/localized/zh-CN/) ## License [Apache License 2.0](LICENSE) - -## Citation - -If you use Unity or the ML-Agents Toolkit to conduct research, we ask that you cite the following paper as a reference: - -Juliani, A., Berges, V., Vckay, E., Gao, Y., Henry, H., Mattar, M., Lange, D. (2018). Unity: A General Platform for Intelligent Agents. *arXiv preprint arXiv:1809.02627.* https://github.com/Unity-Technologies/ml-agents. diff --git a/UnitySDK/Assets/ML-Agents/Editor/Tests.meta b/UnitySDK/Assets/ML-Agents/Editor/Tests.meta deleted file mode 100644 index aeedab3a16..0000000000 --- a/UnitySDK/Assets/ML-Agents/Editor/Tests.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 172fcc71d343247a9a91d5b54dd21cd6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestActionMasker.cs b/UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestActionMasker.cs deleted file mode 100644 index 101296169f..0000000000 --- a/UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestActionMasker.cs +++ /dev/null @@ -1,139 +0,0 @@ -using NUnit.Framework; - -namespace MLAgents.Tests -{ - public class EditModeTestActionMasker - { - [Test] - public void Contruction() - { - var bp = new BrainParameters(); - var masker = new ActionMasker(bp); - Assert.IsNotNull(masker); - } - - [Test] - public void FailsWithContinuous() - { - var bp = new BrainParameters(); - bp.vectorActionSpaceType = SpaceType.continuous; - bp.vectorActionSize = new int[1] {4}; - var masker = new ActionMasker(bp); - masker.SetActionMask(0, new int[1] {0}); - Assert.Catch(() => masker.GetMask()); - - } - - [Test] - public void NullMask() - { - var bp = new BrainParameters(); - bp.vectorActionSpaceType = SpaceType.discrete; - var masker = new ActionMasker(bp); - var mask = masker.GetMask(); - Assert.IsNull(mask); - } - - [Test] - public void FirstBranchMask() - { - var bp = new BrainParameters(); - bp.vectorActionSpaceType = SpaceType.discrete; - bp.vectorActionSize = new int[3] {4, 5, 6}; - var masker = new ActionMasker(bp); - var mask = masker.GetMask(); - Assert.IsNull(mask); - masker.SetActionMask(0, new int[]{1,2,3}); - mask = masker.GetMask(); - Assert.IsFalse(mask[0]); - Assert.IsTrue(mask[1]); - Assert.IsTrue(mask[2]); - Assert.IsTrue(mask[3]); - Assert.IsFalse(mask[4]); - Assert.AreEqual(mask.Length, 15); - } - - [Test] - public void SecondBranchMask() - { - var bp = new BrainParameters(); - bp.vectorActionSpaceType = SpaceType.discrete; - bp.vectorActionSize = new int[3] {4, 5, 6}; - var masker = new ActionMasker(bp); - bool[] mask = masker.GetMask(); - masker.SetActionMask(1, new int[]{1,2,3}); - mask = masker.GetMask(); - Assert.IsFalse(mask[0]); - Assert.IsFalse(mask[4]); - Assert.IsTrue(mask[5]); - Assert.IsTrue(mask[6]); - Assert.IsTrue(mask[7]); - Assert.IsFalse(mask[8]); - Assert.IsFalse(mask[9]); - } - - [Test] - public void MaskReset() - { - var bp = new BrainParameters(); - bp.vectorActionSpaceType = SpaceType.discrete; - bp.vectorActionSize = new int[3] {4, 5, 6}; - var masker = new ActionMasker(bp); - var mask = masker.GetMask(); - masker.SetActionMask(1, new int[3]{1,2,3}); - mask = masker.GetMask(); - masker.ResetMask(); - mask = masker.GetMask(); - for (var i = 0; i < 15; i++) - { - Assert.IsFalse(mask[i]); - } - } - - [Test] - public void ThrowsError() - { - var bp = new BrainParameters(); - bp.vectorActionSpaceType = SpaceType.discrete; - bp.vectorActionSize = new int[3] {4, 5, 6}; - var masker = new ActionMasker(bp); - - Assert.Catch( - () => masker.SetActionMask(0, new int[1]{5})); - Assert.Catch( - () => masker.SetActionMask(1, new int[1]{5})); - masker.SetActionMask(2, new int[1] {5}); - Assert.Catch( - () => masker.SetActionMask(3, new int[1]{1})); - masker.GetMask(); - masker.ResetMask(); - masker.SetActionMask(0, new int[4] {0, 1, 2, 3}); - Assert.Catch( - () => masker.GetMask()); - } - - [Test] - public void MultipleMaskEdit() - { - var bp = new BrainParameters(); - bp.vectorActionSpaceType = SpaceType.discrete; - bp.vectorActionSize = new int[3] {4, 5, 6}; - var masker = new ActionMasker(bp); - masker.SetActionMask(0, new int[2] {0, 1}); - masker.SetActionMask(0, new int[1] {3}); - masker.SetActionMask(2, new int[1] {1}); - var mask = masker.GetMask(); - for (var i = 0; i < 15; i++) - { - if ((i == 0) || (i == 1) || (i == 3)|| (i == 10)) - { - Assert.IsTrue(mask[i]); - } - else - { - Assert.IsFalse(mask[i]); - } - } - } - } -} diff --git a/UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestActionMasker.cs.meta b/UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestActionMasker.cs.meta deleted file mode 100644 index 1325856f78..0000000000 --- a/UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestActionMasker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2e2810ee6c8c64fb39abdf04b5d17f50 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes b/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes deleted file mode 100644 index 95835133c0..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes b/UnitySDK/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes deleted file mode 100644 index 17e1f29765..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs b/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs deleted file mode 100755 index a1957f5310..0000000000 --- a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using UnityEngine; -using System.Linq; -using MLAgents; - -public class GridAgent : Agent -{ - [Header("Specific to GridWorld")] - private GridAcademy academy; - public float timeBetweenDecisionsAtInference; - private float timeSinceDecision; - - [Tooltip("Selecting will turn on action masking. Note that a model trained with action " + - "masking turned on may not behave optimally when action masking is turned off.")] - public bool maskActions = true; - - private const int NoAction = 0; // do nothing! - private const int Up = 1; - private const int Down = 2; - private const int Left = 3; - private const int Right = 4; - - public override void InitializeAgent() - { - academy = FindObjectOfType(typeof(GridAcademy)) as GridAcademy; - } - - public override void CollectObservations() - { - // There are no numeric observations to collect as this environment uses visual - // observations. - - // Mask the necessary actions if selected by the user. - if (maskActions) - { - SetMask(); - } - } - - /// - /// Applies the mask for the agents action to disallow unnecessary actions. - /// - private void SetMask() - { - // Prevents the agent from picking an action that would make it collide with a wall - var positionX = (int) transform.position.x; - var positionZ = (int) transform.position.z; - var maxPosition = academy.gridSize - 1; - - if (positionX == 0) - { - SetActionMask(Left); - } - - if (positionX == maxPosition) - { - SetActionMask(Right); - } - - if (positionZ == 0) - { - SetActionMask(Down); - } - - if (positionZ == maxPosition) - { - SetActionMask(Up); - } - } - - // to be implemented by the developer - public override void AgentAction(float[] vectorAction, string textAction) - { - AddReward(-0.01f); - int action = Mathf.FloorToInt(vectorAction[0]); - - Vector3 targetPos = transform.position; - switch (action) - { - case NoAction: - // do nothing - break; - case Right: - targetPos = transform.position + new Vector3(1f, 0, 0f); - break; - case Left: - targetPos = transform.position + new Vector3(-1f, 0, 0f); - break; - case Up: - targetPos = transform.position + new Vector3(0f, 0, 1f); - break; - case Down: - targetPos = transform.position + new Vector3(0f, 0, -1f); - break; - default: - throw new ArgumentException("Invalid action value"); - } - - Collider[] blockTest = Physics.OverlapBox(targetPos, new Vector3(0.3f, 0.3f, 0.3f)); - if (blockTest.Where(col => col.gameObject.CompareTag("wall")).ToArray().Length == 0) - { - transform.position = targetPos; - - if (blockTest.Where(col => col.gameObject.CompareTag("goal")).ToArray().Length == 1) - { - Done(); - SetReward(1f); - } - if (blockTest.Where(col => col.gameObject.CompareTag("pit")).ToArray().Length == 1) - { - Done(); - SetReward(-1f); - } - } - } - - // to be implemented by the developer - public override void AgentReset() - { - academy.AcademyReset(); - } - - public void FixedUpdate() - { - WaitTimeInference(); - } - - private void WaitTimeInference() - { - if (!academy.GetIsInference()) - { - RequestDecision(); - } - else - { - if (timeSinceDecision >= timeBetweenDecisionsAtInference) - { - timeSinceDecision = 0f; - RequestDecision(); - } - else - { - timeSinceDecision += Time.fixedDeltaTime; - } - } - } -} diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes b/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes deleted file mode 100644 index 2cb79f5a5f..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes b/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes deleted file mode 100644 index ddd9464271..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes b/UnitySDK/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes deleted file mode 100644 index 36f372ecef..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes b/UnitySDK/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes deleted file mode 100644 index f64e93715b..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes b/UnitySDK/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes deleted file mode 100644 index f87fe36b1e..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.bytes b/UnitySDK/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.bytes deleted file mode 100644 index c1f3e59f93..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes b/UnitySDK/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes deleted file mode 100644 index 4f02b1de8e..0000000000 Binary files a/UnitySDK/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes and /dev/null differ diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta b/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta deleted file mode 100644 index 87f002f65c..0000000000 --- a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta +++ /dev/null @@ -1,142 +0,0 @@ -fileFormatVersion: 2 -guid: 7eeb863bd08ba4388829c23da03a714f -PluginImporter: - serializedVersion: 2 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - data: - first: - '': Any - second: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 0 - Exclude Linux: 1 - Exclude Linux64: 1 - Exclude LinuxUniversal: 1 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude Win: 1 - Exclude Win64: 1 - Exclude iOS: 1 - data: - first: - '': OSXIntel - second: - enabled: 1 - settings: {} - data: - first: - '': OSXIntel64 - second: - enabled: 1 - settings: {} - data: - first: - Android: Android - second: - enabled: 0 - settings: - CPU: ARMv7 - data: - first: - Any: - second: - enabled: 0 - settings: {} - data: - first: - Editor: Editor - second: - enabled: 1 - settings: - CPU: x86_64 - DefaultValueInitialized: true - OS: OSX - data: - first: - Facebook: Win - second: - enabled: 0 - settings: - CPU: AnyCPU - data: - first: - Facebook: Win64 - second: - enabled: 0 - settings: - CPU: AnyCPU - data: - first: - Standalone: Linux - second: - enabled: 0 - settings: - CPU: x86 - data: - first: - Standalone: Linux64 - second: - enabled: 0 - settings: - CPU: x86_64 - data: - first: - Standalone: LinuxUniversal - second: - enabled: 0 - settings: - CPU: None - data: - first: - Standalone: OSXIntel - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: OSXIntel64 - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: OSXUniversal - second: - enabled: 1 - settings: - CPU: AnyCPU - data: - first: - Standalone: Win - second: - enabled: 0 - settings: - CPU: AnyCPU - data: - first: - Standalone: Win64 - second: - enabled: 0 - settings: - CPU: AnyCPU - data: - first: - iPhone: iOS - second: - enabled: 0 - settings: - AddToEmbeddedBinaries: false - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnitySDK/Assets/ML-Agents/Scripts/ActionMasker.cs b/UnitySDK/Assets/ML-Agents/Scripts/ActionMasker.cs deleted file mode 100644 index 8a2bf4fd9b..0000000000 --- a/UnitySDK/Assets/ML-Agents/Scripts/ActionMasker.cs +++ /dev/null @@ -1,157 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace MLAgents -{ - public class ActionMasker - { - /// When using discrete control, is the starting indices of the actions - /// when all the branches are concatenated with each other. - private int[] _startingActionIndices; - - private bool[] _currentMask; - - private readonly BrainParameters _brainParameters; - - public ActionMasker(BrainParameters brainParameters) - { - this._brainParameters = brainParameters; - } - - /// - /// Modifies an action mask for discrete control agents. When used, the agent will not be - /// able to perform the action passed as argument at the next decision. If no branch is - /// specified, the default branch will be 0. The actionIndex or actionIndices correspond - /// to the action the agent will be unable to perform. - /// - /// The branch for which the actions will be masked - /// The indices of the masked actions - public void SetActionMask(int branch, IEnumerable actionIndices) - { - // If the branch does not exist, raise an error - if (branch >= _brainParameters.vectorActionSize.Length ) - throw new UnityAgentsException( - "Invalid Action Masking : Branch "+branch+" does not exist."); - - int totalNumberActions = _brainParameters.vectorActionSize.Sum(); - - // By default, the masks are null. If we want to specify a new mask, we initialize - // the actionMasks with trues. - if (_currentMask == null) - { - _currentMask = new bool[totalNumberActions]; - } - - // If this is the first time the masked actions are used, we generate the starting - // indices for each branch. - if (_startingActionIndices == null) - { - _startingActionIndices = CreateActionStartinIndices(); - } - - // Perform the masking - foreach (var actionIndex in actionIndices) - { - if (actionIndex >= _brainParameters.vectorActionSize[branch]) - { - throw new UnityAgentsException( - "Invalid Action Masking: Action Mask is too large for specified branch."); - } - _currentMask[actionIndex + _startingActionIndices[branch]] = true; - } - } - - /// - /// Get the current mask for an agent - /// - /// A mask for the agent. A boolean array of length equal to the total number of - /// actions. - public bool[] GetMask() - { - if (_currentMask != null) - { - AssertMask(); - } - return _currentMask; - } - - /// - /// Makes sure that the current mask is usable. - /// - private void AssertMask() - { - // Action Masks can only be used in Discrete Control. - if (_brainParameters.vectorActionSpaceType != SpaceType.discrete) - { - throw new UnityAgentsException( - "Invalid Action Masking : Can only set action mask for Discrete Control."); - } - - var numBranches = _brainParameters.vectorActionSize.Length; - for (var branchIndex = 0 ; branchIndex < numBranches; branchIndex++ ) - { - if (AreAllActionsMasked(branchIndex)) - { - throw new UnityAgentsException( - "Invalid Action Masking : All the actions of branch " + branchIndex + - " are masked."); - } - } - } - - /// - /// Resets the current mask for an agent - /// - public void ResetMask() - { - if (_currentMask != null) - { - Array.Clear(_currentMask, 0, _currentMask.Length); - } - } - - /// - /// Generates an array containing the starting indicies of each branch in the vector action - /// Makes a cumulative sum. - /// - /// - private int[] CreateActionStartinIndices() - { - var vectorActionSize = _brainParameters.vectorActionSize; - var runningSum = 0; - var result = new int[vectorActionSize.Length + 1]; - for (var actionIndex = 0; - actionIndex < vectorActionSize.Length; actionIndex++) - { - runningSum += vectorActionSize[actionIndex]; - result[actionIndex + 1] = runningSum; - } - return result; - } - - /// - /// Checks if all the actions in the input branch are masked - /// - /// The index of the branch to check - /// True if all the actions of the branch are masked - private bool AreAllActionsMasked(int branch) - { - if (_currentMask == null) - { - return false; - } - var start = _startingActionIndices[branch]; - var end = _startingActionIndices[branch + 1]; - for (var i = start; i < end; i++) - { - if (!_currentMask[i]) - { - return false; - } - } - return true; - - } - } -} diff --git a/UnitySDK/Assets/ML-Agents/Scripts/ActionMasker.cs.meta b/UnitySDK/Assets/ML-Agents/Scripts/ActionMasker.cs.meta deleted file mode 100644 index a7ab396c89..0000000000 --- a/UnitySDK/Assets/ML-Agents/Scripts/ActionMasker.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 8a0ec4ccf4ee450da7766f65228d5460 -timeCreated: 1534530911 \ No newline at end of file diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainInternal.cs b/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainInternal.cs deleted file mode 100644 index 2d73184043..0000000000 --- a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainInternal.cs +++ /dev/null @@ -1,688 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -#if UNITY_EDITOR -using UnityEditor; -#endif -using System.Linq; -#if ENABLE_TENSORFLOW -using TensorFlow; - -#endif - -namespace MLAgents -{ - /// CoreBrain which decides actions using internally embedded TensorFlow model. - public class CoreBrainInternal : ScriptableObject, CoreBrain - { - [SerializeField] [Tooltip("If checked, the brain will broadcast states and actions to Python.")] -#pragma warning disable - private bool broadcast = true; -#pragma warning restore - - [System.Serializable] - private struct TensorFlowAgentPlaceholder - { - public enum TensorType - { - Integer, - FloatingPoint - }; - - public string name; - public TensorType valueType; - public float minValue; - public float maxValue; - } - - Batcher brainBatcher; - - [Tooltip("This must be the bytes file corresponding to the pretrained TensorFlow graph.")] - /// Modify only in inspector : Reference to the Graph asset - public TextAsset graphModel; - - /// Modify only in inspector : If a scope was used when training the model, specify it here - public string graphScope; - - [SerializeField] - [Tooltip( - "If your graph takes additional inputs that are fixed (example: noise level) you can specify them here.")] - /// Modify only in inspector : If your graph takes additional inputs that are fixed you can specify them here. - private TensorFlowAgentPlaceholder[] graphPlaceholders; - - /// Modify only in inspector : Name of the placholder of the batch size - public string BatchSizePlaceholderName = "batch_size"; - - /// Modify only in inspector : Name of the state placeholder - public string VectorObservationPlacholderName = "vector_observation"; - - /// Modify only in inspector : Name of the recurrent input - public string RecurrentInPlaceholderName = "recurrent_in"; - - /// Modify only in inspector : Name of the recurrent output - public string RecurrentOutPlaceholderName = "recurrent_out"; - - /// Modify only in inspector : Names of the observations placeholders - public string[] VisualObservationPlaceholderName; - - /// Modify only in inspector : Name of the action node - public string ActionPlaceholderName = "action"; - - /// Modify only in inspector : Name of the previous action node - public string PreviousActionPlaceholderName = "prev_action"; - - /// Name of the action mask node - private string ActionMaskPlaceholderName = "action_masks"; - -#if ENABLE_TENSORFLOW - TFGraph graph; - TFSession session; - bool hasRecurrent; - bool hasState; - bool hasBatchSize; - bool hasPrevAction; - bool hasMaskedActions; - bool hasValueEstimate; - float[,] inputState; - int[,] inputPrevAction; - List observationMatrixList; - float[,] inputOldMemories; - float[,] maskedActions; - List texturesHolder; - int memorySize; -#endif - - /// Reference to the brain that uses this CoreBrainInternal - public Brain brain; - - /// Create the reference to the brain - public void SetBrain(Brain b) - { - brain = b; - } - - /// Loads the tensorflow graph model to generate a TFGraph object - public void InitializeCoreBrain(MLAgents.Batcher brainBatcher) - { -#if ENABLE_TENSORFLOW -#if UNITY_ANDROID && !UNITY_EDITOR -// This needs to ba called only once and will raise an exception if -// there are multiple internal brains - try{ - TensorFlowSharp.Android.NativeBinding.Init(); - } - catch{ - - } -#endif - if ((brainBatcher == null) - || (!broadcast)) - { - this.brainBatcher = null; - } - else - { - this.brainBatcher = brainBatcher; - this.brainBatcher.SubscribeBrain(brain.gameObject.name); - } - - if (graphModel != null) - { - graph = new TFGraph(); - - graph.Import(graphModel.bytes); - - session = new TFSession(graph); - - // TODO: Make this a loop over a dynamic set of graph inputs - - if ((graphScope.Length > 1) && (graphScope[graphScope.Length - 1] != '/')) - { - graphScope = graphScope + '/'; - } - - if (graph[graphScope + BatchSizePlaceholderName] != null) - { - hasBatchSize = true; - } - - if ((graph[graphScope + RecurrentInPlaceholderName] != null) && - (graph[graphScope + RecurrentOutPlaceholderName] != null)) - { - hasRecurrent = true; - var runner = session.GetRunner(); - runner.Fetch(graph[graphScope + "memory_size"][0]); - var networkOutput = runner.Run()[0].GetValue(); - memorySize = (int) networkOutput; - } - - if (graph[graphScope + VectorObservationPlacholderName] != null) - { - hasState = true; - } - - if (graph[graphScope + PreviousActionPlaceholderName] != null) - { - hasPrevAction = true; - } - if (graph[graphScope + "value_estimate"] != null) - { - hasValueEstimate = true; - } - if (graph[graphScope + ActionMaskPlaceholderName] != null) - { - hasMaskedActions = true; - } - } - - - observationMatrixList = new List(); - texturesHolder = new List(); -#endif - } - - - /// Uses the stored information to run the tensorflow graph and generate - /// the actions. - public void DecideAction(Dictionary agentInfo) - { -#if ENABLE_TENSORFLOW - if (brainBatcher != null) - { - brainBatcher.SendBrainInfo(brain.gameObject.name, agentInfo); - } - - int currentBatchSize = agentInfo.Count(); - List agentList = agentInfo.Keys.ToList(); - if (currentBatchSize == 0) - { - return; - } - - - // Create the state tensor - if (hasState) - { - int stateLength = 1; - stateLength = brain.brainParameters.vectorObservationSize; - inputState = - new float[currentBatchSize, stateLength * brain.brainParameters.numStackedVectorObservations]; - - var i = 0; - foreach (Agent agent in agentList) - { - List stateList = agentInfo[agent].stackedVectorObservation; - for (int j = - 0; - j < stateLength * brain.brainParameters.numStackedVectorObservations; - j++) - { - inputState[i, j] = stateList[j]; - } - - i++; - } - } - - // Create the state tensor - if (hasPrevAction) - { - int totalNumberActions = brain.brainParameters.vectorActionSize.Length; - inputPrevAction = new int[currentBatchSize, totalNumberActions]; - var i = 0; - foreach (Agent agent in agentList) - { - float[] actionList = agentInfo[agent].storedVectorActions; - for (var j = 0 ; j < totalNumberActions; j++) - { - inputPrevAction[i,j] = Mathf.FloorToInt(actionList[j]); - } - i++; - } - } - - if (hasMaskedActions) - { - maskedActions = new float[ - currentBatchSize, - brain.brainParameters.vectorActionSize.Sum() - ]; - var i = 0; - foreach (Agent agent in agentList) - { - for (int j = 0; j < brain.brainParameters.vectorActionSize.Sum(); j++) - { - if (agentInfo[agent].actionMasks != null) - { - maskedActions[i, j] = agentInfo[agent].actionMasks[j] ? 0.0f : 1.0f; - } - else - { - maskedActions[i, j] = 1.0f; - } - } - i++; - } - } - - observationMatrixList.Clear(); - for (int observationIndex = - 0; - observationIndex < brain.brainParameters.cameraResolutions.Length; - observationIndex++) - { - texturesHolder.Clear(); - foreach (Agent agent in agentList) - { - texturesHolder.Add(agentInfo[agent].visualObservations[observationIndex]); - } - - observationMatrixList.Add( - BatchVisualObservations(texturesHolder, - brain.brainParameters.cameraResolutions[observationIndex].blackAndWhite)); - } - - // Create the recurrent tensor - if (hasRecurrent) - { - // Need to have variable memory size - inputOldMemories = new float[currentBatchSize, memorySize]; - var i = 0; - foreach (Agent agent in agentList) - { - float[] m = agentInfo[agent].memories.ToArray(); - for (int j = 0; j < m.Length; j++) - { - inputOldMemories[i, j] = m[j]; - } - - i++; - } - } - - - var runner = session.GetRunner(); - try - { - runner.Fetch(graph[graphScope + ActionPlaceholderName][0]); - } - catch - { - throw new UnityAgentsException(string.Format( - @"The node {0} could not be found. Please make sure the graphScope {1} is correct", - graphScope + ActionPlaceholderName, graphScope)); - } - - if (hasBatchSize) - { - runner.AddInput(graph[graphScope + BatchSizePlaceholderName][0], new int[] {currentBatchSize}); - } - - foreach (TensorFlowAgentPlaceholder placeholder in graphPlaceholders) - { - try - { - if (placeholder.valueType == TensorFlowAgentPlaceholder.TensorType.FloatingPoint) - { - runner.AddInput(graph[graphScope + placeholder.name][0], - new float[] {Random.Range(placeholder.minValue, placeholder.maxValue)}); - } - else if (placeholder.valueType == TensorFlowAgentPlaceholder.TensorType.Integer) - { - runner.AddInput(graph[graphScope + placeholder.name][0], - new int[] {Random.Range((int) placeholder.minValue, (int) placeholder.maxValue + 1)}); - } - } - catch - { - throw new UnityAgentsException(string.Format( - @"One of the Tensorflow placeholder cound nout be found. - In brain {0}, there are no {1} placeholder named {2}.", - brain.gameObject.name, placeholder.valueType.ToString(), graphScope + placeholder.name)); - } - } - - // Create the state tensor - if (hasState) - { - runner.AddInput(graph[graphScope + VectorObservationPlacholderName][0], inputState); - } - - // Create the previous action tensor - if (hasPrevAction) - { - runner.AddInput(graph[graphScope + PreviousActionPlaceholderName][0], inputPrevAction); - } - - // Create the mask action tensor - if (hasMaskedActions) - { - runner.AddInput(graph[graphScope + ActionMaskPlaceholderName][0], maskedActions); - } - - // Create the observation tensors - for (int obsNumber = - 0; - obsNumber < brain.brainParameters.cameraResolutions.Length; - obsNumber++) - { - runner.AddInput(graph[graphScope + VisualObservationPlaceholderName[obsNumber]][0], - observationMatrixList[obsNumber]); - } - - if (hasRecurrent) - { - runner.AddInput(graph[graphScope + "sequence_length"][0], 1); - runner.AddInput(graph[graphScope + RecurrentInPlaceholderName][0], inputOldMemories); - runner.Fetch(graph[graphScope + RecurrentOutPlaceholderName][0]); - } - - if (hasValueEstimate) - { - runner.Fetch(graph[graphScope + "value_estimate"][0]); - } - - TFTensor[] networkOutput; - try - { - networkOutput = runner.Run(); - } - catch (TFException e) - { - string errorMessage = e.Message; - try - { - errorMessage = - $@"The tensorflow graph needs an input for {e.Message.Split(new string[] {"Node: "}, 0)[1].Split('=')[0]} of type {e.Message.Split(new string[] {"dtype="}, 0)[1].Split(',')[0]}"; - } - finally - { - throw new UnityAgentsException(errorMessage); - } - } - - // Create the recurrent tensor - if (hasRecurrent) - { - float[,] recurrentTensor = networkOutput[1].GetValue() as float[,]; - - var i = 0; - foreach (Agent agent in agentList) - { - var m = new float[memorySize]; - for (int j = 0; j < memorySize; j++) - { - m[j] = recurrentTensor[i, j]; - } - - agent.UpdateMemoriesAction(m.ToList()); - i++; - } - } - - - if (hasValueEstimate) - { - float[,] value_estimates = new float[currentBatchSize,1]; - if (hasRecurrent) - { - value_estimates = networkOutput[2].GetValue() as float[,]; - } - else - { - value_estimates = networkOutput[1].GetValue() as float[,]; - } - - var i = 0; - foreach (Agent agent in agentList) - { - agent.UpdateValueAction(value_estimates[i,0]); - } - } - - if (brain.brainParameters.vectorActionSpaceType == SpaceType.continuous) - { - var output = networkOutput[0].GetValue() as float[,]; - var i = 0; - foreach (Agent agent in agentList) - { - var a = new float[brain.brainParameters.vectorActionSize[0]]; - for (int j = 0; j < brain.brainParameters.vectorActionSize[0]; j++) - { - a[j] = output[i, j]; - } - - agent.UpdateVectorAction(a); - i++; - } - } - else if (brain.brainParameters.vectorActionSpaceType == SpaceType.discrete) - { - long[,] output = networkOutput[0].GetValue() as long[,]; - var i = 0; - foreach (Agent agent in agentList) - { - var actSize = brain.brainParameters.vectorActionSize.Length; - var a = new float[actSize]; - for (int actIdx = 0; actIdx < actSize; actIdx++) - { - a[actIdx] = output[i, actIdx]; - } - agent.UpdateVectorAction(a); - i++; - } - } - - -#else - if (agentInfo.Count > 0) - { - throw new UnityAgentsException(string.Format( - @"The brain {0} was set to Internal but the Tensorflow - library is not present in the Unity project.", - brain.gameObject.name)); - } -#endif - } - - /// Displays the parameters of the CoreBrainInternal in the Inspector - public void OnInspector() - { -#if ENABLE_TENSORFLOW && UNITY_EDITOR - EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); - broadcast = EditorGUILayout.Toggle(new GUIContent("Broadcast", - "If checked, the brain will broadcast states and actions to Python."), broadcast); - - var serializedBrain = new SerializedObject(this); - GUILayout.Label("Edit the Tensorflow graph parameters here"); - var tfGraphModel = serializedBrain.FindProperty("graphModel"); - serializedBrain.Update(); - EditorGUILayout.ObjectField(tfGraphModel); - serializedBrain.ApplyModifiedProperties(); - - if (graphModel == null) - { - EditorGUILayout.HelpBox("Please provide a tensorflow graph as a bytes file.", MessageType.Error); - } - - - graphScope = - EditorGUILayout.TextField(new GUIContent("Graph Scope", - "If you set a scope while training your tensorflow model, " + - "all your placeholder name will have a prefix. You must specify that prefix here."), graphScope); - - if (BatchSizePlaceholderName == "") - { - BatchSizePlaceholderName = "batch_size"; - } - - BatchSizePlaceholderName = - EditorGUILayout.TextField(new GUIContent("Batch Size Node Name", "If the batch size is one of " + - "the inputs of your graph, you must specify the name if the placeholder here."), - BatchSizePlaceholderName); - if (VectorObservationPlacholderName == "") - { - VectorObservationPlacholderName = "state"; - } - - VectorObservationPlacholderName = - EditorGUILayout.TextField(new GUIContent("Vector Observation Node Name", - "If your graph uses the state as an input, " + - "you must specify the name if the placeholder here."), VectorObservationPlacholderName); - if (RecurrentInPlaceholderName == "") - { - RecurrentInPlaceholderName = "recurrent_in"; - } - - RecurrentInPlaceholderName = - EditorGUILayout.TextField(new GUIContent("Recurrent Input Node Name", "If your graph uses a " + - "recurrent input / memory as input and outputs new recurrent input / memory, " + - "you must specify the name if the input placeholder here."), - RecurrentInPlaceholderName); - if (RecurrentOutPlaceholderName == "") - { - RecurrentOutPlaceholderName = "recurrent_out"; - } - - RecurrentOutPlaceholderName = - EditorGUILayout.TextField(new GUIContent("Recurrent Output Node Name", " If your graph uses a " + - "recurrent input / memory as input and outputs new recurrent input / memory, you must specify the name if " + - "the output placeholder here."), - RecurrentOutPlaceholderName); - - if (brain.brainParameters.cameraResolutions != null) - { - if (brain.brainParameters.cameraResolutions.Count() > 0) - { - if (VisualObservationPlaceholderName == null) - { - VisualObservationPlaceholderName = - new string[brain.brainParameters.cameraResolutions.Count()]; - } - - if (VisualObservationPlaceholderName.Count() != brain.brainParameters.cameraResolutions.Count()) - { - VisualObservationPlaceholderName = - new string[brain.brainParameters.cameraResolutions.Count()]; - } - - for (int obs_number = - 0; - obs_number < brain.brainParameters.cameraResolutions.Count(); - obs_number++) - { - if ((VisualObservationPlaceholderName[obs_number] == "") || - (VisualObservationPlaceholderName[obs_number] == null)) - { - VisualObservationPlaceholderName[obs_number] = - "visual_observation_" + obs_number; - } - } - - var opn = serializedBrain.FindProperty("VisualObservationPlaceholderName"); - serializedBrain.Update(); - EditorGUILayout.PropertyField(opn, true); - serializedBrain.ApplyModifiedProperties(); - } - } - - if (ActionPlaceholderName == "") - { - ActionPlaceholderName = "action"; - } - - ActionPlaceholderName = - EditorGUILayout.TextField(new GUIContent("Action Node Name", "Specify the name of the " + - "placeholder corresponding to the actions of the brain in your graph. If the action space type is " + - "continuous, the output must be a one dimensional tensor of float of length Action Space Size, " + - "if the action space type is discrete, the output must be a one dimensional tensor of int " + - "of length 1."), ActionPlaceholderName); - - - var tfPlaceholders = serializedBrain.FindProperty("graphPlaceholders"); - serializedBrain.Update(); - EditorGUILayout.PropertyField(tfPlaceholders, true); - serializedBrain.ApplyModifiedProperties(); -#endif -#if !ENABLE_TENSORFLOW && UNITY_EDITOR - EditorGUILayout.HelpBox( - "You need to install and enable the TensorflowSharp plugin in " + - "order to use the internal brain.", MessageType.Error); - if (GUILayout.Button("Show me how")) - { - Application.OpenURL( - "https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Getting-Started-with-" + - "Balance-Ball.md#embedding-the-trained-brain-into-the-unity-environment-experimental"); - } -#endif - } - - /// - /// Converts a list of Texture2D into a Tensor. - /// - /// - /// A 4 dimensional float Tensor of dimension - /// [batch_size, height, width, channel]. - /// Where batch_size is the number of input textures, - /// height corresponds to the height of the texture, - /// width corresponds to the width of the texture, - /// channel corresponds to the number of channels extracted from the - /// input textures (based on the input blackAndWhite flag - /// (3 if the flag is false, 1 otherwise). - /// The values of the Tensor are between 0 and 1. - /// - /// - /// The list of textures to be put into the tensor. - /// Note that the textures must have same width and height. - /// - /// - /// If set to true the textures - /// will be converted to grayscale before being stored in the tensor. - /// - public static float[,,,] BatchVisualObservations( - List textures, bool blackAndWhite) - { - int batchSize = textures.Count(); - int width = textures[0].width; - int height = textures[0].height; - int pixels = 0; - if (blackAndWhite) - pixels = 1; - else - pixels = 3; - float[,,,] result = new float[batchSize, height, width, pixels]; - float[] resultTemp = new float[batchSize * height * width * pixels]; - int hwp = height * width * pixels; - int wp = width * pixels; - - for (int b = 0; b < batchSize; b++) - { - Color32[] cc = textures[b].GetPixels32(); - for (int h = height - 1; h >= 0; h--) - { - for (int w = 0; w < width; w++) - { - Color32 currentPixel = cc[(height - h - 1) * width + w]; - if (!blackAndWhite) - { - // For Color32, the r, g and b values are between - // 0 and 255. - resultTemp[b * hwp + h * wp + w * pixels] = currentPixel.r / 255.0f; - resultTemp[b * hwp + h * wp + w * pixels + 1] = currentPixel.g / 255.0f; - resultTemp[b * hwp + h * wp + w * pixels + 2] = currentPixel.b / 255.0f; - } - else - { - resultTemp[b * hwp + h * wp + w * pixels] = - (currentPixel.r + currentPixel.g + currentPixel.b) - / 3f / 255.0f; - } - } - } - } - - System.Buffer.BlockCopy(resultTemp, 0, result, 0, batchSize * hwp * sizeof(float)); - return result; - } - } -} \ No newline at end of file diff --git a/UnitySDK/ProjectSettings/ProjectVersion.txt b/UnitySDK/ProjectSettings/ProjectVersion.txt deleted file mode 100755 index e05840244b..0000000000 --- a/UnitySDK/ProjectSettings/ProjectVersion.txt +++ /dev/null @@ -1 +0,0 @@ -m_EditorVersion: 2017.4.10f1 diff --git a/UnitySDK/README.md b/UnitySDK/README.md deleted file mode 100644 index 731d5b9f1a..0000000000 --- a/UnitySDK/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Unity ML-Agents SDK - -Contains the ML-Agents Unity Project, including -both the core plugin (in `Scripts`), as well as a set -of example environments (in `Examples`). \ No newline at end of file diff --git a/config/curricula/wall-jump/SmallWallBrain.json b/config/curricula/wall-jump/SmallWallBrain.json deleted file mode 100644 index bc9b556899..0000000000 --- a/config/curricula/wall-jump/SmallWallBrain.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "measure" : "progress", - "thresholds" : [0.1, 0.3, 0.5], - "min_lesson_length": 100, - "signal_smoothing" : true, - "parameters" : - { - "small_wall_height" : [1.5, 2.0, 2.5, 4.0] - } -} diff --git a/docs/API-Reference.md b/docs/API-Reference.md index 49cb5a4c0a..52f46900f7 100644 --- a/docs/API-Reference.md +++ b/docs/API-Reference.md @@ -1,23 +1,22 @@ # API Reference -Our developer-facing C# classes (Academy, Agent, Decision and Monitor) have been -documented to be compatible with -[Doxygen](http://www.stack.nl/~dimitri/doxygen/) for auto-generating HTML +Our developer-facing C# classes (Academy, Agent, Decision and +Monitor) have been documented to be compatabile with +[Doxygen](http://www.stack.nl/~dimitri/doxygen/) for auto-generating HTML documentation. -To generate the API reference, -[download Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html) -and run the following command within the `docs/` directory: +To generate the API reference, +[download Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html) and run +the following command within the `docs/` directory: -```sh -doxygen dox-ml-agents.conf -``` + doxygen dox-ml-agents.conf `dox-ml-agents.conf` is a Doxygen configuration file for the ML-Agents toolkit -that includes the classes that have been properly formatted. The generated HTML -files will be placed in the `html/` subdirectory. Open `index.html` within that -subdirectory to navigate to the API reference home. Note that `html/` is already -included in the repository's `.gitignore` file. +that includes the classes that have been properly formatted. +The generated HTML files will be placed +in the `html/` subdirectory. Open `index.html` within that subdirectory to +navigate to the API reference home. Note that `html/` is already included in +the repository's `.gitignore` file. -In the near future, we aim to expand our documentation to include all the Unity -C# classes and Python API. +In the near future, we aim to expand our documentation +to include all the Unity C# classes and Python API. diff --git a/docs/Background-Jupyter.md b/docs/Background-Jupyter.md index 22de490873..fd6ccb1468 100644 --- a/docs/Background-Jupyter.md +++ b/docs/Background-Jupyter.md @@ -1,19 +1,16 @@ # Background: Jupyter -[Jupyter](https://jupyter.org) is a fantastic tool for writing code with -embedded visualizations. We provide one such notebook, -`notebooks/getting-started.ipynb`, for testing the Python control interface to a -Unity build. This notebook is introduced in the +[Jupyter](https://jupyter.org) is a fantastic tool for writing code with +embedded visualizations. We provide one such notebook, `python/Basics.ipynb`, +for testing the Python control interface to a Unity build. This notebook is +introduced in the [Getting Started with the 3D Balance Ball Environment](Getting-Started-with-Balance-Ball.md) tutorial, but can be used for testing the connection to any Unity build. For a walkthrough of how to use Jupyter, see [Running the Jupyter Notebook](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html) -in the _Jupyter/IPython Quick Start Guide_. To launch Jupyter, run in the -command line: +in the _Jupyter/IPython Quick Start Guide_. To launch Jupyter, run in the command line: -```sh -jupyter notebook -``` +`jupyter notebook` Then navigate to `localhost:8888` to access your notebooks. diff --git a/docs/Background-Machine-Learning.md b/docs/Background-Machine-Learning.md index 7976158b48..672691b2ec 100644 --- a/docs/Background-Machine-Learning.md +++ b/docs/Background-Machine-Learning.md @@ -1,197 +1,200 @@ # Background: Machine Learning -Given that a number of users of the ML-Agents toolkit might not have a formal -machine learning background, this page provides an overview to facilitate the -understanding of the ML-Agents toolkit. However, We will not attempt to provide -a thorough treatment of machine learning as there are fantastic resources -online. +Given that a number of users of the ML-Agents toolkit might not have a formal machine +learning background, this page provides an overview to facilitate the +understanding of the ML-Agents toolkit. However, We will not attempt to provide a thorough +treatment of machine learning as there are fantastic resources online. -Machine learning, a branch of artificial intelligence, focuses on learning +Machine learning, a branch of artificial intelligence, focuses on learning patterns from data. The three main classes of machine learning algorithms -include: unsupervised learning, supervised learning and reinforcement learning. -Each class of algorithm learns from a different type of data. The following -paragraphs provide an overview for each of these classes of machine learning, as -well as introductory examples. +include: unsupervised learning, supervised learning and reinforcement learning. +Each class of algorithm learns from a different type of data. The following +paragraphs provide an overview for each of these classes of machine learning, +as well as introductory examples. ## Unsupervised Learning -The goal of [unsupervised -learning](https://en.wikipedia.org/wiki/Unsupervised_learning) is to group or -cluster similar items in a data set. For example, consider the players of a -game. We may want to group the players depending on how engaged they are with -the game. This would enable us to target different groups (e.g. for -highly-engaged players we might invite them to be beta testers for new features, -while for unengaged players we might email them helpful tutorials). Say that we -wish to split our players into two groups. We would first define basic -attributes of the players, such as the number of hours played, total money spent -on in-app purchases and number of levels completed. We can then feed this data -set (three attributes for every player) to an unsupervised learning algorithm -where we specify the number of groups to be two. The algorithm would then split -the data set of players into two groups where the players within each group -would be similar to each other. Given the attributes we used to describe each -player, in this case, the output would be a split of all the players into two -groups, where one group would semantically represent the engaged players and the -second group would semantically represent the unengaged players. +The goal of +[unsupervised learning](https://en.wikipedia.org/wiki/Unsupervised_learning) is to group or cluster similar items in a +data set. For example, consider the players of a game. We may want to group +the players depending on how engaged they are with the game. This would enable +us to target different groups (e.g. for highly-engaged players we might +invite them to be beta testers for new features, while for unengaged players +we might email them helpful tutorials). Say that we wish to split our players +into two groups. We would first define basic attributes of the players, such +as the number of hours played, total money spent on in-app purchases and +number of levels completed. We can then feed this data set (three attributes +for every player) to an unsupervised learning algorithm where we specify the +number of groups to be two. The algorithm would then split the data set of +players into two groups where the players within each group would be similar +to each other. Given the attributes we used to describe each player, in this +case, the output would be a split of all the players into two groups, where +one group would semantically represent the engaged players and the second +group would semantically represent the unengaged players. With unsupervised learning, we did not provide specific examples of which players are considered engaged and which are considered unengaged. We just -defined the appropriate attributes and relied on the algorithm to uncover the -two groups on its own. This type of data set is typically called an unlabeled -data set as it is lacking these direct labels. Consequently, unsupervised -learning can be helpful in situations where these labels can be expensive or -hard to produce. In the next paragraph, we overview supervised learning -algorithms which accept input labels in addition to attributes. +defined the appropriate attributes and relied on the algorithm to uncover +the two groups on its own. This type of data set is typically called an +unlabeled data set as it is lacking these direct labels. Consequently, +unsupervised learning can be helpful in situations where these labels can be +expensive or hard to produce. In the next paragraph, we overview supervised +learning algorithms which accept input labels in addition to attributes. ## Supervised Learning -In [supervised learning](https://en.wikipedia.org/wiki/Supervised_learning), we -do not want to just group similar items but directly learn a mapping from each -item to the group (or class) that it belongs to. Returning to our earlier -example of clustering players, let's say we now wish to predict which of our -players are about to churn (that is stop playing the game for the next 30 days). -We can look into our historical records and create a data set that contains -attributes of our players in addition to a label indicating whether they have -churned or not. Note that the player attributes we use for this churn prediction -task may be different from the ones we used for our earlier clustering task. We -can then feed this data set (attributes **and** label for each player) into a -supervised learning algorithm which would learn a mapping from the player -attributes to a label indicating whether that player will churn or not. The -intuition is that the supervised learning algorithm will learn which values of -these attributes typically correspond to players who have churned and not -churned (for example, it may learn that players who spend very little and play -for very short periods will most likely churn). Now given this learned model, we -can provide it the attributes of a new player (one that recently started playing -the game) and it would output a _predicted_ label for that player. This -prediction is the algorithms expectation of whether the player will churn or -not. We can now use these predictions to target the players who are expected to -churn and entice them to continue playing the game. +In [supervised learning](https://en.wikipedia.org/wiki/Supervised_learning), +we do not want to just group similar items but directly +learn a mapping from each item to the group (or class) that it belongs to. +Returning to our earlier example of +clustering players, let's say we now wish to predict which of our players are +about to churn (that is stop playing the game for the next 30 days). We +can look into our historical records and create a data set that +contains attributes of our players in addition to a label indicating whether +they have churned or not. Note that the player attributes we use for this +churn prediction task may be different from the ones we used for our earlier +clustering task. We can then feed this data set (attributes **and** label for +each player) into a supervised learning algorithm which would learn a mapping +from the player attributes to a label indicating whether that player +will churn or not. The intuition is that the supervised learning algorithm +will learn which values of these attributes typically correspond to players +who have churned and not churned (for example, it may learn that players +who spend very little and play for very short periods will most likely churn). +Now given this learned model, we can provide it the attributes of a +new player (one that recently started playing the game) and it would output +a _predicted_ label for that player. This prediction is the algorithms +expectation of whether the player will churn or not. +We can now use these predictions to target the players +who are expected to churn and entice them to continue playing the game. As you may have noticed, for both supervised and unsupervised learning, there are two tasks that need to be performed: attribute selection and model selection. Attribute selection (also called feature selection) pertains to selecting how we wish to represent the entity of interest, in this case, the -player. Model selection, on the other hand, pertains to selecting the algorithm -(and its parameters) that perform the task well. Both of these tasks are active -areas of machine learning research and, in practice, require several iterations -to achieve good performance. +player. Model selection, on the other hand, pertains to selecting the +algorithm (and its parameters) that perform the task well. Both of these +tasks are active areas of machine learning research and, in practice, require +several iterations to achieve good performance. -We now switch to reinforcement learning, the third class of machine learning -algorithms, and arguably the one most relevant for the ML-Agents toolkit. +We now switch to reinforcement learning, the third class of +machine learning algorithms, and arguably the one most relevant for the ML-Agents toolkit. ## Reinforcement Learning [Reinforcement learning](https://en.wikipedia.org/wiki/Reinforcement_learning) -can be viewed as a form of learning for sequential decision making that is -commonly associated with controlling robots (but is, in fact, much more -general). Consider an autonomous firefighting robot that is tasked with -navigating into an area, finding the fire and neutralizing it. At any given -moment, the robot perceives the environment through its sensors (e.g. camera, -heat, touch), processes this information and produces an action (e.g. move to -the left, rotate the water hose, turn on the water). In other words, it is -continuously making decisions about how to interact in this environment given -its view of the world (i.e. sensors input) and objective (i.e. neutralizing the -fire). Teaching a robot to be a successful firefighting machine is precisely -what reinforcement learning is designed to do. - -More specifically, the goal of reinforcement learning is to learn a **policy**, -which is essentially a mapping from **observations** to **actions**. An -observation is what the robot can measure from its **environment** (in this +can be viewed as a form of learning for sequential +decision making that is commonly associated with controlling robots (but is, +in fact, much more general). Consider an autonomous firefighting robot that is +tasked with navigating into an area, finding the fire and neutralizing it. At +any given moment, the robot perceives the environment through its sensors (e.g. +camera, heat, touch), processes this information and produces an action (e.g. +move to the left, rotate the water hose, turn on the water). In other words, +it is continuously making decisions about how to interact in this environment +given its view of the world (i.e. sensors input) and objective (i.e. +neutralizing the fire). Teaching a robot to be a successful firefighting +machine is precisely what reinforcement learning is designed to do. + +More specifically, the goal of reinforcement learning is to learn a **policy**, +which is essentially a mapping from **observations** to **actions**. An +observation is what the robot can measure from its **environment** (in this case, all its sensory inputs) and an action, in its most raw form, is a change -to the configuration of the robot (e.g. position of its base, position of its -water hose and whether the hose is on or off). - -The last remaining piece of the reinforcement learning task is the **reward -signal**. When training a robot to be a mean firefighting machine, we provide it -with rewards (positive and negative) indicating how well it is doing on -completing the task. Note that the robot does not _know_ how to put out fires -before it is trained. It learns the objective because it receives a large -positive reward when it puts out the fire and a small negative reward for every -passing second. The fact that rewards are sparse (i.e. may not be provided at -every step, but only when a robot arrives at a success or failure situation), is -a defining characteristic of reinforcement learning and precisely why learning -good policies can be difficult (and/or time-consuming) for complex environments. +to the configuration of the robot (e.g. position of its base, position of +its water hose and whether the hose is on or off). + +The last remaining piece +of the reinforcement learning task is the **reward signal**. When training a +robot to be a mean firefighting machine, we provide it with rewards (positive +and negative) indicating how well it is doing on completing the task. +Note that the robot does not _know_ how to put out fires before it is trained. +It learns the objective because it receives a large positive reward when it puts +out the fire and a small negative reward for every passing second. The fact that +rewards are sparse (i.e. may not be provided at every step, but only when a +robot arrives at a success or failure situation), is a defining characteristic of +reinforcement learning and precisely why learning good policies can be difficult +(and/or time-consuming) for complex environments.

The reinforcement learning cycle.

[Learning a policy](https://blogs.unity3d.com/2017/08/22/unity-ai-reinforcement-learning-with-q-learning/) -usually requires many trials and iterative policy updates. More specifically, -the robot is placed in several fire situations and over time learns an optimal -policy which allows it to put our fires more effectively. Obviously, we cannot -expect to train a robot repeatedly in the real world, particularly when fires -are involved. This is precisely why the use of +usually requires many trials and iterative +policy updates. More specifically, the robot is placed in several +fire situations and over time learns an optimal policy which allows it +to put our fires more effectively. Obviously, we cannot expect to train a +robot repeatedly in the real world, particularly when fires are involved. This +is precisely why the use of [Unity as a simulator](https://blogs.unity3d.com/2018/01/23/designing-safer-cities-through-simulations/) -serves as the perfect training grounds for learning such behaviors. While our -discussion of reinforcement learning has centered around robots, there are -strong parallels between robots and characters in a game. In fact, in many ways, -one can view a non-playable character (NPC) as a virtual robot, with its own -observations about the environment, its own set of actions and a specific -objective. Thus it is natural to explore how we can train behaviors within Unity -using reinforcement learning. This is precisely what the ML-Agents toolkit -offers. The video linked below includes a reinforcement learning demo showcasing -training character behaviors using the ML-Agents toolkit. +serves as the perfect training grounds for learning such behaviors. +While our discussion of reinforcement learning has centered around robots, +there are strong parallels between robots and characters in a game. In fact, +in many ways, one can view a non-playable character (NPC) as a virtual +robot, with its own observations about the environment, its own set of actions +and a specific objective. Thus it is natural to explore how we can +train behaviors within Unity using reinforcement learning. This is precisely +what the ML-Agents toolkit offers. The video linked below includes a reinforcement +learning demo showcasing training character behaviors using the ML-Agents toolkit.

- - RL Demo - + + RL Demo +

Similar to both unsupervised and supervised learning, reinforcement learning -also involves two tasks: attribute selection and model selection. Attribute -selection is defining the set of observations for the robot that best help it -complete its objective, while model selection is defining the form of the policy -(mapping from observations to actions) and its parameters. In practice, training -behaviors is an iterative process that may require changing the attribute and -model choices. +also involves two tasks: attribute selection and model selection. +Attribute selection is defining the set of observations for the robot +that best help it complete its objective, while model selection is defining +the form of the policy (mapping from observations to actions) and its +parameters. In practice, training behaviors is an iterative process that may +require changing the attribute and model choices. ## Training and Inference -One common aspect of all three branches of machine learning is that they all -involve a **training phase** and an **inference phase**. While the details of -the training and inference phases are different for each of the three, at a -high-level, the training phase involves building a model using the provided -data, while the inference phase involves applying this model to new, previously -unseen, data. More specifically: - -* For our unsupervised learning example, the training phase learns the optimal - two clusters based on the data describing existing players, while the - inference phase assigns a new player to one of these two clusters. -* For our supervised learning example, the training phase learns the mapping - from player attributes to player label (whether they churned or not), and the - inference phase predicts whether a new player will churn or not based on that - learned mapping. -* For our reinforcement learning example, the training phase learns the optimal - policy through guided trials, and in the inference phase, the agent observes - and tales actions in the wild using its learned policy. - -To briefly summarize: all three classes of algorithms involve training and -inference phases in addition to attribute and model selections. What ultimately -separates them is the type of data available to learn from. In unsupervised -learning our data set was a collection of attributes, in supervised learning our -data set was a collection of attribute-label pairs, and, lastly, in -reinforcement learning our data set was a collection of +One common aspect of all three branches of machine learning is that they +all involve a **training phase** and an **inference phase**. While the +details of the training and inference phases are different for each of the +three, at a high-level, the training phase involves building a model +using the provided data, while the inference phase involves applying this +model to new, previously unseen, data. More specifically: +* For our unsupervised learning +example, the training phase learns the optimal two clusters based +on the data describing existing players, while the inference phase assigns a +new player to one of these two clusters. +* For our supervised learning example, the +training phase learns the mapping from player attributes to player label +(whether they churned or not), and the inference phase predicts whether +a new player will churn or not based on that learned mapping. +* For our reinforcement learning example, the training phase learns the +optimal policy through guided trials, and in the inference phase, the agent +observes and tales actions in the wild using its learned policy. + +To briefly summarize: all three classes of algorithms involve training +and inference phases in addition to attribute and model selections. What +ultimately separates them is the type of data available to learn from. In +unsupervised learning our data set was a collection of attributes, in +supervised learning our data set was a collection of attribute-label pairs, +and, lastly, in reinforcement learning our data set was a collection of observation-action-reward tuples. ## Deep Learning -[Deep learning](https://en.wikipedia.org/wiki/Deep_learning) is a family of -algorithms that can be used to address any of the problems introduced above. -More specifically, they can be used to solve both attribute and model selection -tasks. Deep learning has gained popularity in recent years due to its -outstanding performance on several challenging machine learning tasks. One -example is [AlphaGo](https://en.wikipedia.org/wiki/AlphaGo), a [computer -Go](https://en.wikipedia.org/wiki/Computer_Go) program, that leverages deep -learning, that was able to beat Lee Sedol (a Go world champion). +[Deep learning](https://en.wikipedia.org/wiki/Deep_learning) is a family of +algorithms that can be used to address any of the problems introduced +above. More specifically, they can be used to solve both attribute and +model selection tasks. Deep learning has gained popularity in recent +years due to its outstanding performance on several challenging machine learning +tasks. One example is [AlphaGo](https://en.wikipedia.org/wiki/AlphaGo), +a [computer Go](https://en.wikipedia.org/wiki/Computer_Go) program, that +leverages deep learning, that was able to beat Lee Sedol (a Go world champion). A key characteristic of deep learning algorithms is their ability learn very -complex functions from large amounts of training data. This makes them a natural -choice for reinforcement learning tasks when a large amount of data can be -generated, say through the use of a simulator or engine such as Unity. By -generating hundreds of thousands of simulations of the environment within Unity, -we can learn policies for very complex environments (a complex environment is -one where the number of observations an agent perceives and the number of -actions they can take are large). Many of the algorithms we provide in ML-Agents -use some form of deep learning, built on top of the open-source library, -[TensorFlow](Background-TensorFlow.md). +complex functions from large amounts of training data. This makes them a +natural choice for reinforcement learning tasks when a large amount of data +can be generated, say through the use of a simulator or engine such as Unity. +By generating hundreds of thousands of simulations of +the environment within Unity, we can learn policies for very complex environments +(a complex environment is one where the number of observations an agent perceives +and the number of actions they can take are large). +Many of the algorithms we provide in ML-Agents use some form of deep learning, +built on top of the open-source library, [TensorFlow](Background-TensorFlow.md). diff --git a/docs/Background-TensorFlow.md b/docs/Background-TensorFlow.md index ce34d0143d..0e7526c3be 100644 --- a/docs/Background-TensorFlow.md +++ b/docs/Background-TensorFlow.md @@ -1,53 +1,51 @@ # Background: TensorFlow -As discussed in our -[machine learning background page](Background-Machine-Learning.md), -many of the algorithms we provide in the -ML-Agents toolkit leverage some form of deep learning. More specifically, our -implementations are built on top of the open-source library -[TensorFlow](https://www.tensorflow.org/). This means that the models produced -by the ML-Agents toolkit are (currently) in a format only understood by +As discussed in our +[machine learning background page](Background-Machine-Learning.md), many of the +algorithms we provide in the ML-Agents toolkit leverage some form of deep learning. +More specifically, our implementations are built on top of the open-source +library [TensorFlow](https://www.tensorflow.org/). This means that the models +produced by the ML-Agents toolkit are (currently) in a format only understood by TensorFlow. In this page we provide a brief overview of TensorFlow, in addition to TensorFlow-related tools that we leverage within the ML-Agents toolkit. ## TensorFlow [TensorFlow](https://www.tensorflow.org/) is an open source library for -performing computations using data flow graphs, the underlying representation of -deep learning models. It facilitates training and inference on CPUs and GPUs in -a desktop, server, or mobile device. Within the ML-Agents toolkit, when you -train the behavior of an agent, the output is a TensorFlow model (.bytes) file -that you can then embed within an Internal Brain. Unless you implement a new -algorithm, the use of TensorFlow is mostly abstracted away and behind the -scenes. +performing computations using data flow graphs, the underlying representation +of deep learning models. It facilitates training and inference on CPUs and +GPUs in a desktop, server, or mobile device. Within the ML-Agents toolkit, when you +train the behavior of an Agent, the output is a TensorFlow model (.bytes) +file that you can then embed within an Internal Brain. Unless you implement +a new algorithm, the use of TensorFlow is mostly abstracted away and behind +the scenes. ## TensorBoard -One component of training models with TensorFlow is setting the values of -certain model attributes (called _hyperparameters_). Finding the right values of -these hyperparameters can require a few iterations. Consequently, we leverage a -visualization tool within TensorFlow called -[TensorBoard](https://www.tensorflow.org/programmers_guide/summaries_and_tensorboard). -It allows the visualization of certain agent attributes (e.g. reward) throughout -training which can be helpful in both building intuitions for the different -hyperparameters and setting the optimal values for your Unity environment. We -provide more details on setting the hyperparameters in later parts of the -documentation, but, in the meantime, if you are unfamiliar with TensorBoard we -recommend this +One component of training models with TensorFlow is setting the +values of certain model attributes (called _hyperparameters_). Finding the +right values of these hyperparameters can require a few iterations. +Consequently, we leverage a visualization tool within TensorFlow called +[TensorBoard](https://www.tensorflow.org/programmers_guide/summaries_and_tensorboard). +It allows the visualization of certain agent attributes (e.g. reward) +throughout training which can be helpful in both building +intuitions for the different hyperparameters and setting the optimal values for +your Unity environment. We provide more details on setting the hyperparameters +in later parts of the documentation, but, in the meantime, if you are +unfamiliar with TensorBoard we recommend this [tutorial](https://github.com/dandelionmane/tf-dev-summit-tensorboard-tutorial). ## TensorFlowSharp -One of the drawbacks of TensorFlow is that it does not provide a native C# API. -This means that the Internal Brain is not natively supported since Unity scripts -are written in C#. Consequently, to enable the Internal Brain, we leverage a -third-party library -[TensorFlowSharp](https://github.com/migueldeicaza/TensorFlowSharp) which -provides .NET bindings to TensorFlow. Thus, when a Unity environment that -contains an Internal Brain is built, inference is performed via TensorFlowSharp. -We provide an additional in-depth overview of how to leverage -[TensorFlowSharp within Unity](Using-TensorFlow-Sharp-in-Unity.md) -which will become more -relevant once you install and start training behaviors within the ML-Agents -toolkit. Given the reliance on TensorFlowSharp, the Internal Brain is currently -marked as experimental. +One of the drawbacks of TensorFlow is that it does not provide a native +C# API. This means that the Internal Brain is not natively supported since +Unity scripts are written in C#. Consequently, +to enable the Internal Brain, we leverage a third-party +library [TensorFlowSharp](https://github.com/migueldeicaza/TensorFlowSharp) +which provides .NET bindings to TensorFlow. Thus, when a Unity environment +that contains an Internal Brain is built, inference is performed via +TensorFlowSharp. We provide an additional in-depth overview of how to +leverage [TensorFlowSharp within Unity](Using-TensorFlow-Sharp-in-Unity.md) +which will become more relevant once you install and start training +behaviors within the ML-Agents toolkit. Given the reliance on TensorFlowSharp, the +Internal Brain is currently marked as experimental. diff --git a/docs/Background-Unity.md b/docs/Background-Unity.md index 5a452fbb1d..d9a2b37f5b 100644 --- a/docs/Background-Unity.md +++ b/docs/Background-Unity.md @@ -1,12 +1,12 @@ # Background: Unity -If you are not familiar with the [Unity Engine](https://unity3d.com/unity), we -highly recommend the [Unity Manual](https://docs.unity3d.com/Manual/index.html) -and [Tutorials page](https://unity3d.com/learn/tutorials). The +If you are not familiar with the [Unity Engine](https://unity3d.com/unity), +we highly recommend the +[Unity Manual](https://docs.unity3d.com/Manual/index.html) and +[Tutorials page](https://unity3d.com/learn/tutorials). The [Roll-a-ball tutorial](https://unity3d.com/learn/tutorials/s/roll-ball-tutorial) is a fantastic resource to learn all the basic concepts of Unity to get started -with the ML-Agents toolkit: - +with the ML-Agents toolkit: * [Editor](https://docs.unity3d.com/Manual/UsingTheEditor.html) * [Interface](https://docs.unity3d.com/Manual/LearningtheInterface.html) * [Scene](https://docs.unity3d.com/Manual/CreatingScenes.html) @@ -16,4 +16,4 @@ with the ML-Agents toolkit: * [Scripting](https://docs.unity3d.com/Manual/ScriptingSection.html) * [Physics](https://docs.unity3d.com/Manual/PhysicsSection.html) * [Ordering of event functions](https://docs.unity3d.com/Manual/ExecutionOrder.html) - (e.g. FixedUpdate, Update) +(e.g. FixedUpdate, Update) diff --git a/docs/Basic-Guide.md b/docs/Basic-Guide.md index b620fd14a0..c50bd4e8da 100644 --- a/docs/Basic-Guide.md +++ b/docs/Basic-Guide.md @@ -1,245 +1,105 @@ # Basic Guide -This guide will show you how to use a pre-trained model in an example Unity -environment, and show you how to train the model yourself. +This guide will show you how to use a pretrained model in an example Unity environment, and show you how to train the model yourself. -If you are not familiar with the [Unity Engine](https://unity3d.com/unity), we -highly recommend the [Roll-a-ball -tutorial](https://unity3d.com/learn/tutorials/s/roll-ball-tutorial) to learn all -the basic concepts of Unity. +If you are not familiar with the [Unity Engine](https://unity3d.com/unity), +we highly recommend the [Roll-a-ball tutorial](https://unity3d.com/learn/tutorials/s/roll-ball-tutorial) to learn all the basic concepts of Unity. ## Setting up the ML-Agents Toolkit within Unity -In order to use the ML-Agents toolkit within Unity, you need to change some -Unity settings first. Also [TensorFlowSharp -plugin](https://s3.amazonaws.com/unity-ml-agents/0.5/TFSharpPlugin.unitypackage) -is needed for you to use pre-trained model within Unity, which is based on the -[TensorFlowSharp repo](https://github.com/migueldeicaza/TensorFlowSharp). +In order to use the ML-Agents toolkit within Unity, you need to change some Unity settings first. Also [TensorFlowSharp plugin](https://s3.amazonaws.com/unity-ml-agents/0.4/TFSharpPlugin.unitypackage) is needed for you to use pretrained model within Unity, which is based on the [TensorFlowSharp repo](https://github.com/migueldeicaza/TensorFlowSharp). 1. Launch Unity 2. On the Projects dialog, choose the **Open** option at the top of the window. -3. Using the file dialog that opens, locate the `UnitySDK` folder - within the the ML-Agents toolkit project and click **Open**. +3. Using the file dialog that opens, locate the `unity-environment` folder within the the ML-Agents toolkit project and click **Open**. 4. Go to **Edit** > **Project Settings** > **Player** -5. For **each** of the platforms you target (**PC, Mac and Linux Standalone**, - **iOS** or **Android**): +5. For **each** of the platforms you target +(**PC, Mac and Linux Standalone**, **iOS** or **Android**): 1. Option the **Other Settings** section. - 2. Select **Scripting Runtime Version** to **Experimental (.NET 4.6 - Equivalent or .NET 4.x Equivalent)** - 3. In **Scripting Defined Symbols**, add the flag `ENABLE_TENSORFLOW`. After - typing in the flag name, press Enter. + 2. Select **Scripting Runtime Version** to + **Experimental (.NET 4.6 Equivalent or .NET 4.x Equivalent)** + 3. In **Scripting Defined Symbols**, add the flag `ENABLE_TENSORFLOW`. + After typing in the flag name, press Enter. 6. Go to **File** > **Save Project** ![Project Settings](images/project-settings.png) -[Download](https://s3.amazonaws.com/unity-ml-agents/0.5/TFSharpPlugin.unitypackage) -the TensorFlowSharp plugin. Then import it into Unity by double clicking the -downloaded file. You can check if it was successfully imported by checking the -TensorFlow files in the Project window under **Assets** > **ML-Agents** > -**Plugins** > **Computer**. +[Download](https://s3.amazonaws.com/unity-ml-agents/0.4/TFSharpPlugin.unitypackage) the TensorFlowSharp plugin. Then import it into Unity by double clicking the downloaded file. You can check if it was successfully imported by checking the TensorFlow files in the Project window under **Assets** > **ML-Agents** > **Plugins** > **Computer**. -**Note**: If you don't see anything under **Assets**, drag the -`UnitySDK/Assets/ML-Agents` folder under **Assets** within Project window. +**Note**: If you don't see anything under **Assets**, drag the `ml-agents/unity-environment/Assets/ML-Agents` folder under **Assets** within Project window. ![Imported TensorFlowsharp](images/imported-tensorflowsharp.png) ## Running a Pre-trained Model -1. In the **Project** window, go to `Assets/ML-Agents/Examples/3DBall` folder - and open the `3DBall` scene file. -2. In the **Hierarchy** window, select the **Ball3DBrain** child under the - **Ball3DAcademy** GameObject to view its properties in the Inspector window. -3. On the **Ball3DBrain** object's **Brain** component, change the **Brain - Type** to **Internal**. -4. In the **Project** window, locate the - `Assets/ML-Agents/Examples/3DBall/TFModels` folder. -5. Drag the `3DBall` model file from the `TFModels` folder to the **Graph - Model** field of the **Ball3DBrain** object's **Brain** component. -6. Click the **Play** button and you will see the platforms balance the balls - using the pretrained model. +1. In the **Project** window, go to `Assets/ML-Agents/Examples/3DBall` folder and open the `3DBall` scene file. +2. In the **Hierarchy** window, select the **Ball3DBrain** child under the **Ball3DAcademy** GameObject to view its properties in the Inspector window. +3. On the **Ball3DBrain** object's **Brain** component, change the **Brain Type** to **Internal**. +4. In the **Project** window, locate the `Assets/ML-Agents/Examples/3DBall/TFModels` folder. +5. Drag the `3DBall` model file from the `TFModels` folder to the **Graph Model** field of the **Ball3DBrain** object's **Brain** component. +5. Click the **Play** button and you will see the platforms balance the balls using the pretrained model. ![Running a pretrained model](images/running-a-pretrained-model.gif) ## Using the Basics Jupyter Notebook -The `notebooks/getting-started.ipynb` [Jupyter notebook](Background-Jupyter.md) -contains a simple walkthrough of the functionality of the Python API. It can -also serve as a simple test that your environment is configured correctly. -Within `Basics`, be sure to set `env_name` to the name of the Unity executable -if you want to [use an executable](Learning-Environment-Executable.md) or to -`None` if you want to interact with the current scene in the Unity Editor. +The `python/Basics` [Jupyter notebook](Background-Jupyter.md) contains a +simple walkthrough of the functionality of the Python +API. It can also serve as a simple test that your environment is configured +correctly. Within `Basics`, be sure to set `env_name` to the name of the +Unity executable if you want to [use an executable](Learning-Environment-Executable.md) or to `None` if you want to interact with the current scene in the Unity Editor. -More information and documentation is provided in the +More information and documentation is provided in the [Python API](Python-API.md) page. ## Training the Brain with Reinforcement Learning - ### Setting the Brain to External - -Since we are going to build this environment to conduct training, we need to set -the Brain used by the Agents to **External**. This allows the Agents to +Since we are going to build this environment to conduct training, we need to +set the brain used by the agents to **External**. This allows the agents to communicate with the external training process when making their decisions. -1. In the **Scene** window, click the triangle icon next to the Ball3DAcademy - object. +1. In the **Scene** window, click the triangle icon next to the Ball3DAcademy +object. 2. Select its child object **Ball3DBrain**. 3. In the Inspector window, set **Brain Type** to **External**. ![Set Brain to External](images/mlagents-SetExternalBrain.png) ### Training the environment +1. Open a command or terminal window. +2. Nagivate to the folder where you installed the ML-Agents toolkit. +3. Change to the `python` directory. +4. Run `python3 learn.py --run-id= --train` +Where: +- `` is a string used to separate the results of different training runs +- And the `--train` tells learn.py to run a training session (rather than inference) +5. When the message _"Start training by pressing the Play button in the Unity Editor"_ is displayed on the screen, you can press the :arrow_forward: button in Unity to start training in the Editor. -1. Open a command or terminal window. -2. Navigate to the folder where you cloned the ML-Agents toolkit repository. - **Note**: If you followed the default [installation](Installation.md), then - you should be able to run `mlagents-learn` from any directory. -3. Run `mlagents-learn --run-id= --train` - where: - - `` is the relative or absolute filepath of the - trainer configuration. The defaults used by example environments included - in `MLAgentsSDK` can be found in `config/trainer_config.yaml`. - - `` is a string used to separate the results of different - training runs - - `--train` tells `mlagents-learn` to run a training session (rather - than inference) -4. If you cloned the ML-Agents repo, then you can simply run - - ```sh - mlagents-learn config/trainer_config.yaml --run-id=firstRun --train - ``` - -5. When the message _"Start training by pressing the Play button in the Unity - Editor"_ is displayed on the screen, you can press the :arrow_forward: button - in Unity to start training in the Editor. - -**Note**: Alternatively, you can use an executable rather than the Editor to -perform training. Please refer to [this -page](Learning-Environment-Executable.md) for instructions on how to build and -use an executable. - -```console -ml-agents$ mlagents-learn config/trainer_config.yaml --run-id=first-run --train - - - ▄▄▄▓▓▓▓ - ╓▓▓▓▓▓▓█▓▓▓▓▓ - ,▄▄▄m▀▀▀' ,▓▓▓▀▓▓▄ ▓▓▓ ▓▓▌ - ▄▓▓▓▀' ▄▓▓▀ ▓▓▓ ▄▄ ▄▄ ,▄▄ ▄▄▄▄ ,▄▄ ▄▓▓▌▄ ▄▄▄ ,▄▄ - ▄▓▓▓▀ ▄▓▓▀ ▐▓▓▌ ▓▓▌ ▐▓▓ ▐▓▓▓▀▀▀▓▓▌ ▓▓▓ ▀▓▓▌▀ ^▓▓▌ ╒▓▓▌ - ▄▓▓▓▓▓▄▄▄▄▄▄▄▄▓▓▓ ▓▀ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▄ ▓▓▌ - ▀▓▓▓▓▀▀▀▀▀▀▀▀▀▀▓▓▄ ▓▓ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▐▓▓ - ^█▓▓▓ ▀▓▓▄ ▐▓▓▌ ▓▓▓▓▄▓▓▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▓▄ ▓▓▓▓` - '▀▓▓▓▄ ^▓▓▓ ▓▓▓ └▀▀▀▀ ▀▀ ^▀▀ `▀▀ `▀▀ '▀▀ ▐▓▓▌ - ▀▀▀▀▓▄▄▄ ▓▓▓▓▓▓, ▓▓▓▓▀ - `▀█▓▓▓▓▓▓▓▓▓▌ - ¬`▀▀▀█▓ - - -INFO:mlagents.learn:{'--curriculum': 'None', - '--docker-target-name': 'Empty', - '--env': 'None', - '--help': False, - '--keep-checkpoints': '5', - '--lesson': '0', - '--load': False, - '--no-graphics': False, - '--num-runs': '1', - '--run-id': 'first-run', - '--save-freq': '50000', - '--seed': '-1', - '--slow': False, - '--train': True, - '--worker-id': '0', - '': 'config/trainer_config.yaml'} -INFO:mlagents.envs:Start training by pressing the Play button in the Unity Editor. - ``` - -**Note**: If you're using Anaconda, don't forget to activate the ml-agents -environment first. - -If `mlagents-learn` runs correctly and starts training, you should see something -like this: - -```console -INFO:mlagents.envs: -'Ball3DAcademy' started successfully! -Unity Academy name: Ball3DAcademy - Number of Brains: 1 - Number of External Brains : 1 - Reset Parameters : - -Unity brain name: Ball3DBrain - Number of Visual Observations (per agent): 0 - Vector Observation space size (per agent): 8 - Number of stacked Vector Observation: 1 - Vector Action space type: continuous - Vector Action space size (per agent): [2] - Vector Action descriptions: , -INFO:mlagents.envs:Hyperparameters for the PPO Trainer of brain Ball3DBrain: - batch_size: 64 - beta: 0.001 - buffer_size: 12000 - epsilon: 0.2 - gamma: 0.995 - hidden_units: 128 - lambd: 0.99 - learning_rate: 0.0003 - max_steps: 5.0e4 - normalize: True - num_epoch: 3 - num_layers: 2 - time_horizon: 1000 - sequence_length: 64 - summary_freq: 1000 - use_recurrent: False - graph_scope: - summary_path: ./summaries/first-run-0 - memory_size: 256 - use_curiosity: False - curiosity_strength: 0.01 - curiosity_enc_size: 128 -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 1000. Mean Reward: 1.242. Std of Reward: 0.746. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 2000. Mean Reward: 1.319. Std of Reward: 0.693. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 3000. Mean Reward: 1.804. Std of Reward: 1.056. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 4000. Mean Reward: 2.151. Std of Reward: 1.432. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 5000. Mean Reward: 3.175. Std of Reward: 2.250. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 6000. Mean Reward: 4.898. Std of Reward: 4.019. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 7000. Mean Reward: 6.716. Std of Reward: 5.125. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 8000. Mean Reward: 12.124. Std of Reward: 11.929. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 9000. Mean Reward: 18.151. Std of Reward: 16.871. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 10000. Mean Reward: 27.284. Std of Reward: 28.667. Training. -``` +**Note**: Alternatively, you can use an executable rather than the Editor to perform training. Please refer to [this page](Learning-Environment-Executable.md) for instructions on how to build and use an executable. -### After training +![Training command example](images/training-command-example.png) + +**Note**: If you're using Anaconda, don't forget to activate the ml-agents environment first. -You can press Ctrl+C to stop the training, and your trained model will be at -`models//editor__.bytes` where -`` is the name of the Academy GameObject in the current scene. -This file corresponds to your model's latest checkpoint. You can now embed this -trained model into your Internal Brain by following the steps below, which is -similar to the steps described -[above](#play-an-example-environment-using-pretrained-model). +If the learn.py runs correctly and starts training, you should see something like this: + +![Training running](images/training-running.png) + +### After training +You can press Ctrl+C to stop the training, and your trained model will be at `ml-agents/python/models//editor__.bytes` where `` is the name of the Academy GameObject in the current scene. This file corresponds to your model's latest checkpoint. You can now embed this trained model into your internal brain by following the steps below, which is similar to the steps described [above](#play-an-example-environment-using-pretrained-model). -1. Move your model file into - `UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/`. +1. Move your model file into +`unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/`. 2. Open the Unity Editor, and select the **3DBall** scene as described above. 3. Select the **Ball3DBrain** object from the Scene hierarchy. 4. Change the **Type of Brain** to **Internal**. -5. Drag the `_.bytes` file from the Project window of - the Editor to the **Graph Model** placeholder in the **Ball3DBrain** - inspector window. +5. Drag the `_.bytes` file from the Project window of the Editor +to the **Graph Model** placeholder in the **Ball3DBrain** inspector window. 6. Press the :arrow_forward: button at the top of the Editor. ## Next Steps -- For more information on the ML-Agents toolkit, in addition to helpful - background, check out the [ML-Agents Toolkit Overview](ML-Agents-Overview.md) - page. -- For a more detailed walk-through of our 3D Balance Ball environment, check out - the [Getting Started](Getting-Started-with-Balance-Ball.md) page. -- For a "Hello World" introduction to creating your own Learning Environment, - check out the [Making a New Learning - Environment](Learning-Environment-Create-New.md) page. -- For a series of Youtube video tutorials, checkout the - [Machine Learning Agents PlayList](https://www.youtube.com/playlist?list=PLX2vGYjWbI0R08eWQkO7nQkGiicHAX7IX) - page. +* For more information on the ML-Agents toolkit, in addition to helpful background, check out the [ML-Agents Toolkit Overview](ML-Agents-Overview.md) page. +* For a more detailed walk-through of our 3D Balance Ball environment, check out the [Getting Started](Getting-Started-with-Balance-Ball.md) page. +* For a "Hello World" introduction to creating your own learning environment, check out the [Making a New Learning Environment](Learning-Environment-Create-New.md) page. +* For a series of Youtube video tutorials, checkout the [Machine Learning Agents PlayList](https://www.youtube.com/playlist?list=PLX2vGYjWbI0R08eWQkO7nQkGiicHAX7IX) page. diff --git a/docs/FAQ.md b/docs/FAQ.md index 5edbf29b1a..4e674bcae9 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -1,125 +1,91 @@ # Frequently Asked Questions -## Scripting Runtime Environment not setup correctly -If you haven't switched your scripting runtime version from .NET 3.5 to .NET 4.6 -or .NET 4.x, you will see such error message: +### Scripting Runtime Environment not setup correctly -```console +If you haven't switched your scripting runtime version from .NET 3.5 to .NET 4.6 or .NET 4.x, you will see such error message: + +``` error CS1061: Type `System.Text.StringBuilder' does not contain a definition for `Clear' and no extension method `Clear' of type `System.Text.StringBuilder' could be found. Are you missing an assembly reference? ``` -This is because .NET 3.5 doesn't support method Clear() for StringBuilder, refer -to [Setting Up The ML-Agents Toolkit Within -Unity](Installation.md#setting-up-ml-agent-within-unity) for solution. +This is because .NET 3.5 doesn't support method Clear() for StringBuilder, refer to [Setting Up The ML-Agents Toolkit Within Unity](Installation.md#setting-up-ml-agent-within-unity) for solution. -## TensorFlowSharp flag not turned on +### TensorFlowSharp flag not turned on. -If you have already imported the TensorFlowSharp plugin, but haven't set -ENABLE_TENSORFLOW flag for your scripting define symbols, you will see the -following error message: +If you have already imported the TensorFlowSharp plugin, but havn't set ENABLE_TENSORFLOW flag for your scripting define symbols, you will see the following error message: -```console -You need to install and enable the TensorFlowSharp plugin in order to use the Internal Brain. ``` - -This error message occurs because the TensorFlowSharp plugin won't be usage -without the ENABLE_TENSORFLOW flag, refer to [Setting Up The ML-Agents Toolkit -Within Unity](Installation.md#setting-up-ml-agent-within-unity) for solution. - -## Instance of CoreBrainInternal couldn't be created - -If you try to use ML-Agents in Unity versions 2017.1 - 2017.3, you might -encounter an error that looks like this: - -```console -Instance of CoreBrainInternal couldn't be created. The the script -class needs to derive from ScriptableObject. -UnityEngine.ScriptableObject:CreateInstance(String) +You need to install and enable the TensorFlowSharp plugin in order to use the internal brain. ``` -You can fix the error by removing `CoreBrain` from CoreBrainInternal.cs:16, -clicking on your Brain Gameobject to let the scene recompile all the changed -C# scripts, then adding the `CoreBrain` back. Make sure your brain is in -Internal mode, your TensorFlowSharp plugin is imported and the -ENABLE_TENSORFLOW flag is set. This fix is only valid locally and unstable. +This error message occurs because the TensorFlowSharp plugin won't be usage without the ENABLE_TENSORFLOW flag, refer to [Setting Up The ML-Agents Toolkit Within Unity](Installation.md#setting-up-ml-agent-within-unity) for solution. -## Tensorflow epsilon placeholder error +### Tensorflow epsilon placeholder error -If you have a graph placeholder set in the Internal Brain inspector that is not -present in the TensorFlow graph, you will see some error like this: +If you have a graph placeholder set in the internal Brain inspector that is not present in the TensorFlow graph, you will see some error like this: -```console -UnityAgentsException: One of the TensorFlow placeholder could not be found. In brain , there are no FloatingPoint placeholder named . +``` +UnityAgentsException: One of the Tensorflow placeholder could not be found. In brain , there are no FloatingPoint placeholder named . ``` -Solution: Go to all of your Brain object, find `Graph placeholders` and change -its `size` to 0 to remove the `epsilon` placeholder. +Solution: Go to all of your Brain object, find `Graph placeholders` and change its `size` to 0 to remove the `epsilon` placeholder. -Similarly, if you have a graph scope set in the Internal Brain inspector that is -not correctly set, you will see some error like this: +Similarly, if you have a graph scope set in the internal Brain inspector that is not correctly set, you will see some error like this: -```console +``` UnityAgentsException: The node /action could not be found. Please make sure the graphScope / is correct ``` -Solution: Make sure your Graph Scope field matches the corresponding Brain -object name in your Hierarchy Inspector when there are multiple Brains. +Solution: Make sure your Graph Scope field matches the corresponding brain object name in your Hierachy Inspector when there is multiple brain. -## Environment Permission Error +### Environment Permission Error -If you directly import your Unity environment without building it in the -editor, you might need to give it additional permissions to execute it. +If you directly import your Unity environment without building it in the +editor, you might need to give it additional permissions to execute it. If you receive such a permission error on macOS, run: -```sh -chmod -R 755 *.app -``` +`chmod -R 755 *.app` or on Linux: -```sh -chmod -R 755 *.x86_64 -``` +`chmod -R 755 *.x86_64` -On Windows, you can find +On Windows, you can find [instructions](https://technet.microsoft.com/en-us/library/cc754344(v=ws.11).aspx). -## Environment Connection Timeout - -If you are able to launch the environment from `UnityEnvironment` but then -receive a timeout error, there may be a number of possible causes. - -* _Cause_: There may be no Brains in your environment which are set to - `External`. In this case, the environment will not attempt to communicate - with python. _Solution_: Set the Brains(s) you wish to externally control - through the Python API to `External` from the Unity Editor, and rebuild the - environment. -* _Cause_: On OSX, the firewall may be preventing communication with the - environment. _Solution_: Add the built environment binary to the list of - exceptions on the firewall by following - [instructions](https://support.apple.com/en-us/HT201642). -* _Cause_: An error happened in the Unity Environment preventing communication. - _Solution_: Look into the [log - files](https://docs.unity3d.com/Manual/LogFiles.html) generated by the Unity - Environment to figure what error happened. - -## Communication port {} still in use - -If you receive an exception `"Couldn't launch new environment because -communication port {} is still in use. "`, you can change the worker number in -the Python script when calling - -```python -UnityEnvironment(file_name=filename, worker_id=X) -``` - -## Mean reward : nan - -If you receive a message `Mean reward : nan` when attempting to train a model -using PPO, this is due to the episodes of the Learning Environment not -terminating. In order to address this, set `Max Steps` for either the Academy or -Agents within the Scene Inspector to a value greater than 0. Alternatively, it -is possible to manually set `done` conditions for episodes from within scripts -for custom episode-terminating events. +### Environment Connection Timeout + +If you are able to launch the environment from `UnityEnvironment` but +then receive a timeout error, there may be a number of possible causes. + * _Cause_: There may be no Brains in your environment which are set + to `External`. In this case, the environment will not attempt to + communicate with python. _Solution_: Set the Brains(s) you wish to + externally control through the Python API to `External` from the + Unity Editor, and rebuild the environment. + * _Cause_: On OSX, the firewall may be preventing communication with + the environment. _Solution_: Add the built environment binary to the + list of exceptions on the firewall by following + [instructions](https://support.apple.com/en-us/HT201642). + * _Cause_: An error happened in the Unity Environment preventing + communication. _Solution_: Look into the + [log files](https://docs.unity3d.com/Manual/LogFiles.html) + generated by the Unity Environment to figure what error happened. + +### Communication port {} still in use + +If you receive an exception `"Couldn't launch new environment because +communication port {} is still in use. "`, you can change the worker +number in the Python script when calling + +`UnityEnvironment(file_name=filename, worker_id=X)` + +### Mean reward : nan + +If you receive a message `Mean reward : nan` when attempting to train a +model using PPO, this is due to the episodes of the learning environment +not terminating. In order to address this, set `Max Steps` for either +the Academy or Agents within the Scene Inspector to a value greater +than 0. Alternatively, it is possible to manually set `done` conditions +for episodes from within scripts for custom episode-terminating events. diff --git a/docs/Feature-Memory.md b/docs/Feature-Memory.md index 6147e39cf6..f7739d06f4 100644 --- a/docs/Feature-Memory.md +++ b/docs/Feature-Memory.md @@ -1,24 +1,22 @@ -# Memory-enhanced agents using Recurrent Neural Networks +# Memory-enhanced Agents using Recurrent Neural Networks -## What are memories used for? +## What are memories for? +Have you ever entered a room to get something and immediately forgot +what you were looking for? Don't let that happen to +your agents. -Have you ever entered a room to get something and immediately forgot what you -were looking for? Don't let that happen to your agents. - -It is now possible to give memories to your agents. When training, the agents -will be able to store a vector of floats to be used next time they need to make -a decision. +It is now possible to give memories to your agents. When training, the +agents will be able to store a vector of floats to be used next time +they need to make a decision. ![Brain Inspector](images/ml-agents-LSTM.png) -Deciding what the agents should remember in order to solve a task is not easy to -do by hand, but our training algorithms can learn to keep track of what is -important to remember with -[LSTM](https://en.wikipedia.org/wiki/Long_short-term_memory). +Deciding what the agents should remember in order to solve a task is not +easy to do by hand, but our training algorithms can learn to keep +track of what is important to remember with [LSTM](https://en.wikipedia.org/wiki/Long_short-term_memory). ## How to use - -When configuring the trainer parameters in the `config/trainer_config.yaml` +When configuring the trainer parameters in the `trainer_config.yaml` file, add the following parameters to the Brain you want to use. ```json @@ -27,22 +25,21 @@ sequence_length: 64 memory_size: 256 ``` -* `use_recurrent` is a flag that notifies the trainer that you want to use a - Recurrent Neural Network. -* `sequence_length` defines how long the sequences of experiences must be while - training. In order to use a LSTM, training requires a sequence of experiences - instead of single experiences. -* `memory_size` corresponds to the size of the memory the agent must keep. Note - that if this number is too small, the agent will not be able to remember a lot - of things. If this number is too large, the neural network will take longer to - train. +* `use_recurrent` is a flag that notifies the trainer that you want +to use a Recurrent Neural Network. +* `sequence_length` defines how long the sequences of experiences +must be while training. In order to use a LSTM, training requires +a sequence of experiences instead of single experiences. +* `memory_size` corresponds to the size of the memory the agent +must keep. Note that if this number is too small, the agent will not +be able to remember a lot of things. If this number is too large, +the neural network will take longer to train. ## Limitations - -* LSTM does not work well with continuous vector action space. Please use - discrete vector action space for better results. -* Since the memories must be sent back and forth between Python and Unity, using - too large `memory_size` will slow down training. -* Adding a recurrent layer increases the complexity of the neural network, it is - recommended to decrease `num_layers` when using recurrent. +* LSTM does not work well with continuous vector action space. +Please use discrete vector action space for better results. +* Since the memories must be sent back and forth between Python +and Unity, using too large `memory_size` will slow down training. +* Adding a recurrent layer increases the complexity of the neural +network, it is recommended to decrease `num_layers` when using recurrent. * It is required that `memory_size` be divisible by 4. diff --git a/docs/Feature-Monitor.md b/docs/Feature-Monitor.md index b87d22ebe0..98967f1ee6 100644 --- a/docs/Feature-Monitor.md +++ b/docs/Feature-Monitor.md @@ -2,49 +2,19 @@ ![Monitor](images/monitor.png) -The monitor allows visualizing information related to the agents or training -process within a Unity scene. +The monitor allows visualizing information related to the agents or training process within a Unity scene. -You can track many different things both related and unrelated to the agents -themselves. By default, the Monitor is only active in the *inference* phase, so -not during training. To change this behavior, you can activate or deactivate it -by calling `SetActive(boolean)`. For example to also show the monitor during -training, you can call it in the `InitializeAcademy()` method of your `Academy`: - -```csharp -using MLAgents; - -public class YourAcademy : Academy { - public override void InitializeAcademy() - { - Monitor.SetActive(true); - } -} -``` - -To add values to monitor, call the `Log` function anywhere in your code: +You can track many different things both related and unrelated to the agents themselves. To use the Monitor, call the Log function anywhere in your code : ```csharp Monitor.Log(key, value, target) ``` -* `key` is the name of the information you want to display. -* `value` is the information you want to display. *`value`* can have different - types: - * `string` - The Monitor will display the string next to the key. It can be - useful for displaying error messages. - * `float` - The Monitor will display a slider. Note that the values must be - between -1 and 1. If the value is positive, the slider will be green, if the - value is negative, the slider will be red. - * `float[]` - The Monitor Log call can take an additional argument called - `displayType` that can be either `INDEPENDENT` (default) or `PROPORTIONAL`: - * `INDEPENDENT` is used to display multiple independent floats as a - histogram. The histogram will be a sequence of vertical sliders. - * `PROPORTION` is used to see the proportions between numbers. For each - float in values, a rectangle of width of value divided by the sum of all - values will be show. It is best for visualizing values that sum to 1. -* `target` is the transform to which you want to attach information. If the - transform is `null` the information will be attached to the global monitor. - * **NB:** When adding a target transform that is not the global monitor, make - sure you have your main camera object tagged as `MainCamera` via the - inspector. This is needed to properly display the text onto the screen. + * *`key`* is the name of the information you want to display. + * *`value`* is the information you want to display. *`value`* can have different types : + * *`string`* - The Monitor will display the string next to the key. It can be useful for displaying error messages. + * *`float`* - The Monitor will display a slider. Note that the values must be between -1 and 1. If the value is positive, the slider will be green, if the value is negative, the slider will be red. + * *`float[]`* - The Monitor Log call can take an additional argument called `displayType` that can be either `INDEPENDENT` (default) or `PROPORTIONAL` : + * *`INDEPENDENT`* is used to display multiple independent floats as a histogram. The histogram will be a sequence of vertical sliders. + * *`PROPORTION`* is used to see the proportions between numbers. For each float in values, a rectangle of width of value divided by the sum of all values will be show. It is best for visualizing values that sum to 1. + * *`target`* is the transform to which you want to attach information. If the transform is `null` the information will be attached to the global monitor. diff --git a/docs/Getting-Started-with-Balance-Ball.md b/docs/Getting-Started-with-Balance-Ball.md index 14f03b7c18..81ddd27a1c 100644 --- a/docs/Getting-Started-with-Balance-Ball.md +++ b/docs/Getting-Started-with-Balance-Ball.md @@ -1,288 +1,279 @@ # Getting Started with the 3D Balance Ball Environment -This tutorial walks through the end-to-end process of opening a ML-Agents -toolkit example environment in Unity, building the Unity executable, training an -Agent in it, and finally embedding the trained model into the Unity environment. +This tutorial walks through the end-to-end process of opening a ML-Agents toolkit +example environment in Unity, building the Unity executable, training an agent +in it, and finally embedding the trained model into the Unity environment. -The ML-Agents toolkit includes a number of [example -environments](Learning-Environment-Examples.md) which you can examine to help -understand the different ways in which the ML-Agents toolkit can be used. These -environments can also serve as templates for new environments or as ways to test -new ML algorithms. After reading this tutorial, you should be able to explore -and build the example environments. +The ML-Agents toolkit includes a number of [example environments](Learning-Environment-Examples.md) +which you can examine to help understand the different ways in which the ML-Agents toolkit +can be used. These environments can also serve as templates for new +environments or as ways to test new ML algorithms. After reading this tutorial, +you should be able to explore and build the example environments. ![3D Balance Ball](images/balance.png) -This walk-through uses the **3D Balance Ball** environment. 3D Balance Ball -contains a number of platforms and balls (which are all copies of each other). -Each platform tries to keep its ball from falling by rotating either -horizontally or vertically. In this environment, a platform is an **Agent** that -receives a reward for every step that it balances the ball. An agent is also -penalized with a negative reward for dropping the ball. The goal of the training -process is to have the platforms learn to never drop the ball. +This walk-through uses the **3D Balance Ball** environment. 3D Balance Ball contains +a number of platforms and balls (which are all copies of each other). +Each platform tries to keep its ball from falling by rotating either +horizontally or vertically. In this environment, a platform is an **agent** +that receives a reward for every step that it balances the ball. An agent is +also penalized with a negative reward for dropping the ball. The goal of the +training process is to have the platforms learn to never drop the ball. Let's get started! ## Installation -In order to install and set up the ML-Agents toolkit, the Python dependencies -and Unity, see the [installation instructions](Installation.md). +In order to install and set up the ML-Agents toolkit, the Python dependencies and Unity, +see the [installation instructions](Installation.md). ## Understanding a Unity Environment (3D Balance Ball) -An agent is an autonomous actor that observes and interacts with an -_environment_. In the context of Unity, an environment is a scene containing an -Academy and one or more Brain and Agent objects, and, of course, the other -entities that an agent interacts with. +An agent is an autonomous actor that observes and interacts with an +_environment_. In the context of Unity, an environment is a scene containing +an Academy and one or more Brain and Agent objects, and, of course, the other +entities that an agent interacts with. ![Unity Editor](images/mlagents-3DBallHierarchy.png) -**Note:** In Unity, the base object of everything in a scene is the -_GameObject_. The GameObject is essentially a container for everything else, -including behaviors, graphics, physics, etc. To see the components that make up -a GameObject, select the GameObject in the Scene window, and open the Inspector -window. The Inspector shows every component on a GameObject. - -The first thing you may notice after opening the 3D Balance Ball scene is that -it contains not one, but several platforms. Each platform in the scene is an -independent agent, but they all share the same Brain. 3D Balance Ball does this +**Note:** In Unity, the base object of everything in a scene is the +_GameObject_. The GameObject is essentially a container for everything else, +including behaviors, graphics, physics, etc. To see the components that make +up a GameObject, select the GameObject in the Scene window, and open the +Inspector window. The Inspector shows every component on a GameObject. + +The first thing you may notice after opening the 3D Balance Ball scene is that +it contains not one, but several platforms. Each platform in the scene is an +independent agent, but they all share the same brain. 3D Balance Ball does this to speed up training since all twelve agents contribute to training in parallel. ### Academy -The Academy object for the scene is placed on the Ball3DAcademy GameObject. When -you look at an Academy component in the inspector, you can see several -properties that control how the environment works. For example, the **Training** -and **Inference Configuration** properties set the graphics and timescale -properties for the Unity application. The Academy uses the **Training -Configuration** during training and the **Inference Configuration** when not -training. (*Inference* means that the Agent is using a trained model or -heuristics or direct control — in other words, whenever **not** training.) -Typically, you set low graphics quality and a high time scale for the **Training -configuration** and a high graphics quality and the timescale to `1.0` for the -**Inference Configuration** . - -**Note:** if you want to observe the environment during training, you can adjust -the **Inference Configuration** settings to use a larger window and a timescale -closer to 1:1. Be sure to set these parameters back when training in earnest; -otherwise, training can take a very long time. - -Another aspect of an environment to look at is the Academy implementation. Since -the base Academy class is abstract, you must always define a subclass. There are -three functions you can implement, though they are all optional: +The Academy object for the scene is placed on the Ball3DAcademy GameObject. +When you look at an Academy component in the inspector, you can see several +properties that control how the environment works. For example, the +**Training** and **Inference Configuration** properties set the graphics and +timescale properties for the Unity application. The Academy uses the +**Training Configuration** during training and the **Inference Configuration** +when not training. (*Inference* means that the agent is using a trained model +or heuristics or direct control — in other words, whenever **not** training.) +Typically, you set low graphics quality and a high time scale for the +**Training configuration** and a high graphics quality and the timescale to +`1.0` for the **Inference Configuration** . + +**Note:** if you want to observe the environment during training, you can +adjust the **Inference Configuration** settings to use a larger window and a +timescale closer to 1:1. Be sure to set these parameters back when training in +earnest; otherwise, training can take a very long time. + +Another aspect of an environment to look at is the Academy implementation. +Since the base Academy class is abstract, you must always define a subclass. +There are three functions you can implement, though they are all optional: * Academy.InitializeAcademy() — Called once when the environment is launched. -* Academy.AcademyStep() — Called at every simulation step before - agent.AgentAction() (and after the Agents collect their observations). -* Academy.AcademyReset() — Called when the Academy starts or restarts the - simulation (including the first time). +* Academy.AcademyStep() — Called at every simulation step before +Agent.AgentAction() (and after the agents collect their observations). +* Academy.AcademyReset() — Called when the Academy starts or restarts the +simulation (including the first time). -The 3D Balance Ball environment does not use these functions — each Agent resets -itself when needed — but many environments do use these functions to control the -environment around the Agents. +The 3D Balance Ball environment does not use these functions — each agent +resets itself when needed — but many environments do use these functions to +control the environment around the agents. ### Brain -The Ball3DBrain GameObject in the scene, which contains a Brain component, is a -child of the Academy object. (All Brain objects in a scene must be children of -the Academy.) All the Agents in the 3D Balance Ball environment use the same -Brain instance. A Brain doesn't store any information about an Agent, it just -routes the Agent's collected observations to the decision making process and -returns the chosen action to the Agent. Thus, all Agents can share the same -Brain, but act independently. The Brain settings tell you quite a bit about how -an Agent works. - -The **Brain Type** determines how an Agent makes its decisions. The **External** -and **Internal** types work together — use **External** when training your -Agents; use **Internal** when using the trained model. The **Heuristic** Brain -allows you to hand-code the Agent's logic by extending the Decision class. -Finally, the **Player** Brain lets you map keyboard commands to actions, which -can be useful when testing your agents and environment. If none of these types -of Brains do what you need, you can implement your own CoreBrain to create your -own type. - -In this tutorial, you will set the **Brain Type** to **External** for training; +The Ball3DBrain GameObject in the scene, which contains a Brain component, +is a child of the Academy object. (All Brain objects in a scene must be +children of the Academy.) All the agents in the 3D Balance Ball environment +use the same Brain instance. +A Brain doesn't store any information about an agent, +it just routes the agent's collected observations to the decision making +process and returns the chosen action to the agent. Thus, all agents can share +the same brain, but act independently. The Brain settings tell you quite a bit +about how an agent works. + +The **Brain Type** determines how an agent makes its decisions. The +**External** and **Internal** types work together — use **External** when +training your agents; use **Internal** when using the trained model. +The **Heuristic** brain allows you to hand-code the agent's logic by extending +the Decision class. Finally, the **Player** brain lets you map keyboard +commands to actions, which can be useful when testing your agents and +environment. If none of these types of brains do what you need, you can +implement your own CoreBrain to create your own type. + +In this tutorial, you will set the **Brain Type** to **External** for training; when you embed the trained model in the Unity application, you will change the **Brain Type** to **Internal**. -#### Vector Observation Space - -Before making a decision, an agent collects its observation about its state in -the world. The vector observation is a vector of floating point numbers which -contain relevant information for the agent to make decisions. - -The Brain instance used in the 3D Balance Ball example uses the **Continuous** -vector observation space with a **State Size** of 8. This means that the feature -vector containing the Agent's observations contains eight elements: the `x` and -`z` components of the platform's rotation and the `x`, `y`, and `z` components -of the ball's relative position and velocity. (The observation values are -defined in the Agent's `CollectObservations()` function.) - -#### Vector Action Space - -An Agent is given instructions from the Brain in the form of *actions*. -ML-Agents toolkit classifies actions into two types: the **Continuous** vector -action space is a vector of numbers that can vary continuously. What each -element of the vector means is defined by the Agent logic (the PPO training -process just learns what values are better given particular state observations -based on the rewards received when it tries different values). For example, an -element might represent a force or torque applied to a `Rigidbody` in the Agent. -The **Discrete** action vector space defines its actions as tables. An action -given to the Agent is an array of indices into tables. +**Vector Observation Space** + +Before making a decision, an agent collects its observation about its state +in the world. The ML-Agents toolkit classifies vector observations into two types: +**Continuous** and **Discrete**. The **Continuous** vector observation space +collects observations in a vector of floating point numbers. The **Discrete** +vector observation space is an index into a table of states. Most of the example +environments use a continuous vector observation space. + +The Brain instance used in the 3D Balance Ball example uses the **Continuous** +vector observation space with a **State Size** of 8. This means that the +feature vector containing the agent's observations contains eight elements: +the `x` and `z` components of the platform's rotation and the `x`, `y`, and `z` +components of the ball's relative position and velocity. (The observation +values are defined in the agent's `CollectObservations()` function.) + +**Vector Action Space** + +An agent is given instructions from the brain in the form of *actions*. Like +states, ML-Agents toolkit classifies actions into two types: the **Continuous** +vector action space is a vector of numbers that can vary continuously. What +each element of the vector means is defined by the agent logic (the PPO +training process just learns what values are better given particular state +observations based on the rewards received when it tries different values). +For example, an element might represent a force or torque applied to a +`RigidBody` in the agent. The **Discrete** action vector space defines its +actions as a table. A specific action given to the agent is an index into +this table. The 3D Balance Ball example is programmed to use both types of vector action -space. You can try training with both settings to observe whether there is a -difference. (Set the `Vector Action Space Size` to 4 when using the discrete +space. +You can try training with both settings to observe whether there is a +difference. (Set the `Vector Action Space Size` to 4 when using the discrete action space and 2 when using continuous.) - + ### Agent -The Agent is the actor that observes and takes actions in the environment. In -the 3D Balance Ball environment, the Agent components are placed on the twelve -Platform GameObjects. The base Agent object has a few properties that affect its -behavior: - -* **Brain** — Every Agent must have a Brain. The Brain determines how an Agent - makes decisions. All the Agents in the 3D Balance Ball scene share the same - Brain. -* **Visual Observations** — Defines any Camera objects used by the Agent to - observe its environment. 3D Balance Ball does not use camera observations. -* **Max Step** — Defines how many simulation steps can occur before the Agent - decides it is done. In 3D Balance Ball, an Agent restarts after 5000 steps. -* **Reset On Done** — Defines whether an Agent starts over when it is finished. - 3D Balance Ball sets this true so that the Agent restarts after reaching the - **Max Step** count or after dropping the ball. - -Perhaps the more interesting aspect of an agents is the Agent subclass -implementation. When you create an Agent, you must extend the base Agent class. +The Agent is the actor that observes and takes actions in the environment. +In the 3D Balance Ball environment, the Agent components are placed on the +twelve Platform GameObjects. The base Agent object has a few properties that +affect its behavior: + +* **Brain** — Every agent must have a Brain. The brain determines how an agent +makes decisions. All the agents in the 3D Balance Ball scene share the same +brain. +* **Visual Observations** — Defines any Camera objects used by the agent to +observe its environment. 3D Balance Ball does not use camera observations. +* **Max Step** — Defines how many simulation steps can occur before the agent +decides it is done. In 3D Balance Ball, an agent restarts after 5000 steps. +* **Reset On Done** — Defines whether an agent starts over when it is finished. +3D Balance Ball sets this true so that the agent restarts after reaching the +**Max Step** count or after dropping the ball. + +Perhaps the more interesting aspect of an agent is the Agent subclass +implementation. When you create an agent, you must extend the base Agent class. The Ball3DAgent subclass defines the following methods: -* agent.AgentReset() — Called when the Agent resets, including at the beginning - of a session. The Ball3DAgent class uses the reset function to reset the - platform and ball. The function randomizes the reset values so that the - training generalizes to more than a specific starting position and platform - attitude. -* agent.CollectObservations() — Called every simulation step. Responsible for - collecting the Agent's observations of the environment. Since the Brain - instance assigned to the Agent is set to the continuous vector observation - space with a state size of 8, the `CollectObservations()` must call - `AddVectorObs` 8 times. -* agent.AgentAction() — Called every simulation step. Receives the action chosen - by the Brain. The Ball3DAgent example handles both the continuous and the - discrete action space types. There isn't actually much difference between the - two state types in this environment — both vector action spaces result in a - small change in platform rotation at each step. The `AgentAction()` function - assigns a reward to the Agent; in this example, an Agent receives a small - positive reward for each step it keeps the ball on the platform and a larger, - negative reward for dropping the ball. An Agent is also marked as done when it - drops the ball so that it will reset with a new ball for the next simulation - step. +* Agent.AgentReset() — Called when the Agent resets, including at the beginning +of a session. The Ball3DAgent class uses the reset function to reset the +platform and ball. The function randomizes the reset values so that the +training generalizes to more than a specific starting position and platform +attitude. +* Agent.CollectObservations() — Called every simulation step. Responsible for +collecting the agent's observations of the environment. Since the Brain +instance assigned to the agent is set to the continuous vector observation +space with a state size of 8, the `CollectObservations()` must call +`AddVectorObs` 8 times. +* Agent.AgentAction() — Called every simulation step. Receives the action chosen +by the brain. The Ball3DAgent example handles both the continuous and the +discrete action space types. There isn't actually much difference between the +two state types in this environment — both vector action spaces result in a +small change in platform rotation at each step. The `AgentAction()` function +assigns a reward to the agent; in this example, an agent receives a small +positive reward for each step it keeps the ball on the platform and a larger, +negative reward for dropping the ball. An agent is also marked as done when it +drops the ball so that it will reset with a new ball for the next simulation +step. ## Training the Brain with Reinforcement Learning -Now that we have an environment, we can perform the training. +Now that we have an environment, we can perform the training. ### Training with PPO -In order to train an agent to correctly balance the ball, we will use a -Reinforcement Learning algorithm called Proximal Policy Optimization (PPO). This -is a method that has been shown to be safe, efficient, and more general purpose -than many other RL algorithms, as such we have chosen it as the example -algorithm for use with ML-Agents toolkit. For more information on PPO, OpenAI -has a recent [blog post](https://blog.openai.com/openai-baselines-ppo/) +In order to train an agent to correctly balance the ball, we will use a +Reinforcement Learning algorithm called Proximal Policy Optimization (PPO). +This is a method that has been shown to be safe, efficient, and more general +purpose than many other RL algorithms, as such we have chosen it as the +example algorithm for use with ML-Agents toolkit. For more information on PPO, +OpenAI has a recent [blog post](https://blog.openai.com/openai-baselines-ppo/) explaining it. -To train the agents within the Ball Balance environment, we will be using the -Python package. We have provided a convenient script called `mlagents-learn` -which accepts arguments used to configure both training and inference phases. -We can use `run_id` to identify the experiment and create a folder where the -model and summary statistics are stored. When using TensorBoard to observe the -training statistics, it helps to set this to a sequential value for each -training run. In other words, "BalanceBall1" for the first run, "BalanceBall2" -or the second, and so on. If you don't, the summaries for every training run are -saved to the same directory and will all be included on the same graph. +To train the agents within the Ball Balance environment, we will be using the python +package. We have provided a convenient Python wrapper script called `learn.py` which accepts arguments used to configure both training and inference phases. -To summarize, go to your command line, enter the `ml-agents` directory and type: +We can use `run_id` to identify the experiment and create a folder where the model and summary statistics are stored. When using TensorBoard to observe the training statistics, it helps to set this to a sequential value +for each training run. In other words, "BalanceBall1" for the first run, +"BalanceBall2" or the second, and so on. If you don't, the summaries for +every training run are saved to the same directory and will all be included +on the same graph. -```sh -mlagents-learn config/trainer_config.yaml --run-id= --train +To summarize, go to your command line, enter the `ml-agents/python` directory and type: + +``` +python3 learn.py --run-id= --train ``` -When the message _"Start training by pressing the Play button in the Unity -Editor"_ is displayed on the screen, you can press the :arrow_forward: button in -Unity to start training in the Editor. +When the message _"Start training by pressing the Play button in the Unity Editor"_ is displayed on the screen, you can press the :arrow_forward: button in Unity to start training in the Editor. + +**Note**: If you're using Anaconda, don't forget to activate the ml-agents environment first. -**Note**: If you're using Anaconda, don't forget to activate the ml-agents -environment first. +The `--train` flag tells the ML-Agents toolkit to run in training mode. -The `--train` flag tells the ML-Agents toolkit to run in training mode. +**Note**: You can train using an executable rather than the Editor. To do so, follow the intructions in +[Using an Execuatble](Learning-Environment-Executable.md). -**Note**: You can train using an executable rather than the Editor. To do so, -follow the intructions in -[Using an Executable](Learning-Environment-Executable.md). ### Observing Training Progress -Once you start training using `mlagents-learn` in the way described in the -previous section, the `ml-agents` directory will contain a `summaries` -directory. In order to observe the training process in more detail, you can use -TensorBoard. From the command line run: +Once you start training using `learn.py` in the way described in the previous section, the `ml-agents/python` folder will +contain a `summaries` directory. In order to observe the training process +in more detail, you can use TensorBoard. From the command line navigate to `ml-agents/python` folder and run: -```sh -tensorboard --logdir=summaries -``` +`tensorboard --logdir=summaries` Then navigate to `localhost:6006` in your browser. From TensorBoard, you will see the summary statistics: -* Lesson - only interesting when performing [curriculum - training](Training-Curriculum-Learning.md). This is not used in the 3D Balance - Ball environment. -* Cumulative Reward - The mean cumulative episode reward over all agents. Should - increase during a successful training session. -* Entropy - How random the decisions of the model are. Should slowly decrease - during a successful training process. If it decreases too quickly, the `beta` - hyperparameter should be increased. -* Episode Length - The mean length of each episode in the environment for all - agents. -* Learning Rate - How large a step the training algorithm takes as it searches - for the optimal policy. Should decrease over time. +* Lesson - only interesting when performing +[curriculum training](Training-Curriculum-Learning.md). +This is not used in the 3D Balance Ball environment. +* Cumulative Reward - The mean cumulative episode reward over all agents. +Should increase during a successful training session. +* Entropy - How random the decisions of the model are. Should slowly decrease +during a successful training process. If it decreases too quickly, the `beta` +hyperparameter should be increased. +* Episode Length - The mean length of each episode in the environment for all +agents. +* Learning Rate - How large a step the training algorithm takes as it searches +for the optimal policy. Should decrease over time. * Policy Loss - The mean loss of the policy function update. Correlates to how - much the policy (process for deciding actions) is changing. The magnitude of - this should decrease during a successful training session. -* Value Estimate - The mean value estimate for all states visited by the agent. - Should increase during a successful training session. +much the policy (process for deciding actions) is changing. The magnitude of +this should decrease during a successful training session. +* Value Estimate - The mean value estimate for all states visited by the agent. +Should increase during a successful training session. * Value Loss - The mean loss of the value function update. Correlates to how - well the model is able to predict the value of each state. This should - decrease during a successful training session. +well the model is able to predict the value of each state. This should decrease +during a successful training session. ![Example TensorBoard Run](images/mlagents-TensorBoard.png) ## Embedding the Trained Brain into the Unity Environment (Experimental) -Once the training process completes, and the training process saves the model -(denoted by the `Saved Model` message) you can add it to the Unity project and -use it with Agents having an **Internal** Brain type. **Note:** Do not just -close the Unity Window once the `Saved Model` message appears. Either wait for -the training process to close the window or press Ctrl+C at the command-line -prompt. If you simply close the window manually, the .bytes file containing the -trained model is not exported into the ml-agents folder. +Once the training process completes, and the training process saves the model +(denoted by the `Saved Model` message) you can add it to the Unity project and +use it with agents having an **Internal** brain type. +**Note:** Do not just close the Unity Window once the `Saved Model` message appears. Either wait for the training process to close the window or press Ctrl+C at the command-line prompt. If you simply close the window manually, the .bytes file containing the trained model is not exported into the ml-agents folder. ### Setting up TensorFlowSharp Support -Because TensorFlowSharp support is still experimental, it is disabled by -default. In order to enable it, you must follow these steps. Please note that +Because TensorFlowSharp support is still experimental, it is disabled by +default. In order to enable it, you must follow these steps. Please note that the `Internal` Brain mode will only be available once completing these steps. -To set up the TensorFlowSharp Support, follow [Setting up ML-Agents Toolkit -within Unity](Basic-Guide.md#setting-up-ml-agents-within-unity) section. of the -Basic Guide page. +To set up the TensorFlowSharp Support, follow [Setting up ML-Agents Toolkit within Unity](Basic-Guide.md#setting-up-ml-agents-within-unity) section. +of the Basic Guide page. ### Embedding the trained model into Unity -To embed the trained model into Unity, follow the later part of [Training the -Brain with Reinforcement -Learning](Basic-Guide.md#training-the-brain-with-reinforcement-learning) section -of the Basic Guide page. +To embed the trained model into Unity, follow the later part of [Training the Brain with Reinforcement Learning](Basic-Guide.md#training-the-brain-with-reinforcement-learning) section of the Basic Buides page. diff --git a/docs/Glossary.md b/docs/Glossary.md index 41524291f6..45b6bd56a3 100644 --- a/docs/Glossary.md +++ b/docs/Glossary.md @@ -1,34 +1,38 @@ # ML-Agents Toolkit Glossary -* **Academy** - Unity Component which controls timing, reset, and - training/inference settings of the environment. -* **Action** - The carrying-out of a decision on the part of an agent within the - environment. -* **Agent** - Unity Component which produces observations and takes actions in - the environment. Agents actions are determined by decisions produced by a - linked Brain. -* **Brain** - Unity Component which makes decisions for the agents linked to it. -* **Decision** - The specification produced by a Brain for an action to be - carried out given an observation. -* **Editor** - The Unity Editor, which may include any pane (e.g. Hierarchy, - Scene, Inspector). -* **Environment** - The Unity scene which contains Agents, Academy, and Brains. -* **FixedUpdate** - Unity method called each time the the game engine is - stepped. ML-Agents logic should be placed here. -* **Frame** - An instance of rendering the main camera for the display. - Corresponds to each `Update` call of the game engine. -* **Observation** - Partial information describing the state of the environment - available to a given agent. (e.g. Vector, Visual, Text) -* **Policy** - Function for producing decisions from observations. -* **Reward** - Signal provided at every step used to indicate desirability of an - agent’s action within the current state of the environment. -* **State** - The underlying properties of the environment (including all agents - within it) at a given time. -* **Step** - Corresponds to each `FixedUpdate` call of the game engine. Is the - smallest atomic change to the state possible. -* **Update** - Unity function called each time a frame is rendered. ML-Agents - logic should not be placed here. -* **External Coordinator** - ML-Agents class responsible for communication with - outside processes (in this case, the Python API). -* **Trainer** - Python class which is responsible for training a given External - Brain. Contains TensorFlow graph which makes decisions for External Brain. + * **Academy** - Unity Component which controls timing, reset, and + training/inference settings of the environment. + * **Action** - The carrying-out of a decision on the part of an + agent within the environment. + * **Agent** - Unity Component which produces observations and + takes actions in the environment. Agents actions are determined + by decisions produced by a linked Brain. + * **Brain** - Unity Component which makes decisions for the agents + linked to it. + * **Decision** - The specification produced by a Brain for an action + to be carried out given an observation. + * **Editor** - The Unity Editor, which may include any pane + (e.g. Hierarchy, Scene, Inspector). + * **Environment** - The Unity scene which contains Agents, Academy, + and Brains. + * **FixedUpdate** - Unity method called each time the the game engine + is stepped. ML-Agents logic should be placed here. + * **Frame** - An instance of rendering the main camera for the + display. Corresponds to each `Update` call of the game engine. + * **Observation** - Partial information describing the state of the + environment available to a given agent. (e.g. Vector, Visual, Text) + * **Policy** - Function for producing decisions from observations. + * **Reward** - Signal provided at every step used to indicate + desirability of an agent’s action within the current state + of the environment. + * **State** - The underlying properties of the environment + (including all agents within it) at a given time. + * **Step** - Corresponds to each `FixedUpdate` call of the game engine. + Is the smallest atomic change to the state possible. + * **Update** - Unity function called each time a frame is rendered. + ML-Agents logic should not be placed here. + * **External Coordinator** - ML-Agents class responsible for + communication with outside processes (in this case, the Python API). + * **Trainer** - Python class which is responsible for training a given + external brain. Contains TensorFlow graph which makes decisions + for external brain. diff --git a/docs/Installation-Windows.md b/docs/Installation-Windows.md index 43d705116e..f33e7d465d 100644 --- a/docs/Installation-Windows.md +++ b/docs/Installation-Windows.md @@ -1,285 +1,200 @@ # Installing ML-Agents Toolkit for Windows -The ML-Agents toolkit supports Windows 10. While it might be possible to run the -ML-Agents toolkit using other versions of Windows, it has not been tested on -other versions. Furthermore, the ML-Agents toolkit has not been tested on a -Windows VM such as Bootcamp or Parallels. +The ML-Agents toolkit supports Windows 10. While it might be possible to run the ML-Agents toolkit using other versions of Windows, it has not been tested on other versions. Furthermore, the ML-Agents toolkit has not been tested on a Windows VM such as Bootcamp or Parallels. -To use the ML-Agents toolkit, you install Python and the required Python -packages as outlined below. This guide also covers how set up GPU-based training -(for advanced users). GPU-based training is not required for the v0.4 release of -the ML-Agents toolkit. However, training on a GPU might be required by future -versions and features. +To use the ML-Agents toolkit, you install Python and the required Python packages as outlined below. This guide also covers how set up GPU-based training (for advanced users). GPU-based training is not required for the v0.4 release of the ML-Agents toolkit. However, training on a GPU might be required by future versions and features. ## Step 1: Install Python via Anaconda -[Download](https://www.anaconda.com/download/#windows) and install Anaconda for -Windows. By using Anaconda, you can manage separate environments for different -distributions of Python. Python 3.5 or 3.6 is required as we no longer support -Python 2. In this guide, we are using Python version 3.6 and Anaconda version -5.1 -([64-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe) -or [32-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86.exe) -direct links). +[Download](https://www.anaconda.com/download/#windows) and install Anaconda for Windows. By using Anaconda, you can manage separate environments for different distributions of Python. Python 3.5 or 3.6 is required as we no longer support Python 2. In this guide, we are using Python version 3.6 and Anaconda version 5.1 ([64-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe) or [32-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86.exe) direct links).

- Anaconda Install + Anaconda Install

-We recommend the default _advanced installation options_. However, select the -options appropriate for your specific situation. +We recommend the default _advanced installation options_. However, select the options appropriate for your specific situation.

- Anaconda Install + Anaconda Install

-After installation, you must open __Anaconda Navigator__ to finish the setup. -From the Windows search bar, type _anaconda navigator_. You can close Anaconda -Navigator after it opens. +After installation, you must open __Anaconda Navigator__ to finish the setup. From the Windows search bar, type _anaconda navigator_. You can close Anaconda Navigator after it opens. -If environment variables were not created, you will see error "conda is not -recognized as internal or external command" when you type `conda` into the -command line. To solve this you will need to set the environment variable -correctly. +If environment variables were not created, you will see error "conda is not recognized as internal or external command" when you type `conda` into the command line. To solve this you will need to set the environment variable correctly. -Type `environment variables` in the search bar (this can be reached by hitting -the Windows key or the bottom left Windows button). You should see an option -called __Edit the system environment variables__. +Type `environment variables` in the search bar (this can be reached by hitting the Windows key or the bottom left Windows button). You should see an option called __Edit the system environment variables__.

- edit env variables + edit env variables

-From here, click the __Environment Variables__ button. Double click "Path" under -__System variable__ to edit the "Path" variable, click __New__ to add the -following new paths. +From here, click the __Environment Variables__ button. +Double click "Path" under __System variable__ to edit the "Path" variable, click __New__ to add the following new paths. -```console +``` %UserProfile%\Anaconda3\Scripts %UserProfile%\Anaconda3\Scripts\conda.exe %UserProfile%\Anaconda3 %UserProfile%\Anaconda3\python.exe ``` + ## Step 2: Setup and Activate a New Conda Environment -You will create a new [Conda environment](https://conda.io/docs/) to be used -with the ML-Agents toolkit. This means that all the packages that you install -are localized to just this environment. It will not affect any other -installation of Python or other environments. Whenever you want to run -ML-Agents, you will need activate this Conda environment. +You will create a new [Conda environment](https://conda.io/docs/) to be used with the ML-Agents toolkit. This means that all the packages that you install are localized to just this environment. It will not affect any other installation of Python or other environments. Whenever you want to run ML-Agents, you will need activate this Conda environment. -To create a new Conda environment, open a new Anaconda Prompt (_Anaconda Prompt_ -in the search bar) and type in the following command: +To create a new Conda environment, open a new Anaconda Prompt (_Anaconda Prompt_ in the search bar) and type in the following command: -```sh +``` conda create -n ml-agents python=3.6 ``` -You may be asked to install new packages. Type `y` and press enter _(make sure -you are connected to the internet)_. You must install these required packages. -The new Conda environment is called ml-agents and uses Python version 3.6. +You may be asked to install new packages. Type `y` and press enter _(make sure you are connected to the internet)_. You must install these required packages. The new Conda environment is called ml-agents and uses Python version 3.6.

- Anaconda Install + Anaconda Install

-To use this environment, you must activate it. _(To use this environment In the -future, you can run the same command)_. In the same Anaconda Prompt, type in the -following command: +To use this environment, you must activate it. _(To use this environment In the future, you can run the same command)_. In the same Anaconda Prompt, type in the following command: -```sh +``` activate ml-agents ``` You should see `(ml-agents)` prepended on the last line. -Next, install `tensorflow`. Install this package using `pip` - which is a -package management system used to install Python packages. Latest versions of -TensorFlow won't work, so you will need to make sure that you install version -1.7.1. In the same Anaconda Prompt, type in the following command _(make sure -you are connected to the internet)_: +Next, install `tensorflow`. Install this package using `pip` - which is a package management system used to install Python packages. Latest versions of Tensorflow won't work, so you will need to make sure that you install version 1.7.1. In the same Anaconda Prompt, type in the following command _(make sure you are connected to the internet)_: -```sh +``` pip install tensorflow==1.7.1 ``` ## Step 3: Install Required Python Packages -The ML-Agents toolkit depends on a number of Python packages. Use `pip` to -install these Python dependencies. +The ML-Agents toolkit depends on a number of Python packages. Use `pip` to install these Python dependencies. -If you haven't already, clone the ML-Agents Toolkit Github repository to your -local computer. You can do this using Git ([download -here](https://git-scm.com/download/win)) and running the following 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`)_: +If you haven't already, clone the ML-Agents Toolkit Github repository to your local computer. You can do this using Git ([download here](https://git-scm.com/download/win)) and running the following 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 https://github.com/Unity-Technologies/ml-agents.git ``` -If you don't want to use Git, you can always directly download all the files -[here](https://github.com/Unity-Technologies/ml-agents/archive/master.zip). +If you don't want to use Git, you can always directly download all the files [here](https://github.com/Unity-Technologies/ml-agents/archive/master.zip). -In our example, the files are located in `C:\Downloads`. After you have either -cloned or downloaded the files, from the Anaconda Prompt, change to the python -directory inside the ml-agents directory: +In our example, the files are located in `C:\Downloads`. After you have either cloned or downloaded the files, from the Anaconda Prompt, change to the python directory inside the ml-agents directory: -```console -cd C:\Downloads\ml-agents\ml-agents +``` +cd C:\Downloads\ml-agents\python ``` -Make sure you are connected to the internet and then type in the Anaconda -Prompt: +Make sure you are connected to the internet and then type in the Anaconda Prompt: -```sh +``` pip install . ``` -This will complete the installation of all the required Python packages to run -the ML-Agents toolkit. +This will complete the installation of all the required Python packages to run the ML-Agents toolkit. ## (Optional) Step 4: GPU Training using The ML-Agents Toolkit -GPU is not required for the ML-Agents toolkit and won't speed up the PPO -algorithm a lot during training(but something in the future will benefit from -GPU). This is a guide for advanced users who want to train using GPUs. -Additionally, you will need to check if your GPU is CUDA compatible. Please -check Nvidia's page [here](https://developer.nvidia.com/cuda-gpus). +GPU is not required for the ML-Agents toolkit and won't speed up the PPO algorithm a lot during training(but something in the future will benefit from GPU). This is a guide for advanced users who want to train using GPUs. Additionally, you will need to check if your GPU is CUDA compatible. Please check Nvidia's page [here](https://developer.nvidia.com/cuda-gpus). As of the ML-Agents toolkit v0.4, only CUDA v9.0 and cuDNN v7.0.5 is supported. ### Install Nvidia CUDA toolkit -[Download](https://developer.nvidia.com/cuda-toolkit-archive) and install the -CUDA toolkit 9.0 from Nvidia's archive. The toolkit includes GPU-accelerated -libraries, debugging and optimization tools, a C/C++ (Step Visual Studio 2017) -compiler and a runtime library and is needed to run the ML-Agents toolkit. In -this guide, we are using version -[9.0.176](https://developer.nvidia.com/compute/cuda/9.0/Prod/network_installers/cuda_9.0.176_win10_network-exe)). +[Download](https://developer.nvidia.com/cuda-toolkit-archive) and install the CUDA toolkit 9.0 from Nvidia's archive. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ (Step Visual Studio 2017) compiler and a runtime library and is needed to run the ML-Agents toolkit. In this guide, we are using version 9.0.176 (https://developer.nvidia.com/compute/cuda/9.0/Prod/network_installers/cuda_9.0.176_win10_network-exe)). -Before installing, please make sure you __close any running instances of Unity -or Visual Studio__. +Before installing, please make sure you __close any running instances of Unity or Visual Studio__. -Run the installer and select the Express option. Note the directory where you -installed the CUDA toolkit. In this guide, we installed in the directory -`C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0` +Run the installer and select the Express option. Note the directory where you installed the CUDA toolkit. In this guide, we installed in the directory `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0` ### Install Nvidia cuDNN library -[Download](https://developer.nvidia.com/cudnn) and install the cuDNN library -from Nvidia. cuDNN is a GPU-accelerated library of primitives for deep neural -networks. Before you can download, you will need to sign up for free to the -Nvidia Developer Program. +[Download](https://developer.nvidia.com/cudnn) and install the cuDNN library from Nvidia. cuDNN is a GPU-accelerated library of primitives for deep neural networks. Before you can download, you will need to sign up for free to the Nvidia Developer Program.

- cuDNN membership required + cuDNN membership required

-Once you've signed up, go back to the cuDNN -[downloads page](https://developer.nvidia.com/cudnn). -You may or may not be asked to fill out a short survey. When you get to the list -cuDNN releases, __make sure you are downloading the right version for the CUDA -toolkit you installed in Step 1.__ In this guide, we are using version 7.0.5 for -CUDA toolkit version 9.0 -([direct link](https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-windows10-x64-v7)). +Once you've signed up, go back to the cuDNN [downloads page](https://developer.nvidia.com/cudnn). You may or may not be asked to fill out a short survey. When you get to the list cuDNN releases, __make sure you are downloading the right version for the CUDA toolkit you installed in Step 1.__ In this guide, we are using version 7.0.5 for CUDA toolkit version 9.0 ([direct link](https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-windows10-x64-v7)). -After you have downloaded the cuDNN files, you will need to extract the files -into the CUDA toolkit directory. In the cuDNN zip file, there are three folders -called `bin`, `include`, and `lib`. +After you have downloaded the cuDNN files, you will need to extract the files into the CUDA toolkit directory. In the cuDNN zip file, there are three folders called `bin`, `include`, and `lib`.

- cuDNN zip files + cuDNN zip files

-Copy these three folders into the CUDA toolkit directory. The CUDA toolkit -directory is located at -`C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0` +Copy these three folders into the CUDA toolkit directory. The CUDA toolkit directory is located at `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0`

- cuda toolkit directory + cuda toolkit directory

### Set Environment Variables You will need to add one environment variable and two path variables. -To set the environment variable, type `environment variables` in the search bar -(this can be reached by hitting the Windows key or the bottom left Windows -button). You should see an option called __Edit the system environment -variables__. +To set the environment variable, type `environment variables` in the search bar (this can be reached by hitting the Windows key or the bottom left Windows button). You should see an option called __Edit the system environment variables__.

- edit env variables + edit env variables

-From here, click the __Environment Variables__ button. Click __New__ to add a -new system variable _(make sure you do this under __System variables__ and not -User variables_. +From here, click the __Environment Variables__ button. Click __New__ to add a new system variable _(make sure you do this under __System variables__ and not User variables_.

- new system variable + new system variable

-For __Variable Name__, enter `CUDA_HOME`. For the variable value, put the -directory location for the CUDA toolkit. In this guide, the directory location -is `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0`. Press __OK__ once. +For __Variable Name__, enter `CUDA_HOME`. For the variable value, put the directory location for the CUDA toolkit. In this guide, the directory location is `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0`. Press __OK__ once.

- system variable names and values + system variable names and values

-To set the two path variables, inside the same __Environment Variables__ window -and under the second box called __System Variables__, find a variable called -`Path` and click __Edit__. You will add two directories to the list. For this -guide, the two entries would look like: +To set the two path variables, inside the same __Environment Variables__ window and under the second box called __System Variables__, find a variable called `Path` and click __Edit__. You will add two directories to the list. For this guide, the two entries would look like: -```console -C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64 -C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\CUPTI\libx64 -``` + C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64 + C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\CUPTI\libx64 -Make sure to replace the relevant directory location with the one you have -installed. _Please note that case sensitivity matters_. +Make sure to replace the relevant directory location with the one you have installed. _Please note that case sensitivity matters_.

- Path variables

### Install TensorFlow GPU +Next, install `tensorflow-gpu` using `pip`. You'll need version 1.7.1. In an Anaconda Prompt with the Conda environment ml-agents activated, type in the following command to uninstall the tensorflow for cpu and install the tensorflow for gpu _(make sure you are connected to the internet)_: -Next, install `tensorflow-gpu` using `pip`. You'll need version 1.7.1. In an -Anaconda Prompt with the Conda environment ml-agents activated, type in the -following command to uninstall TensorFlow for cpu and install TensorFlow -for gpu _(make sure you are connected to the internet)_: - -```sh +``` pip uninstall tensorflow pip install tensorflow-gpu==1.7.1 ``` -Lastly, you should test to see if everything installed properly and that -TensorFlow can identify your GPU. In the same Anaconda Prompt, type in the -following command: +Lastly, you should test to see if everything installed properly and that TensorFlow can identify your GPU. In the same Anaconda Prompt, type in the following command: ```python import tensorflow as tf @@ -289,14 +204,10 @@ sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) You should see something similar to: -```console +``` Found device 0 with properties ... ``` ## Acknowledgements -We would like to thank -[Jason Weimann](https://unity3d.college/2017/10/25/machine-learning-in-unity3d-setting-up-the-environment-tensorflow-for-agentml-on-windows-10/) -and -[Nitish S. Mutha](http://blog.nitishmutha.com/tensorflow/2017/01/22/TensorFlow-with-gpu-for-windows.html) -for writing the original articles which were used to create this guide. +We would like to thank [Jason Weimann](https://unity3d.college/2017/10/25/machine-learning-in-unity3d-setting-up-the-environment-tensorflow-for-agentml-on-windows-10/) and [Nitish S. Mutha](http://blog.nitishmutha.com/tensorflow/2017/01/22/TensorFlow-with-gpu-for-windows.html) for writing the original articles which were used to create this guide. diff --git a/docs/Installation.md b/docs/Installation.md index eb3d779afc..41b7662149 100644 --- a/docs/Installation.md +++ b/docs/Installation.md @@ -1,94 +1,70 @@ # Installation -To install and use ML-Agents, you need install Unity, clone this repository and -install Python with additional dependencies. Each of the subsections below -overviews each step, in addition to a Docker set-up. +To install and use ML-Agents, you need install Unity, clone this repository +and install Python with additional dependencies. Each of the subsections +below overviews each step, in addition to a Docker set-up. -## Install **Unity 2017.4** or Later +## Install **Unity 2017.1** or Later [Download](https://store.unity.com/download) and install Unity. If you would -like to use our Docker set-up (introduced later), make sure to select the _Linux -Build Support_ component when installing Unity. +like to use our Docker set-up (introduced later), make sure to select the +_Linux Build Support_ component when installing Unity.

- Linux Build Support + Linux Build Support

-## Clone the ML-Agents Toolkit Repository +## Clone the Ml-Agents Repository -Once installed, you will want to clone the ML-Agents Toolkit GitHub repository. +Once installed, you will want to clone the ML-Agents Toolkit GitHub repository. -```sh -git clone https://github.com/Unity-Technologies/ml-agents.git -``` + git clone https://github.com/Unity-Technologies/ml-agents.git -The `UnitySDK` subdirectory contains the Unity Assets to add to your projects. -It also contains many [example environments](Learning-Environment-Examples.md) -that can be used to help get you familiar with Unity. +The `unity-environment` directory in this repository contains the Unity Assets +to add to your projects. The `python` directory contains the training code. +Both directories are located at the root of the repository. -The `ml-agents` subdirectory contains Python packages which provide -trainers and a Python API to interface with Unity. +## Install Python (with Dependencies) -The `gym-unity` subdirectory contains a package to interface with OpenAI Gym. - -## Install Python and mlagents Package - -In order to use ML-Agents toolkit, you need Python 3.6 along with the -dependencies listed in the [requirements file](../ml-agents/requirements.txt). +In order to use ML-Agents toolkit, you need Python 3.5 or 3.6 along with +the dependencies listed in the [requirements file](../python/requirements.txt). Some of the primary dependencies include: - -- [TensorFlow](Background-TensorFlow.md) -- [Jupyter](Background-Jupyter.md) - -### NOTES - -- We do not currently support Python 3.7 or Python 3.5. -- If you are using Anaconda and are having trouble with TensorFlow, please see - the following - [note](https://www.tensorflow.org/install/install_mac#installing_with_anaconda) - on how to install TensorFlow in an Anaconda environment. +- [TensorFlow](Background-TensorFlow.md) +- [Jupyter](Background-Jupyter.md) ### Windows Users -If you are a Windows user who is new to Python and TensorFlow, follow [this -guide](Installation-Windows.md) to set up your Python environment. +If you are a Windows user who is new to Python and TensorFlow, follow [this guide](Installation-Windows.md) to set up your Python environment. ### Mac and Unix Users -[Download](https://www.python.org/downloads/) and install Python 3.6 if you do not -already have it. +[Download](https://www.python.org/downloads/) and install Python 3 if you do not already have it. -If your Python environment doesn't include `pip3`, see these +If your Python environment doesn't include `pip`, see these [instructions](https://packaging.python.org/guides/installing-using-linux-tools/#installing-pip-setuptools-wheel-with-linux-package-managers) on installing it. -To install the dependencies and `mlagents` Python package, enter the -`ml-agents/` subdirectory and run from the command line: - -```sh -pip3 install . -``` +To install dependencies, **go into the `python` subdirectory** of the repository, +and run from the command line: -If you installed this correctly, you should be able to run -`mlagents-learn --help` + pip3 install . ## Docker-based Installation -If you'd like to use Docker for ML-Agents, please follow -[this guide](Using-Docker.md). +If you'd like to use Docker for ML-Agents, please follow +[this guide](Using-Docker.md). ## Next Steps -The [Basic Guide](Basic-Guide.md) page contains several short tutorials on -setting up the ML-Agents toolkit within Unity, running a pre-trained model, in +The [Basic Guide](Basic-Guide.md) page contains several short +tutorials on setting up the ML-Agents toolkit within Unity, running a pre-trained model, in addition to building and training environments. ## Help -If you run into any problems regarding ML-Agents, refer to our [FAQ](FAQ.md) and -our [Limitations](Limitations.md) pages. If you can't find anything please +If you run into any problems regarding ML-Agents, refer to our [FAQ](FAQ.md) and our [Limitations](Limitations.md) pages. If you can't find anything please [submit an issue](https://github.com/Unity-Technologies/ml-agents/issues) and -make sure to cite relevant information on OS, Python version, and exact error -message (whenever possible). +make sure to cite relevant information on OS, Python version, and exact error +message (whenever possible). diff --git a/docs/Learning-Environment-Best-Practices.md b/docs/Learning-Environment-Best-Practices.md index f52b466ac3..050e3a7342 100644 --- a/docs/Learning-Environment-Best-Practices.md +++ b/docs/Learning-Environment-Best-Practices.md @@ -1,59 +1,27 @@ # Environment Design Best Practices ## General - -* It is often helpful to start with the simplest version of the problem, to - ensure the agent can learn it. From there increase complexity over time. This - can either be done manually, or via Curriculum Learning, where a set of - lessons which progressively increase in difficulty are presented to the agent - ([learn more here](Training-Curriculum-Learning.md)). -* When possible, it is often helpful to ensure that you can complete the task by - using a Player Brain to control the agent. -* It is often helpful to make many copies of the agent, and attach the Brain to - be trained to all of these agents. In this way the Brain can get more feedback - information from all of these agents, which helps it train faster. +* It is often helpful to start with the simplest version of the problem, to ensure the agent can learn it. From there increase +complexity over time. This can either be done manually, or via Curriculum Learning, where a set of lessons which progressively increase in difficulty are presented to the agent ([learn more here](Training-Curriculum-Learning.md)). +* When possible, it is often helpful to ensure that you can complete the task by using a Player Brain to control the agent. +* It is often helpful to make many copies of the agent, and attach the brain to be trained to all of these agents. In this way the brain can get more feedback information from all of these agents, which helps it train faster. ## Rewards - -* The magnitude of any given reward should typically not be greater than 1.0 in - order to ensure a more stable learning process. -* Positive rewards are often more helpful to shaping the desired behavior of an - agent than negative rewards. -* For locomotion tasks, a small positive reward (+0.1) for forward velocity is - typically used. -* If you want the agent to finish a task quickly, it is often helpful to provide - a small penalty every step (-0.05) that the agent does not complete the task. - In this case completion of the task should also coincide with the end of the - episode. -* Overly-large negative rewards can cause undesirable behavior where an agent - learns to avoid any behavior which might produce the negative reward, even if - it is also behavior which can eventually lead to a positive reward. +* The magnitude of any given reward should typically not be greater than 1.0 in order to ensure a more stable learning process. +* Positive rewards are often more helpful to shaping the desired behavior of an agent than negative rewards. +* For locomotion tasks, a small positive reward (+0.1) for forward velocity is typically used. +* If you want the agent to finish a task quickly, it is often helpful to provide a small penalty every step (-0.05) that the agent does not complete the task. In this case completion of the task should also coincide with the end of the episode. +* Overly-large negative rewards can cause undesirable behavior where an agent learns to avoid any behavior which might produce the negative reward, even if it is also behavior which can eventually lead to a positive reward. ## Vector Observations - -* Vector Observations should include all variables relevant to allowing the - agent to take the optimally informed decision. -* In cases where Vector Observations need to be remembered or compared over - time, increase the `Stacked Vectors` value to allow the agent to keep track of - multiple observations into the past. -* Categorical variables such as type of object (Sword, Shield, Bow) should be - encoded in one-hot fashion (i.e. `3` > `0, 0, 1`). -* Besides encoding non-numeric values, all inputs should be normalized to be in - the range 0 to +1 (or -1 to 1). For example, the `x` position information of - an agent where the maximum possible value is `maxValue` should be recorded as - `AddVectorObs(transform.position.x / maxValue);` rather than - `AddVectorObs(transform.position.x);`. See the equation below for one approach - of normalization. -* Positional information of relevant GameObjects should be encoded in relative - coordinates wherever possible. This is often relative to the agent position. +* Vector Observations should include all variables relevant to allowing the agent to take the optimally informed decision. +* In cases where Vector Observations need to be remembered or compared over time, increase the `Stacked Vectors` value to allow the agent to keep track of multiple observations into the past. +* Categorical variables such as type of object (Sword, Shield, Bow) should be encoded in one-hot fashion (i.e. `3` > `0, 0, 1`). +* Besides encoding non-numeric values, all inputs should be normalized to be in the range 0 to +1 (or -1 to 1). For example, the `x` position information of an agent where the maximum possible value is `maxValue` should be recorded as `AddVectorObs(transform.position.x / maxValue);` rather than `AddVectorObs(transform.position.x);`. See the equation below for one approach of normalization. +* Positional information of relevant GameObjects should be encoded in relative coordinates wherever possible. This is often relative to the agent position. ![normalization](images/normalization.png) ## Vector Actions - -* When using continuous control, action values should be clipped to an - appropriate range. The provided PPO model automatically clips these values - between -1 and 1, but third party training systems may not do so. -* Be sure to set the Vector Action's Space Size to the number of used Vector - Actions, and not greater, as doing the latter can interfere with the - efficiency of the training process. +* When using continuous control, action values should be clipped to an appropriate range. The provided PPO model automatically clips these values between -1 and 1, but third party training systems may not do so. +* Be sure to set the Vector Action's Space Size to the number of used Vector Actions, and not greater, as doing the latter can interfere with the efficiency of the training process. diff --git a/docs/Learning-Environment-Create-New.md b/docs/Learning-Environment-Create-New.md index 4aa469c95a..3ed4aa7089 100644 --- a/docs/Learning-Environment-Create-New.md +++ b/docs/Learning-Environment-Create-New.md @@ -1,110 +1,81 @@ # Making a New Learning Environment -This tutorial walks through the process of creating a Unity Environment. A Unity -Environment is an application built using the Unity Engine which can be used to -train Reinforcement Learning Agents. +This tutorial walks through the process of creating a Unity Environment. A Unity Environment is an application built using the Unity Engine which can be used to train Reinforcement Learning agents. ![A simple ML-Agents environment](images/mlagents-NewTutSplash.png) -In this example, we will train a ball to roll to a randomly placed cube. The -ball also learns to avoid falling off the platform. +In this example, we will train a ball to roll to a randomly placed cube. The ball also learns to avoid falling off the platform. ## Overview -Using the ML-Agents toolkit in a Unity project involves the following basic -steps: - -1. Create an environment for your agents to live in. An environment can range - from a simple physical simulation containing a few objects to an entire game - or ecosystem. -2. Implement an Academy subclass and add it to a GameObject in the Unity scene - containing the environment. This GameObject will serve as the parent for any - Brain objects in the scene. Your Academy class can implement a few optional - methods to update the scene independently of any agents. For example, you can - add, move, or delete agents and other entities in the environment. +Using the ML-Agents toolkit in a Unity project involves the following basic steps: + +1. Create an environment for your agents to live in. An environment can range from a simple physical simulation containing a few objects to an entire game or ecosystem. +2. Implement an Academy subclass and add it to a GameObject in the Unity scene containing the environment. This GameObject will serve as the parent for any Brain objects in the scene. Your Academy class can implement a few optional methods to update the scene independently of any agents. For example, you can add, move, or delete agents and other entities in the environment. 3. Add one or more Brain objects to the scene as children of the Academy. -4. Implement your Agent subclasses. An Agent subclass defines the code an Agent - uses to observe its environment, to carry out assigned actions, and to - calculate the rewards used for reinforcement training. You can also implement - optional methods to reset the Agent when it has finished or failed its task. -5. Add your Agent subclasses to appropriate GameObjects, typically, the object - in the scene that represents the Agent in the simulation. Each Agent object - must be assigned a Brain object. -6. If training, set the Brain type to External and - [run the training process](Training-ML-Agents.md). - -**Note:** If you are unfamiliar with Unity, refer to -[Learning the interface](https://docs.unity3d.com/Manual/LearningtheInterface.html) -in the Unity Manual if an Editor task isn't explained sufficiently in this -tutorial. +4. Implement your Agent subclasses. An Agent subclass defines the code an agent uses to observe its environment, to carry out assigned actions, and to calculate the rewards used for reinforcement training. You can also implement optional methods to reset the agent when it has finished or failed its task. +5. Add your Agent subclasses to appropriate GameObjects, typically, the object in the scene that represents the agent in the simulation. Each Agent object must be assigned a Brain object. +6. If training, set the Brain type to External and [run the training process](Training-ML-Agents.md). + +**Note:** If you are unfamiliar with Unity, refer to [Learning the interface](https://docs.unity3d.com/Manual/LearningtheInterface.html) in the Unity Manual if an Editor task isn't explained sufficiently in this tutorial. If you haven't already, follow the [installation instructions](Installation.md). ## Set Up the Unity Project -The first task to accomplish is simply creating a new Unity project and -importing the ML-Agents assets into it: +The first task to accomplish is simply creating a new Unity project and importing the ML-Agents assets into it: 1. Launch the Unity Editor and create a new project named "RollerBall". -2. In a file system window, navigate to the folder containing your cloned - ML-Agents repository. -3. Drag the `ML-Agents` folder from `UnitySDK/Assets` to the Unity Editor - Project window. + +2. In a file system window, navigate to the folder containing your cloned ML-Agents repository. + +3. Drag the `ML-Agents` folder from `unity-environments/Assets` to the Unity Editor Project window. Your Unity **Project** window should contain the following assets: ![Project window](images/mlagents-NewProject.png) -## Create the Environment +## Create the Environment: -Next, we will create a very simple scene to act as our ML-Agents environment. -The "physical" components of the environment include a Plane to act as the floor -for the Agent to move around on, a Cube to act as the goal or target for the -agent to seek, and a Sphere to represent the Agent itself. +Next, we will create a very simple scene to act as our ML-Agents environment. The "physical" components of the environment include a Plane to act as the floor for the agent to move around on, a Cube to act as the goal or target for the agent to seek, and a Sphere to represent the agent itself. -### Create the floor plane +**Create the floor plane:** 1. Right click in Hierarchy window, select 3D Object > Plane. 2. Name the GameObject "Floor." 3. Select Plane to view its properties in the Inspector window. 4. Set Transform to Position = (0,0,0), Rotation = (0,0,0), Scale = (1,1,1). -5. On the Plane's Mesh Renderer, expand the Materials property and change the - default-material to *floor*. +5. On the Plane's Mesh Renderer, expand the Materials property and change the default-material to *floor*. -(To set a new material, click the small circle icon next to the current material -name. This opens the **Object Picker** dialog so that you can choose the a -different material from the list of all materials currently in the project.) +(To set a new material, click the small circle icon next to the current material name. This opens the **Object Picker** dialog so that you can choose the a different material from the list of all materials currently in the project.) ![The Floor in the Inspector window](images/mlagents-NewTutFloor.png) -### Add the Target Cube +**Add the Target Cube** 1. Right click in Hierarchy window, select 3D Object > Cube. 2. Name the GameObject "Target" 3. Select Target to view its properties in the Inspector window. 4. Set Transform to Position = (3,0.5,3), Rotation = (0,0,0), Scale = (1,1,1). -5. On the Cube's Mesh Renderer, expand the Materials property and change the - default-material to *Block*. +5. On the Cube's Mesh Renderer, expand the Materials property and change the default-material to *Block*. ![The Target Cube in the Inspector window](images/mlagents-NewTutBlock.png) -### Add the Agent Sphere +**Add the Agent Sphere** 1. Right click in Hierarchy window, select 3D Object > Sphere. 2. Name the GameObject "RollerAgent" 3. Select Target to view its properties in the Inspector window. 4. Set Transform to Position = (0,0.5,0), Rotation = (0,0,0), Scale = (1,1,1). -5. On the Sphere's Mesh Renderer, expand the Materials property and change the - default-material to *checker 1*. +5. On the Sphere's Mesh Renderer, expand the Materials property and change the default-material to *checker 1*. 6. Click **Add Component**. -7. Add the Physics/Rigidbody component to the Sphere. (Adding a Rigidbody) +7. Add the Physics/Rigidbody component to the Sphere. (Adding a Rigidbody ) ![The Agent GameObject in the Inspector window](images/mlagents-NewTutSphere.png) -Note that we will create an Agent subclass to add to this GameObject as a -component later in the tutorial. +Note that we will create an Agent subclass to add to this GameObject as a component later in the tutorial. -### Add Empty GameObjects to Hold the Academy and Brain +**Add Empty GameObjects to Hold the Academy and Brain** 1. Right click in Hierarchy window, select Create Empty. 2. Name the GameObject "Academy" @@ -113,18 +84,13 @@ component later in the tutorial. ![The scene hierarchy](images/mlagents-NewTutHierarchy.png) -You can adjust the camera angles to give a better view of the scene at runtime. -The next steps will be to create and add the ML-Agent components. +You can adjust the camera angles to give a better view of the scene at runtime. The next steps will be to create and add the ML-Agent components. ## Implement an Academy -The Academy object coordinates the ML-Agents in the scene and drives the -decision-making portion of the simulation loop. Every ML-Agent scene needs one -Academy instance. Since the base Academy class is abstract, you must make your -own subclass even if you don't need to use any of the methods for a particular -environment. +The Academy object coordinates the ML-Agents in the scene and drives the decision-making portion of the simulation loop. Every ML-Agent scene needs one Academy instance. Since the base Academy class is abstract, you must make your own subclass even if you don't need to use any of the methods for a particular environment. -First, add a New Script component to the Academy GameObject created earlier: +First, add a New Script component to the Academy GameObject created earlier: 1. Select the Academy GameObject to view it in the Inspector window. 2. Click **Add Component**. @@ -134,15 +100,11 @@ First, add a New Script component to the Academy GameObject created earlier: Next, edit the new `RollerAcademy` script: -1. In the Unity Project window, double-click the `RollerAcademy` script to open - it in your code editor. (By default new scripts are placed directly in the - **Assets** folder.) +1. In the Unity Project window, double-click the `RollerAcademy` script to open it in your code editor. (By default new scripts are placed directly in the **Assets** folder.) 2. In the editor, change the base class from `MonoBehaviour` to `Academy`. 3. Delete the `Start()` and `Update()` methods that were added by default. -In such a basic scene, we don't need the Academy to initialize, reset, or -otherwise control any objects in the environment so we have the simplest -possible Academy implementation: +In such a basic scene, we don't need the Academy to initialize, reset, or otherwise control any objects in the environment so we have the simplest possible Academy implementation: ```csharp using MLAgents; @@ -150,28 +112,21 @@ using MLAgents; public class RollerAcademy : Academy { } ``` -The default settings for the Academy properties are also fine for this -environment, so we don't need to change anything for the RollerAcademy component -in the Inspector window. +The default settings for the Academy properties are also fine for this environment, so we don't need to change anything for the RollerAcademy component in the Inspector window. ![The Academy properties](images/mlagents-NewTutAcademy.png) ## Add a Brain -The Brain object encapsulates the decision making process. An Agent sends its -observations to its Brain and expects a decision in return. The Brain Type -setting determines how the Brain makes decisions. Unlike the Academy and Agent -classes, you don't make your own Brain subclasses. +The Brain object encapsulates the decision making process. An Agent sends its observations to its Brain and expects a decision in return. The Brain Type setting determines how the Brain makes decisions. Unlike the Academy and Agent classes, you don't make your own Brain subclasses. To create the Brain: -1. Select the Brain GameObject created earlier to show its properties in the - Inspector window. +1. Select the Brain GameObject created earlier to show its properties in the Inspector window. 2. Click **Add Component**. 3. Select the **Scripts/Brain** component to add it to the GameObject. -We will come back to the Brain properties later, but leave the Brain Type as -**Player** for now. +We will come back to the Brain properties later, but leave the Brain Type as **Player** for now. ![The Brain default properties](images/mlagents-NewTutBrain.png) @@ -187,52 +142,28 @@ To create the Agent: Then, edit the new `RollerAgent` script: -1. In the Unity Project window, double-click the `RollerAgent` script to open it - in your code editor. +1. In the Unity Project window, double-click the `RollerAgent` script to open it in your code editor. 2. In the editor, change the base class from `MonoBehaviour` to `Agent`. -3. Delete the `Update()` method, but we will use the `Start()` function, so - leave it alone for now. - -So far, these are the basic steps that you would use to add ML-Agents to any -Unity project. Next, we will add the logic that will let our Agent learn to roll -to the cube using reinforcement learning. - -In this simple scenario, we don't use the Academy object to control the -environment. If we wanted to change the environment, for example change the size -of the floor or add or remove agents or other objects before or during the -simulation, we could implement the appropriate methods in the Academy. Instead, -we will have the Agent do all the work of resetting itself and the target when -it succeeds or falls trying. - -### Initialization and Resetting the Agent - -When the Agent reaches its target, it marks itself done and its Agent reset -function moves the target to a random location. In addition, if the Agent rolls -off the platform, the reset function puts it back onto the floor. - -To move the target GameObject, we need a reference to its Transform (which -stores a GameObject's position, orientation and scale in the 3D world). To get -this reference, add a public field of type `Transform` to the RollerAgent class. -Public fields of a component in Unity get displayed in the Inspector window, -allowing you to choose which GameObject to use as the target in the Unity -Editor. To reset the Agent's velocity (and later to apply force to move the -agent) we need a reference to the Rigidbody component. A -[Rigidbody](https://docs.unity3d.com/ScriptReference/Rigidbody.html) is Unity's -primary element for physics simulation. (See -[Physics](https://docs.unity3d.com/Manual/PhysicsSection.html) for full -documentation of Unity physics.) Since the Rigidbody component is on the same -GameObject as our Agent script, the best way to get this reference is using -`GameObject.GetComponent()`, which we can call in our script's `Start()` -method. - -So far, our RollerAgent script looks like: +3. Delete the `Update()` method, but we will use the `Start()` function, so leave it alone for now. + +So far, these are the basic steps that you would use to add ML-Agents to any Unity project. Next, we will add the logic that will let our agent learn to roll to the cube using reinforcement learning. + +In this simple scenario, we don't use the Academy object to control the environment. If we wanted to change the environment, for example change the size of the floor or add or remove agents or other objects before or during the simulation, we could implement the appropriate methods in the Academy. Instead, we will have the Agent do all the work of resetting itself and the target when it succeeds or falls trying. + +**Initialization and Resetting the Agent** + +When the agent reaches its target, it marks itself done and its agent reset function moves the target to a random location. In addition, if the agent rolls off the platform, the reset function puts it back onto the floor. + +To move the target GameObject, we need a reference to its Transform (which stores a GameObject's position, orientation and scale in the 3D world). To get this reference, add a public field of type `Transform` to the RollerAgent class. Public fields of a component in Unity get displayed in the Inspector window, allowing you to choose which GameObject to use as the target in the Unity Editor. To reset the agent's velocity (and later to apply force to move the agent) we need a reference to the Rigidbody component. A [Rigidbody](https://docs.unity3d.com/ScriptReference/Rigidbody.html) is Unity's primary element for physics simulation. (See [Physics](https://docs.unity3d.com/Manual/PhysicsSection.html) for full documentation of Unity physics.) Since the Rigidbody component is on the same GameObject as our Agent script, the best way to get this reference is using `GameObject.GetComponent()`, which we can call in our script's `Start()` method. + +So far, our RollerAgent script looks like: ```csharp using System.Collections.Generic; using UnityEngine; using MLAgents; -public class RollerAgent : Agent +public class RollerAgent : Agent { Rigidbody rBody; void Start () { @@ -243,14 +174,14 @@ public class RollerAgent : Agent public override void AgentReset() { if (this.transform.position.y < -1.0) - { - // The Agent fell + { + // The agent fell this.transform.position = Vector3.zero; this.rBody.angularVelocity = Vector3.zero; this.rBody.velocity = Vector3.zero; } else - { + { // Move the target to a new spot Target.position = new Vector3(Random.value * 8 - 4, 0.5f, @@ -260,24 +191,15 @@ public class RollerAgent : Agent } ``` -Next, let's implement the Agent.CollectObservations() function. +Next, let's implement the Agent.CollectObservations() function. -### Observing the Environment +**Observing the Environment** -The Agent sends the information we collect to the Brain, which uses it to make a -decision. When you train the Agent (or use a trained model), the data is fed -into a neural network as a feature vector. For an Agent to successfully learn a -task, we need to provide the correct information. A good rule of thumb for -deciding what information to collect is to consider what you would need to -calculate an analytical solution to the problem. +The Agent sends the information we collect to the Brain, which uses it to make a decision. When you train the agent (or use a trained model), the data is fed into a neural network as a feature vector. For an agent to successfully learn a task, we need to provide the correct information. A good rule of thumb for deciding what information to collect is to consider what you would need to calculate an analytical solution to the problem. -In our case, the information our Agent collects includes: +In our case, the information our agent collects includes: -* Position of the target. In general, it is better to use the relative position - of other objects rather than the absolute position for more generalizable - training. Note that the Agent only collects the x and z coordinates since the - floor is aligned with the x-z plane and the y component of the target's - position never changes. +* Position of the target. In general, it is better to use the relative position of other objects rather than the absolute position for more generalizable training. Note that the agent only collects the x and z coordinates since the floor is aligned with the x-z plane and the y component of the target's position never changes. ```csharp // Calculate relative position @@ -288,8 +210,7 @@ AddVectorObs(relativePosition.x / 5); AddVectorObs(relativePosition.z / 5); ``` -* Position of the Agent itself within the confines of the floor. This data is - collected as the Agent's distance from each edge of the floor. +* Position of the agent itself within the confines of the floor. This data is collected as the agent's distance from each edge of the floor. ```csharp // Distance to edges of platform @@ -299,8 +220,7 @@ AddVectorObs((this.transform.position.z + 5) / 5); AddVectorObs((this.transform.position.z - 5) / 5); ``` -* The velocity of the Agent. This helps the Agent learn to control its speed so - it doesn't overshoot the target and roll off the platform. +* The velocity of the agent. This helps the agent learn to control its speed so it doesn't overshoot the target and roll off the platform. ```csharp // Agent velocity @@ -308,56 +228,39 @@ AddVectorObs(rBody.velocity.x / 5); AddVectorObs(rBody.velocity.z / 5); ``` -All the values are divided by 5 to normalize the inputs to the neural network to -the range [-1,1]. (The number five is used because the platform is 10 units -across.) +All the values are divided by 5 to normalize the inputs to the neural network to the range [-1,1]. (The number five is used because the platform is 10 units across.) -In total, the state observation contains 8 values and we need to use the -continuous state space when we get around to setting the Brain properties: +In total, the state observation contains 8 values and we need to use the continuous state space when we get around to setting the Brain properties: ```csharp public override void CollectObservations() { // Calculate relative position Vector3 relativePosition = Target.position - this.transform.position; - + // Relative position AddVectorObs(relativePosition.x/5); AddVectorObs(relativePosition.z/5); - + // Distance to edges of platform AddVectorObs((this.transform.position.x + 5)/5); AddVectorObs((this.transform.position.x - 5)/5); AddVectorObs((this.transform.position.z + 5)/5); AddVectorObs((this.transform.position.z - 5)/5); - + // Agent velocity AddVectorObs(rBody.velocity.x/5); AddVectorObs(rBody.velocity.z/5); } ``` -The final part of the Agent code is the Agent.AgentAction() function, which -receives the decision from the Brain. +The final part of the Agent code is the Agent.AgentAction() function, which receives the decision from the Brain. -### Actions +**Actions** -The decision of the Brain comes in the form of an action array passed to the -`AgentAction()` function. The number of elements in this array is determined by -the `Vector Action Space Type` and `Vector Action Space Size` settings of the -agent's Brain. The RollerAgent uses the continuous vector action space and needs -two continuous control signals from the Brain. Thus, we will set the Brain -`Vector Action Size` to 2. The first element,`action[0]` determines the force -applied along the x axis; `action[1]` determines the force applied along the z -axis. (If we allowed the Agent to move in three dimensions, then we would need -to set `Vector Action Size` to 3. Each of these values returned by the network -are between `-1` and `1.` Note the Brain really has no idea what the values in -the action array mean. The training process just adjusts the action values in -response to the observation input and then sees what kind of rewards it gets as -a result. +The decision of the Brain comes in the form of an action array passed to the `AgentAction()` function. The number of elements in this array is determined by the `Vector Action Space Type` and `Vector Action Space Size` settings of the agent's Brain. The RollerAgent uses the continuous vector action space and needs two continuous control signals from the brain. Thus, we will set the Brain `Vector Action Size` to 2. The first element,`action[0]` determines the force applied along the x axis; `action[1]` determines the force applied along the z axis. (If we allowed the agent to move in three dimensions, then we would need to set `Vector Action Size` to 3. Each of these values returned by the network are between `-1` and `1.` Note the Brain really has no idea what the values in the action array mean. The training process just adjusts the action values in response to the observation input and then sees what kind of rewards it gets as a result. -The RollerAgent applies the values from the action[] array to its Rigidbody -component, `rBody`, using the `Rigidbody.AddForce` function: +The RollerAgent applies the values from the action[] array to its Rigidbody component, `rBody`, using the `Rigidbody.AddForce` function: ```csharp Vector3 controlSignal = Vector3.zero; @@ -366,22 +269,11 @@ controlSignal.z = action[1]; rBody.AddForce(controlSignal * speed); ``` -### Rewards +**Rewards** -Reinforcement learning requires rewards. Assign rewards in the `AgentAction()` -function. The learning algorithm uses the rewards assigned to the Agent at each -step in the simulation and learning process to determine whether it is giving -the Agent the optimal actions. You want to reward an Agent for completing the -assigned task (reaching the Target cube, in this case) and punish the Agent if -it irrevocably fails (falls off the platform). You can sometimes speed up -training with sub-rewards that encourage behavior that helps the Agent complete -the task. For example, the RollerAgent reward system provides a small reward if -the Agent moves closer to the target in a step and a small negative reward at -each step which encourages the Agent to complete its task quickly. +Reinforcement learning requires rewards. Assign rewards in the `AgentAction()` function. The learning algorithm uses the rewards assigned to the agent at each step in the simulation and learning process to determine whether it is giving the agent the optimal actions. You want to reward an agent for completing the assigned task (reaching the Target cube, in this case) and punish the agent if it irrevocably fails (falls off the platform). You can sometimes speed up training with sub-rewards that encourage behavior that helps the agent complete the task. For example, the RollerAgent reward system provides a small reward if the agent moves closer to the target in a step and a small negative reward at each step which encourages the agent to complete its task quickly. -The RollerAgent calculates the distance to detect when it reaches the target. -When it does, the code increments the Agent.reward variable by 1.0 and marks the -agent as finished by setting the Agent to done. +The RollerAgent calculates the distance to detect when it reaches the target. When it does, the code increments the Agent.reward variable by 1.0 and marks the agent as finished by setting the agent to done. ```csharp float distanceToTarget = Vector3.Distance(this.transform.position, @@ -394,24 +286,26 @@ if (distanceToTarget < 1.42f) } ``` -**Note:** When you mark an Agent as done, it stops its activity until it is -reset. You can have the Agent reset immediately, by setting the -Agent.ResetOnDone property to true in the inspector or you can wait for the -Academy to reset the environment. This RollerBall environment relies on the -`ResetOnDone` mechanism and doesn't set a `Max Steps` limit for the Academy (so -it never resets the environment). +**Note:** When you mark an agent as done, it stops its activity until it is reset. You can have the agent reset immediately, by setting the Agent.ResetOnDone property to true in the inspector or you can wait for the Academy to reset the environment. This RollerBall environment relies on the `ResetOnDone` mechanism and doesn't set a `Max Steps` limit for the Academy (so it never resets the environment). -It can also encourage an Agent to finish a task more quickly to assign a -negative reward at each step: +To encourage the agent along, we also reward it for getting closer to the target (saving the previous distance measurement between steps): + +```csharp +// Getting closer +if (distanceToTarget < previousDistance) +{ + AddReward(0.1f); +} +``` + +It can also encourage an agent to finish a task more quickly to assign a negative reward at each step: ```csharp // Time penalty AddReward(-0.05f); ``` -Finally, to punish the Agent for falling off the platform, assign a large -negative reward and, of course, set the Agent to done so that it resets itself -in the next step: +Finally, to punish the agent for falling off the platform, assign a large negative reward and, of course, set the agent to done so that it resets itself in the next step: ```csharp // Fell off platform @@ -422,10 +316,9 @@ if (this.transform.position.y < -1.0) } ``` -### AgentAction() - -With the action and reward logic outlined above, the final version of the -`AgentAction()` function looks like: +**AgentAction()** + +With the action and reward logic outlined above, the final version of the `AgentAction()` function looks like: ```csharp public float speed = 10; @@ -434,15 +327,21 @@ private float previousDistance = float.MaxValue; public override void AgentAction(float[] vectorAction, string textAction) { // Rewards - float distanceToTarget = Vector3.Distance(this.transform.position, + float distanceToTarget = Vector3.Distance(this.transform.position, Target.position); - + // Reached target if (distanceToTarget < 1.42f) { AddReward(1.0f); Done(); } + + // Getting closer + if (distanceToTarget < previousDistance) + { + AddReward(0.1f); + } // Time penalty AddReward(-0.05f); @@ -453,6 +352,7 @@ public override void AgentAction(float[] vectorAction, string textAction) AddReward(-1.0f); Done(); } + previousDistance = distanceToTarget; // Actions, size = 2 Vector3 controlSignal = Vector3.zero; @@ -462,32 +362,21 @@ public override void AgentAction(float[] vectorAction, string textAction) } ``` -Note the `speed` and `previousDistance` class variables defined before the -function. Since `speed` is public, you can set the value from the Inspector -window. +Note the `speed` and `previousDistance` class variables defined before the function. Since `speed` is public, you can set the value from the Inspector window. ## Final Editor Setup -Now, that all the GameObjects and ML-Agent components are in place, it is time -to connect everything together in the Unity Editor. This involves assigning the -Brain object to the Agent, changing some of the Agent Components properties, and -setting the Brain properties so that they are compatible with our Agent code. +Now, that all the GameObjects and ML-Agent components are in place, it is time to connect everything together in the Unity Editor. This involves assigning the Brain object to the Agent and setting the Brain properties so that they are compatible with our agent code. -1. Expand the Academy GameObject in the Hierarchy window, so that the Brain - object is visible. -2. Select the RollerAgent GameObject to show its properties in the Inspector - window. -3. Drag the Brain object from the Hierarchy window to the RollerAgent Brain - field. -4. Change `Decision Frequency` from `1` to `5`. +1. Expand the Academy GameObject in the Hierarchy window, so that the Brain object is visible. +2. Select the RollerAgent GameObject to show its properties in the Inspector window. +3. Drag the Brain object from the Hierarchy window to the RollerAgent Brain field. ![Assign the Brain to the RollerAgent](images/mlagents-NewTutAssignBrain.png) -Also, drag the Target GameObject from the Hierarchy window to the RollerAgent -Target field. +Also, drag the Target GameObject from the Hierarchy window to the RollerAgent Target field. -Finally, select the Brain GameObject so that you can see its properties in the -Inspector window. Set the following properties: +Finally, select the Brain GameObject so that you can see its properties in the Inspector window. Set the following properties: * `Vector Observation Space Type` = **Continuous** * `Vector Observation Space Size` = 8 @@ -499,18 +388,11 @@ Now you are ready to test the environment before training. ## Testing the Environment -It is always a good idea to test your environment manually before embarking on -an extended training run. The reason we have left the Brain set to the -**Player** type is so that we can control the Agent using direct keyboard -control. But first, you need to define the keyboard to action mapping. Although -the RollerAgent only has an `Action Size` of two, we will use one key to specify -positive values and one to specify negative values for each action, for a total -of four keys. +It is always a good idea to test your environment manually before embarking on an extended training run. The reason we have left the Brain set to the **Player** type is so that we can control the agent using direct keyboard control. But first, you need to define the keyboard to action mapping. Although the RollerAgent only has an `Action Size` of two, we will use one key to specify positive values and one to specify negative values for each action, for a total of four keys. 1. Select the Brain GameObject to view its properties in the Inspector. 2. Set **Brain Type** to **Player**. -3. Expand the **Continuous Player Actions** dictionary (only visible when using - the **Player* brain). +3. Expand the **Continuous Player Actions** dictionary (only visible when using the **Player* brain). 4. Set **Size** to 4. 5. Set the following mappings: @@ -521,44 +403,31 @@ of four keys. | Element 2 | W | 1 | 1 | | Element 3 | S | 1 | -1 | -The **Index** value corresponds to the index of the action array passed to -`AgentAction()` function. **Value** is assigned to action[Index] when **Key** is -pressed. +The **Index** value corresponds to the index of the action array passed to `AgentAction()` function. **Value** is assigned to action[Index] when **Key** is pressed. -Press **Play** to run the scene and use the WASD keys to move the Agent around -the platform. Make sure that there are no errors displayed in the Unity editor -Console window and that the Agent resets when it reaches its target or falls -from the platform. Note that for more involved debugging, the ML-Agents SDK -includes a convenient Monitor class that you can use to easily display Agent -status information in the Game window. +Press **Play** to run the scene and use the WASD keys to move the agent around the platform. Make sure that there are no errors displayed in the Unity editor Console window and that the agent resets when it reaches its target or falls from the platform. Note that for more involved debugging, the ML-Agents SDK includes a convenient Monitor class that you can use to easily display agent status information in the Game window. -One additional test you can perform is to first ensure that your environment and -the Python API work as expected using the `notebooks/getting-started.ipynb` -[Jupyter notebook](Background-Jupyter.md). Within the notebook, be sure to set -`env_name` to the name of the environment file you specify when building this -environment. +One additional test you can perform is to first ensure that your environment +and the Python API work as expected using the `python/Basics` +[Jupyter notebook](Background-Jupyter.md). Within `Basics`, be sure to set +`env_name` to the name of the environment file you specify when building +this environment. -Now you can train the Agent. To get ready for training, you must first to change -the **Brain Type** from **Player** to **External**. From there, the process is -the same as described in [Training ML-Agents](Training-ML-Agents.md). +Now you can train the Agent. To get ready for training, you must first to change the **Brain Type** from **Player** to **External**. From there, the process is the same as described in [Training ML-Agents](Training-ML-Agents.md). ## Review: Scene Layout -This section briefly reviews how to organize your scene when using Agents in -your Unity environment. - -There are three kinds of game objects you need to include in your scene in order -to use Unity ML-Agents: +This section briefly reviews how to organize your scene when using +Agents in your Unity environment. -* Academy -* Brain -* Agents +There are three kinds of game objects you need to include in your scene in order to use Unity ML-Agents: + * Academy + * Brain + * Agents Keep in mind: - -* There can only be one Academy game object in a scene. -* You can have multiple Brain game objects but they must be child of the Academy - game object. + * There can only be one Academy game object in a scene. + * You can have multiple Brain game objects but they must be child of the Academy game object. Here is an example of what your scene hierarchy should look like: diff --git a/docs/Learning-Environment-Design-Academy.md b/docs/Learning-Environment-Design-Academy.md index 56420d9f8c..d5427dd249 100644 --- a/docs/Learning-Environment-Design-Academy.md +++ b/docs/Learning-Environment-Design-Academy.md @@ -1,9 +1,6 @@ # Creating an Academy -An Academy orchestrates all the Agent and Brain objects in a Unity scene. Every -scene containing Agents must contain a single Academy. To use an Academy, you -must create your own subclass. However, all the methods you can override are -optional. +An Academy orchestrates all the Agent and Brain objects in a Unity scene. Every scene containing agents must contain a single Academy. To use an Academy, you must create your own subclass. However, all the methods you can override are optional. Use the Academy methods to: @@ -11,55 +8,33 @@ Use the Academy methods to: * Reset the environment * Change things in the environment at each simulation step -See [Reinforcement Learning in Unity](Learning-Environment-Design.md) for a -description of the timing of these method calls during a simulation. +See [Reinforcement Learning in Unity](Learning-Environment-Design.md) for a description of the timing of these method calls during a simulation. ## Initializing an Academy -Initialization is performed once in an Academy object's lifecycle. Use the -`InitializeAcademy()` method for any logic you would normally perform in the -standard Unity `Start()` or `Awake()` methods. +Initialization is performed once in an Academy object's lifecycle. Use the `InitializeAcademy()` method for any logic you would normally perform in the standard Unity `Start()` or `Awake()` methods. -**Note:** Because the base Academy implements a `Awake()` function, you must not -implement your own. Because of the way the Unity MonoBehaviour class is defined, -implementing your own `Awake()` function hides the base class version and Unity -will call yours instead. Likewise, do not implement a `FixedUpdate()` function -in your Academy subclass. +**Note:** Because the base Academy implements a `Awake()` function, you must not implement your own. Because of the way the Unity MonoBehaviour class is defined, implementing your own `Awake()` function hides the base class version and Unity will call yours instead. Likewise, do not implement a `FixedUpdate()` function in your Academy subclass. ## Resetting an Environment -Implement an `AcademyReset()` function to alter the environment at the start of -each episode. For example, you might want to reset an Agent to its starting -position or move a goal to a random position. An environment resets when the -Academy `Max Steps` count is reached. +Implement an `AcademyReset()` function to alter the environment at the start of each episode. For example, you might want to reset an agent to its starting position or move a goal to a random position. An environment resets when the Academy `Max Steps` count is reached. -When you reset an environment, consider the factors that should change so that -training is generalizable to different conditions. For example, if you were -training a maze-solving agent, you would probably want to change the maze itself -for each training episode. Otherwise, the agent would probably on learn to solve -one, particular maze, not mazes in general. +When you reset an environment, consider the factors that should change so that training is generalizable to different conditions. For example, if you were training a maze-solving agent, you would probably want to change the maze itself for each training episode. Otherwise, the agent would probably on learn to solve one, particular maze, not mazes in general. ## Controlling an Environment -The `AcademyStep()` function is called at every step in the simulation before -any Agents are updated. Use this function to update objects in the environment -at every step or during the episode between environment resets. For example, if -you want to add elements to the environment at random intervals, you can put the -logic for creating them in the `AcademyStep()` function. +The `AcademyStep()` function is called at every step in the simulation before any agents are updated. Use this function to update objects in the environment at every step or during the episode between environment resets. For example, if you want to add elements to the environment at random intervals, you can put the logic for creating them in the `AcademyStep()` function. ## Academy Properties ![Academy Inspector](images/academy.png) -* `Max Steps` - Total number of steps per-episode. `0` corresponds to episodes - without a maximum number of steps. Once the step counter reaches maximum, the - environment will reset. -* `Configuration` - The engine-level settings which correspond to rendering - quality and engine speed. - * `Width` - Width of the environment window in pixels. - * `Height` - Width of the environment window in pixels. - * `Quality Level` - Rendering quality of environment. (Higher is better) - * `Time Scale` - Speed at which environment is run. (Higher is faster) - * `Target Frame Rate` - FPS engine attempts to maintain. -* `Reset Parameters` - List of custom parameters that can be changed in the - environment on reset. +* `Max Steps` - Total number of steps per-episode. `0` corresponds to episodes without a maximum number of steps. Once the step counter reaches maximum, the environment will reset. +* `Configuration` - The engine-level settings which correspond to rendering quality and engine speed. + * `Width` - Width of the environment window in pixels. + * `Height` - Width of the environment window in pixels. + * `Quality Level` - Rendering quality of environment. (Higher is better) + * `Time Scale` - Speed at which environment is run. (Higher is faster) + * `Target Frame Rate` - FPS engine attempts to maintain. +* `Reset Parameters` - List of custom parameters that can be changed in the environment on reset. diff --git a/docs/Learning-Environment-Design-Agents.md b/docs/Learning-Environment-Design-Agents.md index f73cdb3602..369f1278ea 100644 --- a/docs/Learning-Environment-Design-Agents.md +++ b/docs/Learning-Environment-Design-Agents.md @@ -1,103 +1,47 @@ # Agents -An agent is an actor that can observe its environment and decide on the best -course of action using those observations. Create Agents in Unity by extending -the Agent class. The most important aspects of creating agents that can -successfully learn are the observations the agent collects for -reinforcement learning and the reward you assign to estimate the value of the -agent's current state toward accomplishing its tasks. - -An Agent passes its observations to its Brain. The Brain, then, makes a decision -and passes the chosen action back to the agent. Your agent code must execute the -action, for example, move the agent in one direction or another. In order to -[train an agent using reinforcement learning](Learning-Environment-Design.md), -your agent must calculate a reward value at each action. The reward is used to -discover the optimal decision-making policy. (A reward is not used by already -trained agents or for imitation learning.) - -The Brain class abstracts out the decision making logic from the Agent itself so -that you can use the same Brain in multiple Agents. How a Brain makes its -decisions depends on the type of Brain it is. An **External** Brain simply -passes the observations from its Agents to an external process and then passes -the decisions made externally back to the Agents. An **Internal** Brain uses the -trained policy parameters to make decisions (and no longer adjusts the -parameters in search of a better decision). The other types of Brains do not -directly involve training, but you might find them useful as part of a training -project. See [Brains](Learning-Environment-Design-Brains.md). +An agent is an actor that can observe its environment and decide on the best course of action using those observations. Create agents in Unity by extending the Agent class. The most important aspects of creating agents that can successfully learn are the observations the agent collects and, for reinforcement learning, the reward you assign to estimate the value of the agent's current state toward accomplishing its tasks. + +An agent passes its observations to its brain. The brain, then, makes a decision and passes the chosen action back to the agent. Your agent code must execute the action, for example, move the agent in one direction or another. In order to [train an agent using reinforcement learning](Learning-Environment-Design.md), your agent must calculate a reward value at each action. The reward is used to discover the optimal decision-making policy. (A reward is not used by already trained agents or for imitation learning.) + +The Brain class abstracts out the decision making logic from the agent itself so that you can use the same brain in multiple agents. +How a brain makes its decisions depends on the type of brain it is. An **External** brain simply passes the observations from its agents to an external process and then passes the decisions made externally back to the agents. An **Internal** brain uses the trained policy parameters to make decisions (and no longer adjusts the parameters in search of a better decision). The other types of brains do not directly involve training, but you might find them useful as part of a training project. See [Brains](Learning-Environment-Design-Brains.md). ## Decisions -The observation-decision-action-reward cycle repeats after a configurable number -of simulation steps (the frequency defaults to once-per-step). You can also set -up an Agent to request decisions on demand. Making decisions at regular step -intervals is generally most appropriate for physics-based simulations. Making -decisions on demand is generally appropriate for situations where Agents only -respond to specific events or take actions of variable duration. For example, an -agent in a robotic simulator that must provide fine-control of joint torques -should make its decisions every step of the simulation. On the other hand, an -agent that only needs to make decisions when certain game or simulation events -occur, should use on-demand decision making. - -To control the frequency of step-based decision making, set the **Decision -Frequency** value for the Agent object in the Unity Inspector window. Agents -using the same Brain instance can use a different frequency. During simulation -steps in which no decision is requested, the Agent receives the same action -chosen by the previous decision. +The observation-decision-action-reward cycle repeats after a configurable number of simulation steps (the frequency defaults to once-per-step). You can also set up an agent to request decisions on demand. Making decisions at regular step intervals is generally most appropriate for physics-based simulations. Making decisions on demand is generally appropriate for situations where agents only respond to specific events or take actions of variable duration. For example, an agent in a robotic simulator that must provide fine-control of joint torques should make its decisions every step of the simulation. On the other hand, an agent that only needs to make decisions when certain game or simulation events occur, should use on-demand decision making. + +To control the frequency of step-based decision making, set the **Decision Frequency** value for the Agent object in the Unity Inspector window. Agents using the same Brain instance can use a different frequency. During simulation steps in which no decision is requested, the agent receives the same action chosen by the previous decision. ### On Demand Decision Making -On demand decision making allows Agents to request decisions from their Brains -only when needed instead of receiving decisions at a fixed frequency. This is -useful when the agents commit to an action for a variable number of steps or -when the agents cannot make decisions at the same time. This typically the case -for turn based games, games where agents must react to events or games where -agents can take actions of variable duration. +On demand decision making allows agents to request decisions from their +brains only when needed instead of receiving decisions at a fixed +frequency. This is useful when the agents commit to an action for a +variable number of steps or when the agents cannot make decisions +at the same time. This typically the case for turn based games, games +where agents must react to events or games where agents can take +actions of variable duration. -When you turn on **On Demand Decisions** for an Agent, your agent code must call -the `Agent.RequestDecision()` function. This function call starts one iteration -of the observation-decision-action-reward cycle. The Brain invokes the Agent's -`CollectObservations()` method, makes a decision and returns it by calling the -`AgentAction()` method. The Brain waits for the Agent to request the next -decision before starting another iteration. +When you turn on **On Demand Decisions** for an agent, your agent code must call the `Agent.RequestDecision()` function. This function call starts one iteration of the observation-decision-action-reward cycle. The Brain invokes the agent's `CollectObservations()` method, makes a decision and returns it by calling the `AgentAction()` method. The Brain waits for the agent to request the next decision before starting another iteration. ## Observations -To make decisions, an agent must observe its environment in order to infer the -state of the world. A state observation can take the following forms: +To make decisions, an agent must observe its environment to determine its current state. A state observation can take the following forms: -* **Vector Observation** — a feature vector consisting of an array of floating - point numbers. +* **Continuous Vector** — a feature vector consisting of an array of numbers. +* **Discrete Vector** — an index into a state table (typically only useful for the simplest of environments). * **Visual Observations** — one or more camera images. -When you use vector observations for an Agent, implement the -`Agent.CollectObservations()` method to create the feature vector. When you use -**Visual Observations**, you only need to identify which Unity Camera objects -will provide images and the base Agent class handles the rest. You do not need -to implement the `CollectObservations()` method when your Agent uses visual -observations (unless it also uses vector observations). - -### Vector Observation Space: Feature Vectors - -For agents using a continuous state space, you create a feature vector to -represent the agent's observation at each step of the simulation. The Brain -class calls the `CollectObservations()` method of each of its Agents. Your -implementation of this function must call `AddVectorObs` to add vector -observations. - -The observation must include all the information an agents needs to accomplish -its task. Without sufficient and relevant information, an agent may learn poorly -or may not learn at all. A reasonable approach for determining what information -should be included is to consider what you would need to calculate an analytical -solution to the problem. - -For examples of various state observation functions, you can look at the -[example environments](Learning-Environment-Examples.md) included in the -ML-Agents SDK. For instance, the 3DBall example uses the rotation of the -platform, the relative position of the ball, and the velocity of the ball as its -state observation. As an experiment, you can remove the velocity components from -the observation and retrain the 3DBall agent. While it will learn to balance the -ball reasonably well, the performance of the agent without using velocity is -noticeably worse. +When you use the **Continuous** or **Discrete** vector observation space for an agent, implement the `Agent.CollectObservations()` method to create the feature vector or state index. When you use **Visual Observations**, you only need to identify which Unity Camera objects will provide images and the base Agent class handles the rest. You do not need to implement the `CollectObservations()` method when your agent uses visual observations (unless it also uses vector observations). + +### Continuous Vector Observation Space: Feature Vectors + +For agents using a continuous state space, you create a feature vector to represent the agent's observation at each step of the simulation. The Brain class calls the `CollectObservations()` method of each of its agents. Your implementation of this function must call `AddVectorObs` to add vector observations. + +The observation must include all the information an agent needs to accomplish its task. Without sufficient and relevant information, an agent may learn poorly or may not learn at all. A reasonable approach for determining what information should be included is to consider what you would need to calculate an analytical solution to the problem. + +For examples of various state observation functions, you can look at the [example environments](Learning-Environment-Examples.md) included in the ML-Agents SDK. For instance, the 3DBall example uses the rotation of the platform, the relative position of the ball, and the velocity of the ball as its state observation. As an experiment, you can remove the velocity components from the observation and retrain the 3DBall agent. While it will learn to balance the ball reasonably well, the performance of the agent without using velocity is noticeably worse. ```csharp public GameObject ball; @@ -116,32 +60,23 @@ public override void CollectObservations() } ``` -The feature vector must always contain the same number of elements and -observations must always be in the same position within the list. If the number -of observed entities in an environment can vary you can pad the feature vector -with zeros for any missing entities in a specific observation or you can limit -an agent's observations to a fixed subset. For example, instead of observing -every enemy agent in an environment, you could only observe the closest five. +The feature vector must always contain the same number of elements and observations must always be in the same position within the list. If the number of observed entities in an environment can vary you can pad the feature vector with zeros for any missing entities in a specific observation or you can limit an agent's observations to a fixed subset. For example, instead of observing every enemy agent in an environment, you could only observe the closest five. -When you set up an Agent's Brain in the Unity Editor, set the following -properties to use a continuous vector observation: +When you set up an Agent's brain in the Unity Editor, set the following properties to use a continuous vector observation: -* **Space Size** — The state size must match the length of your feature vector. -* **Brain Type** — Set to **External** during training; set to **Internal** to - use the trained model. +**Space Size** — The state size must match the length of your feature vector. +**Space Type** — Set to **Continuous**. +**Brain Type** — Set to **External** during training; set to **Internal** to use the trained model. -The observation feature vector is a list of floating point numbers, which means -you must convert any other data types to a float or a list of floats. +The observation feature vector is a list of floating point numbers, which means you must convert any other data types to a float or a list of floats. -Integers can be be added directly to the observation vector. You must explicitly -convert Boolean values to a number: +Integers can be be added directly to the observation vector. You must explicitly convert Boolean values to a number: ```csharp AddVectorObs(isTrueOrFalse ? 1 : 0); ``` -For entities like positions and rotations, you can add their components to the -feature list individually. For example: +For entities like positions and rotations, you can add their components to the feature list individually. For example: ```csharp Vector3 speed = ball.transform.GetComponent().velocity; @@ -150,12 +85,7 @@ AddVectorObs(speed.y); AddVectorObs(speed.z); ``` -Type enumerations should be encoded in the _one-hot_ style. That is, add an -element to the feature vector for each element of enumeration, setting the -element representing the observed member to one and set the rest to zero. For -example, if your enumeration contains \[Sword, Shield, Bow\] and the agent -observes that the current item is a Bow, you would add the elements: 0, 0, 1 to -the feature vector. The following code example illustrates how to add. +Type enumerations should be encoded in the _one-hot_ style. That is, add an element to the feature vector for each element of enumeration, setting the element representing the observed member to one and set the rest to zero. For example, if your enumeration contains \[Sword, Shield, Bow\] and the agent observes that the current item is a Bow, you would add the elements: 0, 0, 1 to the feature vector. The following code example illustrates how to add ```csharp enum CarriedItems { Sword, Shield, Bow, LastItem } @@ -164,20 +94,14 @@ public override void CollectObservations() { for (int ci = 0; ci < (int)CarriedItems.LastItem; ci++) { - AddVectorObs((int)currentItem == ci ? 1.0f : 0.0f); + AddVectorObs((int)currentItem == ci ? 1.0f : 0.0f); } } ``` #### Normalization -For the best results when training, you should normalize the components of your -feature vector to the range [-1, +1] or [0, 1]. When you normalize the values, -the PPO neural network can often converge to a solution faster. Note that it -isn't always necessary to normalize to these recommended ranges, but it is -considered a best practice when using neural networks. The greater the variation -in ranges between the components of your observation, the more likely that -training will be affected. +For the best results when training, you should normalize the components of your feature vector to the range [-1, +1] or [0, 1]. When you normalize the values, the PPO neural network can often converge to a solution faster. Note that it isn't always necessary to normalize to these recommended ranges, but it is considered a best practice when using neural networks. The greater the variation in ranges between the components of your observation, the more likely that training will be affected. To normalize a value to [0, 1], you can use the following formula: @@ -185,8 +109,7 @@ To normalize a value to [0, 1], you can use the following formula: normalizedValue = (currentValue - minValue)/(maxValue - minValue) ``` -Rotations and angles should also be normalized. For angles between 0 and 360 -degrees, you can use the following formulas: +Rotations and angles should also be normalized. For angles between 0 and 360 degrees, you can use the following formulas: ```csharp Quaternion rotation = transform.rotation; @@ -194,97 +117,56 @@ Vector3 normalized = rotation.eulerAngles / 180.0f - Vector3.one; // [-1,1] Vector3 normalized = rotation.eulerAngles / 360.0f; // [0,1] ``` -For angles that can be outside the range [0,360], you can either reduce the -angle, or, if the number of turns is significant, increase the maximum value -used in your normalization formula. - +For angles that can be outside the range [0,360], you can either reduce the angle, or, if the number of turns is significant, increase the maximum value used in your normalization formula. + ### Multiple Visual Observations -Camera observations use rendered textures from one or more cameras in a scene. -The Brain vectorizes the textures into a 3D Tensor which can be fed into a -convolutional neural network (CNN). For more information on CNNs, see [this -guide](http://cs231n.github.io/convolutional-networks/). You can use camera -observations along side vector observations. +Camera observations use rendered textures from one or more cameras in a scene. The brain vectorizes the textures into a 3D Tensor which can be fed into a convolutional neural network (CNN). For more information on CNNs, see [this guide](http://cs231n.github.io/convolutional-networks/). You can use camera observations and either continuous feature vector or discrete state observations at the same time. + +Agents using camera images can capture state of arbitrary complexity and are useful when the state is difficult to describe numerically. However, they are also typically less efficient and slower to train, and sometimes don't succeed at all. + +To add a visual observation to an agent, click on the `Add Camera` button in the Agent inspector. Then drag the camera you want to add to the `Camera` field. You can have more than one camera attached to an agent. -Agents using camera images can capture state of arbitrary complexity and are -useful when the state is difficult to describe numerically. However, they are -also typically less efficient and slower to train, and sometimes don't succeed -at all. +![Agent Camera](images/visual-observation.png) -To add a visual observation to an Agent, click on the `Add Camera` button in the -Agent inspector. Then drag the camera you want to add to the `Camera` field. You -can have more than one camera attached to an Agent. +In addition, make sure that the Agent's Brain expects a visual observation. In the Brain inspector, under **Brain Parameters** > **Visual Observations**, specify the number of Cameras the agent is using for its visual observations. For each visual observation, set the width and height of the image (in pixels) and whether or not the observation is color or grayscale (when `Black And White` is checked). + +### Discrete Vector Observation Space: Table Lookup -![Agent Camera](images/visual-observation.png) +You can use the discrete vector observation space when an agent only has a limited number of possible states and those states can be enumerated by a single number. For instance, the [Basic example environment](Learning-Environment-Examples.md#basic) in the ML-Agents toolkit defines an agent with a discrete vector observation space. The states of this agent are the integer steps between two linear goals. In the Basic example, the agent learns to move to the goal that provides the greatest reward. -In addition, make sure that the Agent's Brain expects a visual observation. In -the Brain inspector, under **Brain Parameters** > **Visual Observations**, -specify the number of Cameras the Agent is using for its visual observations. -For each visual observation, set the width and height of the image (in pixels) -and whether or not the observation is color or grayscale (when `Black And White` -is checked). +More generally, the discrete vector observation identifier could be an index into a table of the possible states. However, tables quickly become unwieldy as the environment becomes more complex. For example, even a simple game like [tic-tac-toe has 765 possible states](https://en.wikipedia.org/wiki/Game_complexity) (far more if you don't reduce the number of observations by combining those that are rotations or reflections of each other). + +To implement a discrete state observation, implement the `CollectObservations()` method of your Agent subclass and return a `List` containing a single number representing the state: + +```csharp +public override void CollectObservations() +{ + AddVectorObs(stateIndex); // stateIndex is the state identifier +} +``` ## Vector Actions -An action is an instruction from the Brain that the agent carries out. The -action is passed to the Agent as a parameter when the Academy invokes the -agent's `AgentAction()` function. When you specify that the vector action space -is **Continuous**, the action parameter passed to the Agent is an array of -control signals with length equal to the `Vector Action Space Size` property. -When you specify a **Discrete** vector action space type, the action parameter -is an array containing integers. Each integer is an index into a list or table -of commands. In the **Discrete** vector action space type, the action parameter -is an array of indices. The number of indices in the array is determined by the -number of branches defined in the `Branches Size` property. Each branch -corresponds to an action table, you can specify the size of each table by -modifying the `Branches` property. Set the `Vector Action Space Size` and -`Vector Action Space Type` properties on the Brain object assigned to the Agent -(using the Unity Editor Inspector window). - -Neither the Brain nor the training algorithm know anything about what the action -values themselves mean. The training algorithm simply tries different values for -the action list and observes the affect on the accumulated rewards over time and -many training episodes. Thus, the only place actions are defined for an Agent is -in the `AgentAction()` function. You simply specify the type of vector action -space, and, for the continuous vector action space, the number of values, and -then apply the received values appropriately (and consistently) in -`ActionAct()`. - -For example, if you designed an agent to move in two dimensions, you could use -either continuous or the discrete vector actions. In the continuous case, you -would set the vector action size to two (one for each dimension), and the -agent's Brain would create an action with two floating point values. In the -discrete case, you would use one Branch with a size of four (one for each -direction), and the Brain would create an action array containing a single -element with a value ranging from zero to three. Alternatively, you could create -two branches of size two (one for horizontal movement and one for vertical -movement), and the Brain would create an action array containing two elements -with values ranging from zero to one. - -Note that when you are programming actions for an agent, it is often helpful to -test your action logic using a **Player** Brain, which lets you map keyboard -commands to actions. See [Brains](Learning-Environment-Design-Brains.md). - -The [3DBall](Learning-Environment-Examples.md#3dball-3d-balance-ball) and -[Area](Learning-Environment-Examples.md#push-block) example environments are set -up to use either the continuous or the discrete vector action spaces. +An action is an instruction from the brain that the agent carries out. The action is passed to the agent as a parameter when the Academy invokes the agent's `AgentAction()` function. When you specify that the vector action space is **Continuous**, the action parameter passed to the agent is an array of control signals with length equal to the `Vector Action Space Size` property. When you specify a **Discrete** vector action space type, the action parameter is an array containing only a single value, which is an index into your list or table of commands. In the **Discrete** vector action space type, the `Vector Action Space Size` is the number of elements in your action table. Set the `Vector Action Space Size` and `Vector Action Space Type` properties on the Brain object assigned to the agent (using the Unity Editor Inspector window). + +Neither the Brain nor the training algorithm know anything about what the action values themselves mean. The training algorithm simply tries different values for the action list and observes the affect on the accumulated rewards over time and many training episodes. Thus, the only place actions are defined for an agent is in the `AgentAction()` function. You simply specify the type of vector action space, and, for the continuous vector action space, the number of values, and then apply the received values appropriately (and consistently) in `ActionAct()`. + +For example, if you designed an agent to move in two dimensions, you could use either continuous or the discrete vector actions. In the continuous case, you would set the vector action size to two (one for each dimension), and the agent's brain would create an action with two floating point values. In the discrete case, you would set the vector action size to four (one for each direction), and the brain would create an action array containing a single element with a value ranging from zero to four. + +Note that when you are programming actions for an agent, it is often helpful to test your action logic using a **Player** brain, which lets you map keyboard commands to actions. See [Brains](Learning-Environment-Design-Brains.md). + +The [3DBall](Learning-Environment-Examples.md#3dball-3d-balance-ball) and [Area](Learning-Environment-Examples.md#push-block) example environments are set up to use either the continuous or the discrete vector action spaces. ### Continuous Action Space -When an Agent uses a Brain set to the **Continuous** vector action space, the -action parameter passed to the Agent's `AgentAction()` function is an array with -length equal to the Brain object's `Vector Action Space Size` property value. -The individual values in the array have whatever meanings that you ascribe to -them. If you assign an element in the array as the speed of an Agent, for -example, the training process learns to control the speed of the Agent though -this parameter. +When an agent uses a brain set to the **Continuous** vector action space, the action parameter passed to the agent's `AgentAction()` function is an array with length equal to the Brain object's `Vector Action Space Size` property value. The individual values in the array have whatever meanings that you ascribe to them. If you assign an element in the array as the speed of an agent, for example, the training process learns to control the speed of the agent though this parameter. -The [Reacher example](Learning-Environment-Examples.md#reacher) defines a -continuous action space with four control values. +The [Reacher example](Learning-Environment-Examples.md#reacher) defines a continuous action space with four control values. -![reacher](images/reacher.png) +![](images/reacher.png) -These control values are applied as torques to the bodies making up the arm: +These control values are applied as torques to the bodies making up the arm : ```csharp public override void AgentAction(float[] act) @@ -299,121 +181,51 @@ public override void AgentAction(float[] act) } ``` -By default the output from our provided PPO algorithm pre-clamps the values of -`vectorAction` into the [-1, 1] range. It is a best practice to manually clip -these as well, if you plan to use a 3rd party algorithm with your environment. -As shown above, you can scale the control values as needed after clamping them. - +By default the output from our provided PPO algorithm pre-clamps the values of `vectorAction` into the [-1, 1] range. It is a best practice to manually clip these as well, if you plan to use a 3rd party algorithm with your environment. As shown above, you can scale the control values as needed after clamping them. + ### Discrete Action Space -When an Agent uses a Brain set to the **Discrete** vector action space, the -action parameter passed to the Agent's `AgentAction()` function is an array -containing indices. With the discrete vector action space, `Branches` is an -array of integers, each value corresponds to the number of possibilities for -each branch. +When an agent uses a brain set to the **Discrete** vector action space, the action parameter passed to the agent's `AgentAction()` function is an array containing a single element. The value is the index of the action to in your table or list of actions. With the discrete vector action space, `Vector Action Space Size` represents the number of actions in your action table. -For example, if we wanted an Agent that can move in an plane and jump, we could -define two branches (one for motion and one for jumping) because we want our -agent be able to move __and__ jump concurrently. We define the first branch to -have 5 possible actions (don't move, go left, go right, go backward, go forward) -and the second one to have 2 possible actions (don't jump, jump). The -AgentAction method would look something like: +The [Area example](Learning-Environment-Examples.md#push-block) defines five actions for the discrete vector action space: a jump action and one action for each cardinal direction: ```csharp -// Get the action index for movement -int movement = Mathf.FloorToInt(act[0]); -// Get the action index for jumping -int jump = Mathf.FloorToInt(act[1]); +// Get the action index +int movement = Mathf.FloorToInt(act[0]); -// Look up the index in the movement action list: +// Look up the index in the action list: if (movement == 1) { directionX = -1; } if (movement == 2) { directionX = 1; } if (movement == 3) { directionZ = -1; } if (movement == 4) { directionZ = 1; } -// Look up the index in the jump action list: -if (jump == 1 && IsGrounded()) { directionY = 1; } +if (movement == 5 && GetComponent().velocity.y <= 0) { directionY = 1; } -// Apply the action results to move the Agent +// Apply the action results to move the agent gameObject.GetComponent().AddForce( new Vector3( directionX * 40f, directionY * 300f, directionZ * 40f)); ``` -Note that the above code example is a simplified extract from the AreaAgent -class, which provides alternate implementations for both the discrete and the -continuous action spaces. - -#### Masking Discrete Actions - -When using Discrete Actions, it is possible to specify that some actions are -impossible for the next decision. Then the Agent is controlled by an External or -Internal Brain, the Agent will be unable to perform the specified action. Note -that when the Agent is controlled by a Player or Heuristic Brain, the Agent will -still be able to decide to perform the masked action. In order to mask an -action, call the method `SetActionMask` within the `CollectObservation` method : - -```csharp -SetActionMask(branch, actionIndices) -``` - -Where: - -* `branch` is the index (starting at 0) of the branch on which you want to mask - the action -* `actionIndices` is a list of `int` or a single `int` corresponding to the - index of the action that the Agent cannot perform. - -For example, if you have an Agent with 2 branches and on the first branch -(branch 0) there are 4 possible actions : _"do nothing"_, _"jump"_, _"shoot"_ -and _"change weapon"_. Then with the code bellow, the Agent will either _"do -nothing"_ or _"change weapon"_ for his next decision (since action index 1 and 2 -are masked) - -```csharp -SetActionMask(0, new int[2]{1,2}) -``` - -Notes: - -* You can call `SetActionMask` multiple times if you want to put masks on - multiple branches. -* You cannot mask all the actions of a branch. -* You cannot mask actions in continuous control. +Note that the above code example is a simplified extract from the AreaAgent class, which provides alternate implementations for both the discrete and the continuous action spaces. ## Rewards -In reinforcement learning, the reward is a signal that the agent has done -something right. The PPO reinforcement learning algorithm works by optimizing -the choices an agent makes such that the agent earns the highest cumulative -reward over time. The better your reward mechanism, the better your agent will -learn. - -**Note:** Rewards are not used during inference by a Brain using an already -trained policy and is also not used during imitation learning. +In reinforcement learning, the reward is a signal that the agent has done something right. The PPO reinforcement learning algorithm works by optimizing the choices an agent makes such that the agent earns the highest cumulative reward over time. The better your reward mechanism, the better your agent will learn. -Perhaps the best advice is to start simple and only add complexity as needed. In -general, you should reward results rather than actions you think will lead to -the desired results. To help develop your rewards, you can use the Monitor class -to display the cumulative reward received by an Agent. You can even use a Player -Brain to control the Agent while watching how it accumulates rewards. +**Note:** Rewards are not used during inference by a brain using an already trained policy and is also not used during imitation learning. + +Perhaps the best advice is to start simple and only add complexity as needed. In general, you should reward results rather than actions you think will lead to the desired results. To help develop your rewards, you can use the Monitor class to display the cumulative reward received by an agent. You can even use a Player brain to control the agent while watching how it accumulates rewards. -Allocate rewards to an Agent by calling the `AddReward()` method in the -`AgentAction()` function. The reward assigned in any step should be in the range -[-1,1]. Values outside this range can lead to unstable training. The `reward` -value is reset to zero at every step. +Allocate rewards to an agent by calling the `AddReward()` method in the `AgentAction()` function. The reward assigned in any step should be in the range [-1,1]. Values outside this range can lead to unstable training. The `reward` value is reset to zero at every step. -### Examples +**Examples** -You can examine the `AgentAction()` functions defined in the [example -environments](Learning-Environment-Examples.md) to see how those projects -allocate rewards. +You can examine the `AgentAction()` functions defined in the [example environments](Learning-Environment-Examples.md) to see how those projects allocate rewards. -The `GridAgent` class in the [GridWorld -example](Learning-Environment-Examples.md#gridworld) uses a very simple reward -system: +The `GridAgent` class in the [GridWorld example](Learning-Environment-Examples.md#gridworld) uses a very simple reward system: ```csharp -Collider[] hitObjects = Physics.OverlapBox(trueAgent.transform.position, +Collider[] hitObjects = Physics.OverlapBox(trueAgent.transform.position, new Vector3(0.3f, 0.3f, 0.3f)); if (hitObjects.Where(col => col.gameObject.tag == "goal").ToArray().Length == 1) { @@ -427,22 +239,16 @@ if (hitObjects.Where(col => col.gameObject.tag == "pit").ToArray().Length == 1) } ``` -The agent receives a positive reward when it reaches the goal and a negative -reward when it falls into the pit. Otherwise, it gets no rewards. This is an -example of a _sparse_ reward system. The agent must explore a lot to find the -infrequent reward. +The agent receives a positive reward when it reaches the goal and a negative reward when it falls into the pit. Otherwise, it gets no rewards. This is an example of a _sparse_ reward system. The agent must explore a lot to find the infrequent reward. -In contrast, the `AreaAgent` in the [Area -example](Learning-Environment-Examples.md#push-block) gets a small negative -reward every step. In order to get the maximum reward, the agent must finish its -task of reaching the goal square as quickly as possible: +In contrast, the `AreaAgent` in the [Area example](Learning-Environment-Examples.md#push-block) gets a small negative reward every step. In order to get the maximum reward, the agent must finish its task of reaching the goal square as quickly as possible: ```csharp AddReward( -0.005f); MoveAgent(act); -if (gameObject.transform.position.y < 0.0f || - Mathf.Abs(gameObject.transform.position.x - area.transform.position.x) > 8f || +if (gameObject.transform.position.y < 0.0f || + Mathf.Abs(gameObject.transform.position.x - area.transform.position.x) > 8f || Mathf.Abs(gameObject.transform.position.z + 5 - area.transform.position.z) > 8) { Done(); @@ -450,14 +256,9 @@ if (gameObject.transform.position.y < 0.0f || } ``` -The agent also gets a larger negative penalty if it falls off the playing -surface. +The agent also gets a larger negative penalty if it falls off the playing surface. -The `Ball3DAgent` in the -[3DBall](Learning-Environment-Examples.md#3dball-3d-balance-ball) takes a -similar approach, but allocates a small positive reward as long as the agent -balances the ball. The agent can maximize its rewards by keeping the ball on the -platform: +The `Ball3DAgent` in the [3DBall](Learning-Environment-Examples.md#3dball-3d-balance-ball) takes a similar approach, but allocates a small positive reward as long as the agent balances the ball. The agent can maximize its rewards by keeping the ball on the platform: ```csharp if (IsDone() == false) @@ -465,7 +266,7 @@ if (IsDone() == false) SetReward(0.1f); } -// When ball falls mark Agent as done and give a negative penalty +// When ball falls mark agent as done and give a negative penalty if ((ball.transform.position.y - gameObject.transform.position.y) < -2f || Mathf.Abs(ball.transform.position.x - gameObject.transform.position.x) > 3f || Mathf.Abs(ball.transform.position.z - gameObject.transform.position.z) > 3f) @@ -475,75 +276,59 @@ if ((ball.transform.position.y - gameObject.transform.position.y) < -2f || } ``` -The `Ball3DAgent` also assigns a negative penalty when the ball falls off the -platform. +The `Ball3DAgent` also assigns a negative penalty when the ball falls off the platform. ## Agent Properties ![Agent Inspector](images/agent.png) -* `Brain` - The Brain to register this Agent to. Can be dragged into the - inspector using the Editor. -* `Visual Observations` - A list of `Cameras` which will be used to generate - observations. -* `Max Step` - The per-agent maximum number of steps. Once this number is - reached, the Agent will be reset if `Reset On Done` is checked. -* `Reset On Done` - Whether the Agent's `AgentReset()` function should be called - when the Agent reaches its `Max Step` count or is marked as done in code. -* `On Demand Decision` - Whether the Agent requests decisions at a fixed step - interval or explicitly requests decisions by calling `RequestDecision()`. - * If not checked, the Agent will request a new decision every `Decision - Frequency` steps and perform an action every step. In the example above, - `CollectObservations()` will be called every 5 steps and `AgentAction()` - will be called at every step. This means that the Agent will reuse the - decision the Brain has given it. - * If checked, the Agent controls when to receive decisions, and take actions. - To do so, the Agent may leverage one or two methods: - * `RequestDecision()` Signals that the Agent is requesting a decision. This - causes the Agent to collect its observations and ask the Brain for a - decision at the next step of the simulation. Note that when an Agent - requests a decision, it also request an action. This is to ensure that - all decisions lead to an action during training. - * `RequestAction()` Signals that the Agent is requesting an action. The - action provided to the Agent in this case is the same action that was - provided the last time it requested a decision. -* `Decision Frequency` - The number of steps between decision requests. Not used - if `On Demand Decision`, is true. +* `Brain` - The brain to register this agent to. Can be dragged into the inspector using the Editor. +* `Visual Observations` - A list of `Cameras` which will be used to generate observations. +* `Max Step` - The per-agent maximum number of steps. Once this number is reached, the agent will be reset if `Reset On Done` is checked. +* `Reset On Done` - Whether the agent's `AgentReset()` function should be called when the agent reaches its `Max Step` count or is marked as done in code. +* `On Demand Decision` - Whether the agent requests decisions at a fixed step interval or explicitly requests decisions by calling `RequestDecision()`. + * If not checked, the Agent will request a new + decision every `Decision Frequency` steps and + perform an action every step. In the example above, + `CollectObservations()` will be called every 5 steps and + `AgentAction()` will be called at every step. This means that the + Agent will reuse the decision the Brain has given it. + * If checked, the Agent controls when to receive + decisions, and take actions. To do so, the Agent may leverage one or two methods: + * `RequestDecision()` Signals that the Agent is requesting a decision. + This causes the Agent to collect its observations and ask the Brain for a + decision at the next step of the simulation. Note that when an Agent + requests a decision, it also request an action. + This is to ensure that all decisions lead to an action during training. + * `RequestAction()` Signals that the Agent is requesting an action. The + action provided to the Agent in this case is the same action that was + provided the last time it requested a decision. +* `Decision Frequency` - The number of steps between decision requests. Not used if `On Demand Decision`, is true. ## Monitoring Agents -We created a helpful `Monitor` class that enables visualizing variables within a -Unity environment. While this was built for monitoring an agent's value function -throughout the training process, we imagine it can be more broadly useful. You -can learn more [here](Feature-Monitor.md). +We created a helpful `Monitor` class that enables visualizing variables within +a Unity environment. While this was built for monitoring an Agent's value +function throughout the training process, we imagine it can be more broadly +useful. You can learn more [here](Feature-Monitor.md). ## Instantiating an Agent at Runtime -To add an Agent to an environment at runtime, use the Unity -`GameObject.Instantiate()` function. It is typically easiest to instantiate an -agent from a [Prefab](https://docs.unity3d.com/Manual/Prefabs.html) (otherwise, -you have to instantiate every GameObject and Component that make up your Agent -individually). In addition, you must assign a Brain instance to the new Agent -and initialize it by calling its `AgentReset()` method. For example, the -following function creates a new Agent given a Prefab, Brain instance, location, -and orientation: +To add an Agent to an environment at runtime, use the Unity `GameObject.Instantiate()` function. It is typically easiest to instantiate an agent from a [Prefab](https://docs.unity3d.com/Manual/Prefabs.html) (otherwise, you have to instantiate every GameObject and Component that make up your agent individually). In addition, you must assign a Brain instance to the new Agent and initialize it by calling its `AgentReset()` method. For example, the following function creates a new agent given a Prefab, Brain instance, location, and orientation: ```csharp -private void CreateAgent(GameObject AgentPrefab, Brain brain, Vector3 position, Quaternion orientation) +private void CreateAgent(GameObject agentPrefab, Brain brain, Vector3 position, Quaternion orientation) { - GameObject AgentObj = Instantiate(agentPrefab, position, orientation); - Agent Agent = AgentObj.GetComponent(); - Agent.GiveBrain(brain); - Agent.AgentReset(); + GameObject agentObj = Instantiate(agentPrefab, position, orientation); + Agent agent = agentObj.GetComponent(); + agent.GiveBrain(brain); + agent.AgentReset(); } ``` ## Destroying an Agent -Before destroying an Agent GameObject, you must mark it as done (and wait for -the next step in the simulation) so that the Brain knows that this Agent is no -longer active. Thus, the best place to destroy an Agent is in the -`Agent.AgentOnDone()` function: +Before destroying an Agent GameObject, you must mark it as done (and wait for the next step in the simulation) so that the Brain knows that this agent is no longer active. Thus, the best place to destroy an agent is in the `Agent.AgentOnDone()` function: ```csharp public override void AgentOnDone() @@ -552,6 +337,4 @@ public override void AgentOnDone() } ``` -Note that in order for `AgentOnDone()` to be called, the Agent's `ResetOnDone` -property must be false. You can set `ResetOnDone` on the Agent's Inspector or in -code. +Note that in order for `AgentOnDone()` to be called, the agent's `ResetOnDone` property must be false. You can set `ResetOnDone` on the agent's Inspector or in code. diff --git a/docs/Learning-Environment-Design-Brains.md b/docs/Learning-Environment-Design-Brains.md index 06109cbb60..9f0abf9255 100644 --- a/docs/Learning-Environment-Design-Brains.md +++ b/docs/Learning-Environment-Design-Brains.md @@ -1,77 +1,43 @@ # Brains -The Brain encapsulates the decision making process. Brain objects must be -children of the Academy in the Unity scene hierarchy. Every Agent must be -assigned a Brain, but you can use the same Brain with more than one Agent. You -can also create several Brains, attach each of the Brain to one or more than one -Agent. - -Use the Brain class directly, rather than a subclass. Brain behavior is -determined by the **Brain Type**. The ML-Agents toolkit defines four Brain -Types: - -* [External](Learning-Environment-Design-External-Internal-Brains.md) — The - **External** and **Internal** types typically work together; set **External** - when training your Agents. You can also use the **External** Brain to - communicate with a Python script via the Python `UnityEnvironment` class - included in the Python portion of the ML-Agents SDK. -* [Internal](Learning-Environment-Design-External-Internal-Brains.md) – Set - **Internal** to make use of a trained model. -* [Heuristic](Learning-Environment-Design-Heuristic-Brains.md) – Set - **Heuristic** to hand-code the Agent's logic by extending the Decision class. -* [Player](Learning-Environment-Design-Player-Brains.md) – Set **Player** to map - keyboard keys to Agent actions, which can be useful to test your Agent code. - -During training, set your Agent's Brain type to **External**. To use the trained -model, import the model file into the Unity project and change the Brain type to -**Internal**. - -The Brain class has several important properties that you can set using the -Inspector window. These properties must be appropriate for the Agents using the -Brain. For example, the `Vector Observation Space Size` property must match the -length of the feature vector created by an Agent exactly. See -[Agents](Learning-Environment-Design-Agents.md) for information about creating -agents and setting up a Brain instance correctly. +The Brain encapsulates the decision making process. Brain objects must be children of the Academy in the Unity scene hierarchy. Every Agent must be assigned a Brain, but you can use the same Brain with more than one Agent. You can also create several Brains, attach each of the Brain to one or more than one Agent. + +Use the Brain class directly, rather than a subclass. Brain behavior is determined by the **Brain Type**. The ML-Agents toolkit defines four Brain Types: + +* [External](Learning-Environment-Design-External-Internal-Brains.md) — The **External** and **Internal** types typically work together; set **External** when training your agents. You can also use the **External** brain to communicate with a Python script via the Python `UnityEnvironment` class included in the Python portion of the ML-Agents SDK. +* [Internal](Learning-Environment-Design-External-Internal-Brains.md) – Set **Internal** to make use of a trained model. +* [Heuristic](Learning-Environment-Design-Heuristic-Brains.md) – Set **Heuristic** to hand-code the agent's logic by extending the Decision class. +* [Player](Learning-Environment-Design-Player-Brains.md) – Set **Player** to map keyboard keys to agent actions, which can be useful to test your agent code. + +During training, set your agent's brain type to **External**. To use the trained model, import the model file into the Unity project and change the brain type to **Internal**. + +The Brain class has several important properties that you can set using the Inspector window. These properties must be appropriate for the agents using the brain. For example, the `Vector Observation Space Size` property must match the length of the feature vector created by an agent exactly. See [Agents](Learning-Environment-Design-Agents.md) for information about creating agents and setting up a Brain instance correctly. ## Brain Properties -The Brain Inspector window in the Unity Editor displays the properties assigned -to a Brain component: +The Brain Inspector window in the Unity Editor displays the properties assigned to a Brain component: ![Brain Inspector](images/brain.png) -* `Brain Parameters` - Define vector observations, visual observation, and - vector actions for the Brain. - * `Vector Observation` - * `Space Size` - Length of vector observation for Brain. - * `Stacked Vectors` - The number of previous vector observations that will - be stacked and used collectively for decision making. This results in the - effective size of the vector observation being passed to the Brain being: - _Space Size_ x _Stacked Vectors_. - * `Visual Observations` - Describes height, width, and whether to grayscale - visual observations for the Brain. - * `Vector Action` - * `Space Type` - Corresponds to whether action vector contains a single - integer (Discrete) or a series of real-valued floats (Continuous). - * `Space Size` (Continuous) - Length of action vector for Brain. - * `Branches` (Discrete) - An array of integers, defines multiple concurrent - discrete actions. The values in the `Branches` array correspond to the - number of possible discrete values for each action branch. - * `Action Descriptions` - A list of strings used to name the available - actions for the Brain. +* `Brain Parameters` - Define vector observations, visual observation, and vector actions for the Brain. + * `Vector Observation` + * `Space Type` - Corresponds to whether the observation vector contains a single integer (Discrete) or a series of real-valued floats (Continuous). + * `Space Size` - Length of vector observation for brain (In _Continuous_ space type). Or number of possible values (in _Discrete_ space type). + * `Stacked Vectors` - The number of previous vector observations that will be stacked and used collectively for decision making. This results in the effective size of the vector observation being passed to the brain being: _Space Size_ x _Stacked Vectors_. + * `Visual Observations` - Describes height, width, and whether to grayscale visual observations for the Brain. + * `Vector Action` + * `Space Type` - Corresponds to whether action vector contains a single integer (Discrete) or a series of real-valued floats (Continuous). + * `Space Size` - Length of action vector for brain (In _Continuous_ state space). Or number of possible values (in _Discrete_ action space). + * `Action Descriptions` - A list of strings used to name the available actions for the Brain. * `Type of Brain` - Describes how the Brain will decide actions. - * `External` - Actions are decided by an external process, such as the PPO - training process. - * `Internal` - Actions are decided using internal TensorFlowSharp model. - * `Player` - Actions are decided using keyboard input mappings. - * `Heuristic` - Actions are decided using a custom `Decision` script, which - must be attached to the Brain game object. + * `External` - Actions are decided by an external process, such as the PPO training process. + * `Internal` - Actions are decided using internal TensorFlowSharp model. + * `Player` - Actions are decided using keyboard input mappings. + * `Heuristic` - Actions are decided using a custom `Decision` script, which must be attached to the Brain game object. ## Using the Broadcast Feature -The Player, Heuristic and Internal Brains have been updated to support -broadcast. The broadcast feature allows you to collect data from your Agents -using a Python program without controlling them. +The Player, Heuristic and Internal brains have been updated to support broadcast. The broadcast feature allows you to collect data from your agents using a Python program without controlling them. ### How to use: Unity @@ -79,24 +45,14 @@ To turn it on in Unity, simply check the `Broadcast` box as shown bellow: ![Broadcast](images/broadcast.png) -### How to use: Python +### How to use: Python + +When you launch your Unity Environment from a Python program, you can see what the agents connected to non-external brains are doing. When calling `step` or `reset` on your environment, you retrieve a dictionary mapping brain names to `BrainInfo` objects. The dictionary contains a `BrainInfo` object for each non-external brain set to broadcast as well as for any external brains. + +Just like with an external brain, the `BrainInfo` object contains the fields for `visual_observations`, `vector_observations`, `text_observations`, `memories`,`rewards`, `local_done`, `max_reached`, `agents` and `previous_actions`. Note that `previous_actions` corresponds to the actions that were taken by the agents at the previous step, not the current one. -When you launch your Unity Environment from a Python program, you can see what -the Agents connected to non-External Brains are doing. When calling `step` or -`reset` on your environment, you retrieve a dictionary mapping Brain names to -`BrainInfo` objects. The dictionary contains a `BrainInfo` object for each -non-External Brain set to broadcast as well as for any External Brains. +Note that when you do a `step` on the environment, you cannot provide actions for non-external brains. If there are no external brains in the scene, simply call `step()` with no arguments. -Just like with an External Brain, the `BrainInfo` object contains the fields for -`visual_observations`, `vector_observations`, `text_observations`, -`memories`,`rewards`, `local_done`, `max_reached`, `agents` and -`previous_actions`. Note that `previous_actions` corresponds to the actions that -were taken by the Agents at the previous step, not the current one. +You can use the broadcast feature to collect data generated by Player, Heuristics or Internal brains game sessions. You can then use this data to train an agent in a supervised context. -Note that when you do a `step` on the environment, you cannot provide actions -for non-External Brains. If there are no External Brains in the scene, simply -call `step()` with no arguments. -You can use the broadcast feature to collect data generated by Player, -Heuristics or Internal Brains game sessions. You can then use this data to train -an agent in a supervised context. diff --git a/docs/Learning-Environment-Design-External-Internal-Brains.md b/docs/Learning-Environment-Design-External-Internal-Brains.md index 677c034901..a984a0fd93 100644 --- a/docs/Learning-Environment-Design-External-Internal-Brains.md +++ b/docs/Learning-Environment-Design-External-Internal-Brains.md @@ -1,116 +1,62 @@ # External and Internal Brains -The **External** and **Internal** types of Brains work in different phases of -training. When training your Agents, set their Brain types to **External**; when -using the trained models, set their Brain types to **Internal**. +The **External** and **Internal** types of Brains work in different phases of training. When training your agents, set their brain types to **External**; when using the trained models, set their brain types to **Internal**. ## External Brain -When [running an ML-Agents training algorithm](Training-ML-Agents.md), at least -one Brain object in a scene must be set to **External**. This allows the -training process to collect the observations of Agents using that Brain and give -the Agents their actions. +When [running an ML-Agents training algorithm](Training-ML-Agents.md), at least one Brain object in a scene must be set to **External**. This allows the training process to collect the observations of agents using that brain and give the agents their actions. -In addition to using an External Brain for training using the ML-Agents learning -algorithms, you can use an External Brain to control Agents in a Unity -environment using an external Python program. See [Python API](Python-API.md) -for more information. +In addition to using an External brain for training using the ML-Agents learning algorithms, you can use an External brain to control agents in a Unity environment using an external Python program. See [Python API](Python-API.md) for more information. -Unlike the other types, the External Brain has no properties to set in the Unity -Inspector window. +Unlike the other types, the External Brain has no properties to set in the Unity Inspector window. ## Internal Brain -The Internal Brain type uses a -[TensorFlow model](https://www.tensorflow.org/get_started/get_started_for_beginners#models_and_training) -to make decisions. The Proximal Policy Optimization (PPO) and Behavioral Cloning -algorithms included with the ML-Agents SDK produce trained TensorFlow models -that you can use with the Internal Brain type. +The Internal Brain type uses a [TensorFlow model](https://www.tensorflow.org/get_started/get_started_for_beginners#models_and_training) to make decisions. The Proximal Policy Optimization (PPO) and Behavioral Cloning algorithms included with the ML-Agents SDK produce trained TensorFlow models that you can use with the Internal Brain type. -A __model__ is a mathematical relationship mapping an agent's observations to -its actions. TensorFlow is a software library for performing numerical -computation through data flow graphs. A TensorFlow model, then, defines the -mathematical relationship between your Agent's observations and its actions -using a TensorFlow data flow graph. +A __model__ is a mathematical relationship mapping an agent's observations to its actions. TensorFlow is a software library for performing numerical computation through data flow graphs. A TensorFlow model, then, defines the mathematical relationship between your agent's observations and its actions using a TensorFlow data flow graph. ### Creating a graph model -The training algorithms included in the ML-Agents SDK produce TensorFlow graph -models as the end result of the training process. See -[Training ML-Agents](Training-ML-Agents.md) for instructions on how to train a -model. +The training algorithms included in the ML-Agents SDK produce TensorFlow graph models as the end result of the training process. See [Training ML-Agents](Training-ML-Agents.md) for instructions on how to train a model. ### Using a graph model To use a graph model: -1. Select the Brain GameObject in the **Hierarchy** window of the Unity Editor. - (The Brain GameObject must be a child of the Academy GameObject and must have - a Brain component.) +1. Select the Brain GameObject in the **Hierarchy** window of the Unity Editor. (The Brain GameObject must be a child of the Academy GameObject and must have a Brain component.) 2. Set the **Brain Type** to **Internal**. - **Note:** In order to see the **Internal** Brain Type option, you must - [enable TensorFlowSharp](Using-TensorFlow-Sharp-in-Unity.md). -3. Import the `environment_run-id.bytes` file produced by the PPO training - program. (Where `environment_run-id` is the name of the model file, which is - constructed from the name of your Unity environment executable and the run-id - value you assigned when running the training process.) - - You can - [import assets into Unity](https://docs.unity3d.com/Manual/ImportingAssets.html) - in various ways. The easiest way is to simply drag the file into the - **Project** window and drop it into an appropriate folder. -4. Once the `environment.bytes` file is imported, drag it from the **Project** - window to the **Graph Model** field of the Brain component. - -If you are using a model produced by the ML-Agents `mlagents-learn` command, use -the default values for the other Internal Brain parameters. + + **Note:** In order to see the **Internal** Brain Type option, you must [enable TensorFlowSharp](Using-TensorFlow-Sharp-in-Unity.md). + +3. Import the `environment_run-id.bytes` file produced by the PPO training program. (Where `environment_run-id` is the name of the model file, which is constructed from the name of your Unity environment executable and the run-id value you assigned when running the training process.) + + You can [import assets into Unity](https://docs.unity3d.com/Manual/ImportingAssets.html) in various ways. The easiest way is to simply drag the file into the **Project** window and drop it into an appropriate folder. + +4. Once the `environment.bytes` file is imported, drag it from the **Project** window to the **Graph Model** field of the Brain component. + +If you are using a model produced by the ML-Agents `learn.py` program, use the default values for the other Internal Brain parameters. ### Internal Brain properties -The default values of the TensorFlow graph parameters work with the model -produced by the PPO and BC training code in the ML-Agents SDK. To use a default -ML-Agents model, the only parameter that you need to set is the `Graph Model`, -which must be set to the .bytes file containing the trained model itself. +The default values of the TensorFlow graph parameters work with the model produced by the PPO and BC training code in the ML-Agents SDK. To use a default ML-Agents model, the only parameter that you need to set is the `Graph Model`, which must be set to the .bytes file containing the trained model itself. ![Internal Brain Inspector](images/internal_brain.png) -* `Graph Model` : This must be the `bytes` file corresponding to the pre-trained - TensorFlow graph. (You must first drag this file into your Resources folder - and then from the Resources folder into the inspector) - -Only change the following Internal Brain properties if you have created your own -TensorFlow model and are not using an ML-Agents model: - -* `Graph Scope` : If you set a scope while training your TensorFlow model, all - your placeholder name will have a prefix. You must specify that prefix here. - Note that if more than one Brain were set to external during training, you - must give a `Graph Scope` to the Internal Brain corresponding to the name of - the Brain GameObject. -* `Batch Size Node Name` : If the batch size is one of the inputs of your - graph, you must specify the name if the placeholder here. The Brain will make - the batch size equal to the number of Agents connected to the Brain - automatically. -* `State Node Name` : If your graph uses the state as an input, you must specify - the name of the placeholder here. -* `Recurrent Input Node Name` : If your graph uses a recurrent input / memory as - input and outputs new recurrent input / memory, you must specify the name if - the input placeholder here. -* `Recurrent Output Node Name` : If your graph uses a recurrent input / memory - as input and outputs new recurrent input / memory, you must specify the name - if the output placeholder here. -* `Observation Placeholder Name` : If your graph uses observations as input, you - must specify it here. Note that the number of observations is equal to the - length of `Camera Resolutions` in the Brain parameters. -* `Action Node Name` : Specify the name of the placeholder corresponding to the - actions of the Brain in your graph. If the action space type is continuous, - the output must be a one dimensional tensor of float of length `Action Space - Size`, if the action space type is discrete, the output must be a one - dimensional tensor of int of the same length as the `Branches` array. -* `Graph Placeholder` : If your graph takes additional inputs that are fixed - (example: noise level) you can specify them here. Note that in your graph, - these must correspond to one dimensional tensors of int or float of size 1. - * `Name` : Corresponds to the name of the placeholder. - * `Value Type` : Either Integer or Floating Point. - * `Min Value` and `Max Value` : Specify the range of the value here. The value - will be sampled from the uniform distribution ranging from `Min Value` to - `Max Value` inclusive. + + * `Graph Model` : This must be the `bytes` file corresponding to the pre-trained TensorFlow graph. (You must first drag this file into your Resources folder and then from the Resources folder into the inspector) + +Only change the following Internal Brain properties if you have created your own TensorFlow model and are not using an ML-Agents model: + + * `Graph Scope` : If you set a scope while training your TensorFlow model, all your placeholder name will have a prefix. You must specify that prefix here. Note that if more than one Brain were set to external during training, you must give a `Graph Scope` to the internal Brain corresponding to the name of the Brain GameObject. + * `Batch Size Node Name` : If the batch size is one of the inputs of your graph, you must specify the name if the placeholder here. The brain will make the batch size equal to the number of agents connected to the brain automatically. + * `State Node Name` : If your graph uses the state as an input, you must specify the name of the placeholder here. + * `Recurrent Input Node Name` : If your graph uses a recurrent input / memory as input and outputs new recurrent input / memory, you must specify the name if the input placeholder here. + * `Recurrent Output Node Name` : If your graph uses a recurrent input / memory as input and outputs new recurrent input / memory, you must specify the name if the output placeholder here. + * `Observation Placeholder Name` : If your graph uses observations as input, you must specify it here. Note that the number of observations is equal to the length of `Camera Resolutions` in the brain parameters. + * `Action Node Name` : Specify the name of the placeholder corresponding to the actions of the brain in your graph. If the action space type is continuous, the output must be a one dimensional tensor of float of length `Action Space Size`, if the action space type is discrete, the output must be a one dimensional tensor of int of length 1. + * `Graph Placeholder` : If your graph takes additional inputs that are fixed (example: noise level) you can specify them here. Note that in your graph, these must correspond to one dimensional tensors of int or float of size 1. + * `Name` : Corresponds to the name of the placeholder. + * `Value Type` : Either Integer or Floating Point. + * `Min Value` and `Max Value` : Specify the range of the value here. The value will be sampled from the uniform distribution ranging from `Min Value` to `Max Value` inclusive. + diff --git a/docs/Learning-Environment-Design-Heuristic-Brains.md b/docs/Learning-Environment-Design-Heuristic-Brains.md index aad74213c0..6fc19d5aed 100644 --- a/docs/Learning-Environment-Design-Heuristic-Brains.md +++ b/docs/Learning-Environment-Design-Heuristic-Brains.md @@ -1,45 +1,25 @@ # Heuristic Brain -The **Heuristic** Brain type allows you to hand code an Agent's decision making -process. A Heuristic Brain requires an implementation of the Decision interface -to which it delegates the decision making process. +The **Heuristic** brain type allows you to hand code an agent's decision making process. A Heuristic brain requires an implementation of the Decision interface to which it delegates the decision making process. -When you set the **Brain Type** property of a Brain to **Heuristic**, you must -add a component implementing the Decision interface to the same GameObject as -the Brain. +When you set the **Brain Type** property of a Brain to **Heuristic**, you must add a component implementing the Decision interface to the same GameObject as the Brain. ## Implementing the Decision interface -When creating your Decision class, extend MonoBehaviour (so you can use the -class as a Unity component) and extend the Decision interface. +When creating your Decision class, extend MonoBehaviour (so you can use the class as a Unity component) and extend the Decision interface. ```csharp using UnityEngine; using MLAgents; -public class HeuristicLogic : MonoBehaviour, Decision +public class HeuristicLogic : MonoBehaviour, Decision { // ... } ``` -The Decision interface defines two methods, `Decide()` and `MakeMemory()`. - -The `Decide()` method receives an Agents current state, consisting of the -agent's observations, reward, memory and other aspects of the Agent's state, and -must return an array containing the action that the Agent should take. The -format of the returned action array depends on the **Vector Action Space Type**. -When using a **Continuous** action space, the action array is just a float array -with a length equal to the **Vector Action Space Size** setting. When using a -**Discrete** action space, the action array is an integer array with the same -size as the `Branches` array. In the discrete action space, the values of the -**Branches** array define the number of discrete values that your `Decide()` -function can return for each branch, which don't need to be consecutive -integers. - -The `MakeMemory()` function allows you to pass data forward to the next -iteration of an Agent's decision making process. The array you return from -`MakeMemory()` is passed to the `Decide()` function in the next iteration. You -can use the memory to allow the Agent's decision process to take past actions -and observations into account when making the current decision. If your -heuristic logic does not require memory, just return an empty array. +The Decision interface defines two methods, `Decide()` and `MakeMemory()`. + +The `Decide()` method receives an agents current state, consisting of the agent's observations, reward, memory and other aspects of the agent's state, and must return an array containing the action that the agent should take. The format of the returned action array depends on the **Vector Action Space Type**. When using a **Continuous** action space, the action array is just a float array with a length equal to the **Vector Action Space Size** setting. When using a **Discrete** action space, the array contains just a single value. In the discrete action space, the **Space Size** value defines the number of discrete values that your `Decide()` function can return, which don't need to be consecutive integers. + +The `MakeMemory()` function allows you to pass data forward to the next iteration of an agent's decision making process. The array you return from `MakeMemory()` is passed to the `Decide()` function in the next iteration. You can use the memory to allow the agent's decision process to take past actions and observations into account when making the current decision. If your heuristic logic does not require memory, just return an empty array. diff --git a/docs/Learning-Environment-Design-Player-Brains.md b/docs/Learning-Environment-Design-Player-Brains.md index c30204b7b2..894d8dc6ae 100644 --- a/docs/Learning-Environment-Design-Player-Brains.md +++ b/docs/Learning-Environment-Design-Player-Brains.md @@ -1,38 +1,29 @@ # Player Brain -The **Player** Brain type allows you to control an Agent using keyboard -commands. You can use Player Brains to control a "teacher" Agent that trains -other Agents during [imitation learning](Training-Imitation-Learning.md). You -can also use Player Brains to test your Agents and environment before changing -their Brain types to **External** and running the training process. +The **Player** brain type allows you to control an agent using keyboard commands. You can use Player brains to control a "teacher" agent that trains other agents during [imitation learning](Training-Imitation-Learning.md). You can also use Player brains to test your agents and environment before changing their brain types to **External** and running the training process. ## Player Brain properties -The **Player** Brain properties allow you to assign one or more keyboard keys to -each action and a unique value to send when a key is pressed. +The **Player** brain properties allow you to assign one or more keyboard keys to each action and a unique value to send when a key is pressed. ![Player Brain Inspector](images/player_brain.png) -Note the differences between the discrete and continuous action spaces. When a -Brain uses the discrete action space, you can send one integer value as the -action per step. In contrast, when a Brain uses the continuous action space you -can send any number of floating point values (up to the **Vector Action Space -Size** setting). +Note the differences between the discrete and continuous action spaces. When a brain uses the discrete action space, you can send one integer value as the action per step. In contrast, when a brain uses the continuous action space you can send any number of floating point values (up to the **Vector Action Space Size** setting). + +| **Property** | | **Description** | +| :-- |:-- | :-- | +|**Continuous Player Actions**|| The mapping for the continuous vector action space. Shown when the action space is **Continuous**|. +|| **Size** | The number of key commands defined. You can assign more than one command to the same action index in order to send different values for that action. (If you press both keys at the same time, deterministic results are not guaranteed.)| +||**Element 0–N**| The mapping of keys to action values. | +|| **Key** | The key on the keyboard. | +|| **Index** | The element of the agent's action vector to set when this key is pressed. The index value cannot exceed the size of the Action Space (minus 1, since it is an array index).| +|| **Value** | The value to send to the agent as its action for the specified index when the mapped key is pressed. All other members of the action vector are set to 0. | +|**Discrete Player Actions**|| The mapping for the discrete vector action space. Shown when the action space is **Discrete**.| +|| **Default Action** | The value to send when no keys are pressed.| +|| **Size** | The number of key commands defined. | +||**Element 0–N**| The mapping of keys to action values. | +|| **Key** | The key on the keyboard. | +|| **Value** | The value to send to the agent as its action when the mapped key is pressed.| -| **Property** | | **Description** | -| :---------------------------- | :--------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Continuous Player Actions** | | The mapping for the continuous vector action space. Shown when the action space is **Continuous**. | -| | **Size** | The number of key commands defined. You can assign more than one command to the same action index in order to send different values for that action. (If you press both keys at the same time, deterministic results are not guaranteed.) | -| | **Element 0–N** | The mapping of keys to action values. | -| | **Key** | The key on the keyboard. | -| | **Index** | The element of the Agent's action vector to set when this key is pressed. The index value cannot exceed the size of the Action Space (minus 1, since it is an array index). | -| | **Value** | The value to send to the Agent as its action for the specified index when the mapped key is pressed. All other members of the action vector are set to 0. | -| **Discrete Player Actions** | | The mapping for the discrete vector action space. Shown when the action space is **Discrete**. | -| | **Size** | The number of key commands defined. | -| | **Element 0–N** | The mapping of keys to action values. | -| | **Key** | The key on the keyboard. | -| | **Branch Index** | The element of the Agent's action vector to set when this key is pressed. The index value cannot exceed the size of the Action Space (minus 1, since it is an array index). | -| | **Value** | The value to send to the Agent as its action when the mapped key is pressed. Cannot exceed the max value for the associated branch (minus 1, since it is an array index). | +For more information about the Unity input system, see [Input](https://docs.unity3d.com/ScriptReference/Input.html). -For more information about the Unity input system, see -[Input](https://docs.unity3d.com/ScriptReference/Input.html). diff --git a/docs/Learning-Environment-Design.md b/docs/Learning-Environment-Design.md index a97f0e70f6..d45afd0cb4 100644 --- a/docs/Learning-Environment-Design.md +++ b/docs/Learning-Environment-Design.md @@ -1,202 +1,89 @@ # Reinforcement Learning in Unity -Reinforcement learning is an artificial intelligence technique that trains -_agents_ to perform tasks by rewarding desirable behavior. During reinforcement -learning, an agent explores its environment, observes the state of things, and, -based on those observations, takes an action. If the action leads to a better -state, the agent receives a positive reward. If it leads to a less desirable -state, then the agent receives no reward or a negative reward (punishment). As -the agent learns during training, it optimizes its decision making so that it -receives the maximum reward over time. - -The ML-Agents toolkit uses a reinforcement learning technique called -[Proximal Policy Optimization (PPO)](https://blog.openai.com/openai-baselines-ppo/). -PPO uses a neural network to approximate the ideal function that maps an agent's -observations to the best action an agent can take in a given state. The -ML-Agents PPO algorithm is implemented in TensorFlow and runs in a separate -Python process (communicating with the running Unity application over a socket). - -**Note:** if you aren't studying machine and reinforcement learning as a subject -and just want to train agents to accomplish tasks, you can treat PPO training as -a _black box_. There are a few training-related parameters to adjust inside -Unity as well as on the Python training side, but you do not need in-depth -knowledge of the algorithm itself to successfully create and train agents. -Step-by-step procedures for running the training process are provided in the -[Training section](Training-ML-Agents.md). +Reinforcement learning is an artificial intelligence technique that trains _agents_ to perform tasks by rewarding desirable behavior. During reinforcement learning, an agent explores its environment, observes the state of things, and, based on those observations, takes an action. If the action leads to a better state, the agent receives a positive reward. If it leads to a less desirable state, then the agent receives no reward or a negative reward (punishment). As the agent learns during training, it optimizes its decision making so that it receives the maximum reward over time. + +The ML-Agents toolkit uses a reinforcement learning technique called [Proximal Policy Optimization (PPO)](https://blog.openai.com/openai-baselines-ppo/). PPO uses a neural network to approximate the ideal function that maps an agent's observations to the best action an agent can take in a given state. The ML-Agents PPO algorithm is implemented in TensorFlow and runs in a separate Python process (communicating with the running Unity application over a socket). + +**Note:** if you aren't studying machine and reinforcement learning as a subject and just want to train agents to accomplish tasks, you can treat PPO training as a _black box_. There are a few training-related parameters to adjust inside Unity as well as on the Python training side, but you do not need in-depth knowledge of the algorithm itself to successfully create and train agents. Step-by-step procedures for running the training process are provided in the [Training section](Training-ML-Agents.md). ## The Simulation and Training Process -Training and simulation proceed in steps orchestrated by the ML-Agents Academy -class. The Academy works with Agent and Brain objects in the scene to step -through the simulation. When either the Academy has reached its maximum number -of steps or all Agents in the scene are _done_, one training episode is -finished. +Training and simulation proceed in steps orchestrated by the ML-Agents Academy class. The Academy works with Agent and Brain objects in the scene to step through the simulation. When either the Academy has reached its maximum number of steps or all agents in the scene are _done_, one training episode is finished. -During training, the external Python training process communicates with the -Academy to run a series of episodes while it collects data and optimizes its -neural network model. The type of Brain assigned to an Agent determines whether -it participates in training or not. The **External** Brain communicates with the -external process to train the TensorFlow model. When training is completed -successfully, you can add the trained model file to your Unity project for use -with an **Internal** Brain. +During training, the external Python training process communicates with the Academy to run a series of episodes while it collects data and optimizes its neural network model. The type of Brain assigned to an agent determines whether it participates in training or not. The **External** brain communicates with the external process to train the TensorFlow model. When training is completed successfully, you can add the trained model file to your Unity project for use with an **Internal** brain. The ML-Agents Academy class orchestrates the agent simulation loop as follows: 1. Calls your Academy subclass's `AcademyReset()` function. -2. Calls the `AgentReset()` function for each Agent in the scene. -3. Calls the `CollectObservations()` function for each Agent in the scene. -4. Uses each Agent's Brain class to decide on the Agent's next action. -5. Calls your subclass's `AcademyStep()` function. -6. Calls the `AgentAction()` function for each Agent in the scene, passing in - the action chosen by the Agent's Brain. (This function is not called if the - Agent is done.) -7. Calls the Agent's `AgentOnDone()` function if the Agent has reached its `Max - Step` count or has otherwise marked itself as `done`. Optionally, you can set - an Agent to restart if it finishes before the end of an episode. In this - case, the Academy calls the `AgentReset()` function. -8. When the Academy reaches its own `Max Step` count, it starts the next episode - again by calling your Academy subclass's `AcademyReset()` function. - -To create a training environment, extend the Academy and Agent classes to -implement the above methods. The `Agent.CollectObservations()` and -`Agent.AgentAction()` functions are required; the other methods are optional — -whether you need to implement them or not depends on your specific scenario. - -**Note:** The API used by the Python PPO training process to communicate with -and control the Academy during training can be used for other purposes as well. -For example, you could use the API to use Unity as the simulation engine for -your own machine learning algorithms. See [Python API](Python-API.md) for more -information. +2. Calls the `AgentReset()` function for each agent in the scene. +3. Calls the `CollectObservations()` function for each agent in the scene. +4. Uses each agent's Brain class to decide on the agent's next action. +5. Calls your subclass's `AcademyAct()` function. +6. Calls the `AgentAction()` function for each agent in the scene, passing in the action chosen by the agent's brain. (This function is not called if the agent is done.) +7. Calls the agent's `AgentOnDone()` function if the agent has reached its `Max Step` count or has otherwise marked itself as `done`. Optionally, you can set an agent to restart if it finishes before the end of an episode. In this case, the Academy calls the `AgentReset()` function. +8. When the Academy reaches its own `Max Step` count, it starts the next episode again by calling your Academy subclass's `AcademyReset()` function. + +To create a training environment, extend the Academy and Agent classes to implement the above methods. The `Agent.CollectObservations()` and `Agent.AgentAction()` functions are required; the other methods are optional — whether you need to implement them or not depends on your specific scenario. + +**Note:** The API used by the Python PPO training process to communicate with and control the Academy during training can be used for other purposes as well. For example, you could use the API to use Unity as the simulation engine for your own machine learning algorithms. See [Python API](Python-API.md) for more information. ## Organizing the Unity Scene -To train and use the ML-Agents toolkit in a Unity scene, the scene must contain -a single Academy subclass along with as many Brain objects and Agent subclasses -as you need. Any Brain instances in the scene must be attached to GameObjects -that are children of the Academy in the Unity Scene Hierarchy. Agent instances -should be attached to the GameObject representing that Agent. +To train and use the ML-Agents toolkit in a Unity scene, the scene must contain a single Academy subclass along with as many Brain objects and Agent subclasses as you need. Any Brain instances in the scene must be attached to GameObjects that are children of the Academy in the Unity Scene Hierarchy. Agent instances should be attached to the GameObject representing that agent. ![Scene Hierarchy](images/scene-hierarchy.png) -You must assign a Brain to every Agent, but you can share Brains between -multiple Agents. Each Agent will make its own observations and act -independently, but will use the same decision-making logic and, for **Internal** -Brains, the same trained TensorFlow model. +You must assign a brain to every agent, but you can share brains between multiple agents. Each agent will make its own observations and act independently, but will use the same decision-making logic and, for **Internal** brains, the same trained TensorFlow model. ### Academy -The Academy object orchestrates Agents and their decision making processes. Only -place a single Academy object in a scene. +The Academy object orchestrates agents and their decision making processes. Only place a single Academy object in a scene. -You must create a subclass of the Academy class (since the base class is -abstract). When you create your Academy subclass, you can implement the -following methods (all are optional): +You must create a subclass of the Academy class (since the base class is abstract). When you create your Academy subclass, you can implement the following methods (all are optional): * `InitializeAcademy()` — Prepare the environment the first time it launches. -* `AcademyReset()` — Prepare the environment and Agents for the next training - episode. Use this function to place and initialize entities in the scene as - necessary. -* `AcademyStep()` — Prepare the environment for the next simulation step. The - base Academy class calls this function before calling any `AgentAction()` - methods for the current step. You can use this function to update other - objects in the scene before the Agents take their actions. Note that the - Agents have already collected their observations and chosen an action before - the Academy invokes this method. - -The base Academy classes also defines several important properties that you can -set in the Unity Editor Inspector. For training, the most important of these -properties is `Max Steps`, which determines how long each training episode -lasts. Once the Academy's step counter reaches this value, it calls the -`AcademyReset()` function to start the next episode. - -See [Academy](Learning-Environment-Design-Academy.md) for a complete list of -the Academy properties and their uses. +* `AcademyReset()` — Prepare the environment and agents for the next training episode. Use this function to place and initialize entities in the scene as necessary. +* `AcademyStep()` — Prepare the environment for the next simulation step. The base Academy class calls this function before calling any `AgentAction()` methods for the current step. You can use this function to update other objects in the scene before the agents take their actions. Note that the agents have already collected their observations and chosen an action before the Academy invokes this method. -### Brain +The base Academy classes also defines several important properties that you can set in the Unity Editor Inspector. For training, the most important of these properties is `Max Steps`, which determines how long each training episode lasts. Once the Academy's step counter reaches this value, it calls the `AcademyReset()` function to start the next episode. + + See [Academy](Learning-Environment-Design-Academy.md) for a complete list of the Academy properties and their uses. -The Brain encapsulates the decision making process. Brain objects must be -children of the Academy in the Unity scene hierarchy. Every Agent must be -assigned a Brain, but you can use the same Brain with more than one Agent. +### Brain + +The Brain encapsulates the decision making process. Brain objects must be children of the Academy in the Unity scene hierarchy. Every Agent must be assigned a Brain, but you can use the same Brain with more than one Agent. -Use the Brain class directly, rather than a subclass. Brain behavior is -determined by the Brain type. During training, set your Agent's Brain type to -**External**. To use the trained model, import the model file into the Unity -project and change the Brain type to **Internal**. See -[Brains](Learning-Environment-Design-Brains.md) for details on using the -different types of Brains. You can extend the CoreBrain class to create -different Brain types if the four built-in types don't do what you need. +Use the Brain class directly, rather than a subclass. Brain behavior is determined by the brain type. During training, set your agent's brain type to **External**. To use the trained model, import the model file into the Unity project and change the brain type to **Internal**. See [Brains](Learning-Environment-Design-Brains.md) for details on using the different types of brains. You can extend the CoreBrain class to create different brain types if the four built-in types don't do what you need. -The Brain class has several important properties that you can set using the -Inspector window. These properties must be appropriate for the Agents using the -Brain. For example, the `Vector Observation Space Size` property must match the -length of the feature vector created by an Agent exactly. See -[Agents](Learning-Environment-Design-Agents.md) for information about creating -agents and setting up a Brain instance correctly. +The Brain class has several important properties that you can set using the Inspector window. These properties must be appropriate for the agents using the brain. For example, the `Vector Observation Space Size` property must match the length of the feature vector created by an agent exactly. See [Agents](Learning-Environment-Design-Agents.md) for information about creating agents and setting up a Brain instance correctly. -See [Brains](Learning-Environment-Design-Brains.md) for a complete list of the -Brain properties. +See [Brains](Learning-Environment-Design-Brains.md) for a complete list of the Brain properties. ### Agent -The Agent class represents an actor in the scene that collects observations and -carries out actions. The Agent class is typically attached to the GameObject in -the scene that otherwise represents the actor — for example, to a player object -in a football game or a car object in a vehicle simulation. Every Agent must be -assigned a Brain. - -To create an Agent, extend the Agent class and implement the essential -`CollectObservations()` and `AgentAction()` methods: +The Agent class represents an actor in the scene that collects observations and carries out actions. The Agent class is typically attached to the GameObject in the scene that otherwise represents the actor — for example, to a player object in a football game or a car object in a vehicle simulation. Every Agent must be assigned a Brain. -* `CollectObservations()` — Collects the Agent's observation of its environment. -* `AgentAction()` — Carries out the action chosen by the Agent's Brain and - assigns a reward to the current state. +To create an agent, extend the Agent class and implement the essential `CollectObservations()` and `AgentAction()` methods: -Your implementations of these functions determine how the properties of the -Brain assigned to this Agent must be set. +* `CollectObservations()` — Collects the agent's observation of its environment. +* `AgentAction()` — Carries out the action chosen by the agent's brain and assigns a reward to the current state. -You must also determine how an Agent finishes its task or times out. You can -manually set an Agent to done in your `AgentAction()` function when the Agent -has finished (or irrevocably failed) its task. You can also set the Agent's `Max -Steps` property to a positive value and the Agent will consider itself done -after it has taken that many steps. When the Academy reaches its own `Max Steps` -count, it starts the next episode. If you set an Agent's `ResetOnDone` property -to true, then the Agent can attempt its task several times in one episode. (Use -the `Agent.AgentReset()` function to prepare the Agent to start again.) +Your implementations of these functions determine how the properties of the Brain assigned to this agent must be set. + +You must also determine how an Agent finishes its task or times out. You can manually set an agent to done in your `AgentAction()` function when the agent has finished (or irrevocably failed) its task. You can also set the agent's `Max Steps` property to a positive value and the agent will consider itself done after it has taken that many steps. When the Academy reaches its own `Max Steps` count, it starts the next episode. If you set an agent's `ResetOnDone` property to true, then the agent can attempt its task several times in one episode. (Use the `Agent.AgentReset()` function to prepare the agent to start again.) -See [Agents](Learning-Environment-Design-Agents.md) for detailed information -about programing your own Agents. +See [Agents](Learning-Environment-Design-Agents.md) for detailed information about programing your own agents. ## Environments -An _environment_ in the ML-Agents toolkit can be any scene built in Unity. The -Unity scene provides the environment in which agents observe, act, and learn. -How you set up the Unity scene to serve as a learning environment really depends -on your goal. You may be trying to solve a specific reinforcement learning -problem of limited scope, in which case you can use the same scene for both -training and for testing trained agents. Or, you may be training agents to -operate in a complex game or simulation. In this case, it might be more -efficient and practical to create a purpose-built training scene. - -Both training and testing (or normal game) scenes must contain an Academy object -to control the agent decision making process. The Academy defines several -properties that can be set differently for a training scene versus a regular -scene. The Academy's **Configuration** properties control rendering and time -scale. You can set the **Training Configuration** to minimize the time Unity -spends rendering graphics in order to speed up training. You may need to adjust -the other functional, Academy settings as well. For example, `Max Steps` should -be as short as possible for training — just long enough for the agent to -accomplish its task, with some extra time for "wandering" while it learns. In -regular scenes, you often do not want the Academy to reset the scene at all; if -so, `Max Steps` should be set to zero. - -When you create a training environment in Unity, you must set up the scene so -that it can be controlled by the external training process. Considerations -include: - -* The training scene must start automatically when your Unity application is - launched by the training process. -* The scene must include at least one **External** Brain. -* The Academy must reset the scene to a valid starting point for each episode of - training. -* A training episode must have a definite end — either using `Max Steps` or by - each Agent setting itself to `done`. +An _environment_ in the ML-Agents toolkit can be any scene built in Unity. The Unity scene provides the environment in which agents observe, act, and learn. How you set up the Unity scene to serve as a learning environment really depends on your goal. You may be trying to solve a specific reinforcement learning problem of limited scope, in which case you can use the same scene for both training and for testing trained agents. Or, you may be training agents to operate in a complex game or simulation. In this case, it might be more efficient and practical to create a purpose-built training scene. + +Both training and testing (or normal game) scenes must contain an Academy object to control the agent decision making process. The Academy defines several properties that can be set differently for a training scene versus a regular scene. The Academy's **Configuration** properties control rendering and time scale. You can set the **Training Configuration** to minimize the time Unity spends rendering graphics in order to speed up training. You may need to adjust the other functional, Academy settings as well. For example, `Max Steps` should be as short as possible for training — just long enough for the agent to accomplish its task, with some extra time for "wandering" while it learns. In regular scenes, you often do not want the Academy to reset the scene at all; if so, `Max Steps` should be set to zero. + +When you create a training environment in Unity, you must set up the scene so that it can be controlled by the external training process. Considerations include: + +* The training scene must start automatically when your Unity application is launched by the training process. +* The scene must include at least one **External** brain. +* The Academy must reset the scene to a valid starting point for each episode of training. +* A training episode must have a definite end — either using `Max Steps` or by each agent setting itself to `done`. + diff --git a/docs/Learning-Environment-Examples.md b/docs/Learning-Environment-Examples.md index e9dd0eb16e..84a5132497 100644 --- a/docs/Learning-Environment-Examples.md +++ b/docs/Learning-Environment-Examples.md @@ -1,38 +1,36 @@ # Example Learning Environments -The Unity ML-Agents toolkit contains an expanding set of example environments -which demonstrate various features of the platform. Environments are located in -`UnitySDK/Assets/ML-Agents/Examples` and summarized below. Additionally, our -[first ML Challenge](https://connect.unity.com/challenges/ml-agents-1) contains -environments created by the community. +The Unity ML-Agents toolkit contains an expanding set of example environments which +demonstrate various features of the platform. Environments are located in +`unity-environment/Assets/ML-Agents/Examples` and summarized below. +Additionally, our +[first ML Challenge](https://connect.unity.com/challenges/ml-agents-1) +contains environments created by the community. -This page only overviews the example environments we provide. To learn more on -how to design and build your own environments see our [Making a New Learning -Environment](Learning-Environment-Create-New.md) page. +This page only overviews the example environments we provide. To learn more +on how to design and build your own environments see our +[Making a New Learning Environment](Learning-Environment-Create-New.md) +page. -Note: Environment scenes marked as _optional_ do not have accompanying -pre-trained model files, and are designed to serve as challenges for -researchers. +Note: Environment scenes marked as _optional_ do not have accompanying pre-trained model files, and are designed to serve as challenges for researchers. -If you would like to contribute environments, please see our -[contribution guidelines](../CONTRIBUTING.md) page. +If you would like to contribute environments, please see our +[contribution guidelines](../CONTRIBUTING.md) page. ## Basic ![Basic](images/basic.png) -* Set-up: A linear movement task where the agent must move left or right to - rewarding states. +* Set-up: A linear movement task where the agent must move left or right to rewarding states. * Goal: Move to the most reward state. -* Agents: The environment contains one agent linked to a single Brain. -* Agent Reward Function: - * +0.1 for arriving at suboptimal state. - * +1.0 for arriving at optimal state. -* Brains: One Brain with the following observation/action space. - * Vector Observation space: One variable corresponding to current state. - * Vector Action space: (Discrete) Two possible actions (Move left, move - right). - * Visual Observations: None. +* Agents: The environment contains one agent linked to a single brain. +* Agent Reward Function: + * +0.1 for arriving at suboptimal state. + * +1.0 for arriving at optimal state. +* Brains: One brain with the following observation/action space. + * Vector Observation space: (Discrete) One variable corresponding to current state. + * Vector Action space: (Discrete) Two possible actions (Move left, move right). + * Visual Observations: None. * Reset Parameters: None * Benchmark Mean Reward: 0.94 @@ -40,22 +38,17 @@ If you would like to contribute environments, please see our ![3D Balance Ball](images/balance.png) -* Set-up: A balance-ball task, where the agent controls the platform. -* Goal: The agent must balance the platform in order to keep the ball on it for - as long as possible. -* Agents: The environment contains 12 agents of the same kind, all linked to a - single Brain. -* Agent Reward Function: - * +0.1 for every step the ball remains on the platform. - * -1.0 if the ball falls from the platform. -* Brains: One Brain with the following observation/action space. - * Vector Observation space: 8 variables corresponding to rotation of platform, - and position, rotation, and velocity of ball. - * Vector Observation space (Hard Version): 5 variables corresponding to - rotation of platform and position and rotation of ball. - * Vector Action space: (Continuous) Size of 2, with one value corresponding to - X-rotation, and the other to Z-rotation. - * Visual Observations: None. +* Set-up: A balance-ball task, where the agent controls the platform. +* Goal: The agent must balance the platform in order to keep the ball on it for as long as possible. +* Agents: The environment contains 12 agents of the same kind, all linked to a single brain. +* Agent Reward Function: + * +0.1 for every step the ball remains on the platform. + * -1.0 if the ball falls from the platform. +* Brains: One brain with the following observation/action space. + * Vector Observation space: (Continuous) 8 variables corresponding to rotation of platform, and position, rotation, and velocity of ball. + * Vector Observation space (Hard Version): (Continuous) 5 variables corresponding to rotation of platform and position and rotation of ball. + * Vector Action space: (Continuous) Size of 2, with one value corresponding to X-rotation, and the other to Z-rotation. + * Visual Observations: None. * Reset Parameters: None * Benchmark Mean Reward: 100 @@ -63,48 +56,34 @@ If you would like to contribute environments, please see our ![GridWorld](images/gridworld.png) -* Set-up: A version of the classic grid-world task. Scene contains agent, goal, - and obstacles. -* Goal: The agent must navigate the grid to the goal while avoiding the - obstacles. -* Agents: The environment contains one agent linked to a single Brain. -* Agent Reward Function: - * -0.01 for every step. - * +1.0 if the agent navigates to the goal position of the grid (episode ends). - * -1.0 if the agent navigates to an obstacle (episode ends). -* Brains: One Brain with the following observation/action space. - * Vector Observation space: None - * Vector Action space: (Discrete) Size of 4, corresponding to movement in - cardinal directions. Note that for this environment, - [action masking](Learning-Environment-Design-Agents.md#masking-discrete-actions) - is turned on by default (this option can be toggled - using the `Mask Actions` checkbox within the `trueAgent` GameObject). - The trained model file provided was generated with action masking turned on. - * Visual Observations: One corresponding to top-down view of GridWorld. -* Reset Parameters: Three, corresponding to grid size, number of obstacles, and - number of goals. +* Set-up: A version of the classic grid-world task. Scene contains agent, goal, and obstacles. +* Goal: The agent must navigate the grid to the goal while avoiding the obstacles. +* Agents: The environment contains one agent linked to a single brain. +* Agent Reward Function: + * -0.01 for every step. + * +1.0 if the agent navigates to the goal position of the grid (episode ends). + * -1.0 if the agent navigates to an obstacle (episode ends). +* Brains: One brain with the following observation/action space. + * Vector Observation space: None + * Vector Action space: (Discrete) Size of 4, corresponding to movement in cardinal directions. + * Visual Observations: One corresponding to top-down view of GridWorld. +* Reset Parameters: Three, corresponding to grid size, number of obstacles, and number of goals. * Benchmark Mean Reward: 0.8 ## [Tennis](https://youtu.be/RDaIh7JX6RI) ![Tennis](images/tennis.png) -* Set-up: Two-player game where agents control rackets to bounce ball over a - net. -* Goal: The agents must bounce ball between one another while not dropping or - sending ball out of bounds. -* Agents: The environment contains two agent linked to a single Brain named - TennisBrain. After training you can attach another Brain named MyBrain to one - of the agent to play against your trained model. -* Agent Reward Function (independent): - * +0.1 To agent when hitting ball over net. - * -0.1 To agent who let ball hit their ground, or hit ball out of bounds. -* Brains: One Brain with the following observation/action space. - * Vector Observation space: 8 variables corresponding to position and velocity - of ball and racket. - * Vector Action space: (Continuous) Size of 2, corresponding to movement - toward net or away from net, and jumping. - * Visual Observations: None. +* Set-up: Two-player game where agents control rackets to bounce ball over a net. +* Goal: The agents must bounce ball between one another while not dropping or sending ball out of bounds. +* Agents: The environment contains two agent linked to a single brain named TennisBrain. After training you can attach another brain named MyBrain to one of the agent to play against your trained model. +* Agent Reward Function (independent): + * +0.1 To agent when hitting ball over net. + * -0.1 To agent who let ball hit their ground, or hit ball out of bounds. +* Brains: One brain with the following observation/action space. + * Vector Observation space: (Continuous) 8 variables corresponding to position and velocity of ball and racket. + * Vector Action space: (Continuous) Size of 2, corresponding to movement toward net or away from net, and jumping. + * Visual Observations: None. * Reset Parameters: One, corresponding to size of ball. * Benchmark Mean Reward: 2.5 * Optional Imitation Learning scene: `TennisIL`. @@ -116,17 +95,13 @@ If you would like to contribute environments, please see our * Set-up: A platforming environment where the agent can push a block around. * Goal: The agent must push the block to the goal. * Agents: The environment contains one agent linked to a single brain. -* Agent Reward Function: - * -0.0025 for every step. - * +1.0 if the block touches the goal. +* Agent Reward Function: + * -0.0025 for every step. + * +1.0 if the block touches the goal. * Brains: One brain with the following observation/action space. - * Vector Observation space: (Continuous) 70 variables corresponding to 14 - ray-casts each detecting one of three possible objects (wall, goal, or - block). - * Vector Action space: (Discrete) Size of 6, corresponding to turn clockwise - and counterclockwise and move along four different face directions. - * Visual Observations (Optional): One first-person camera. Use - `VisualPushBlock` scene. + * Vector Observation space: (Continuous) 70 variables corresponding to 14 ray-casts each detecting one of three possible objects (wall, goal, or block). + * Vector Action space: (Continuous) Size of 2, corresponding to movement in X and Z directions. + * Visual Observations (Optional): One first-person camera. Use `VisualPushBlock` scene. * Reset Parameters: None. * Benchmark Mean Reward: 4.5 * Optional Imitation Learning scene: `PushBlockIL`. @@ -137,22 +112,15 @@ If you would like to contribute environments, please see our * Set-up: A platforming environment where the agent can jump over a wall. * Goal: The agent must use the block to scale the wall and reach the goal. -* Agents: The environment contains one agent linked to two different Brains. The - Brain the agent is linked to changes depending on the height of the wall. -* Agent Reward Function: - * -0.0005 for every step. - * +1.0 if the agent touches the goal. - * -1.0 if the agent falls off the platform. -* Brains: Two Brains, each with the following observation/action space. - * Vector Observation space: Size of 74, corresponding to 14 ray casts each - detecting 4 possible objects. plus the global position of the agent and - whether or not the agent is grounded. - * Vector Action space: (Discrete) 4 Branches: - * Forward Motion (3 possible actions: Forward, Backwards, No Action) - * Rotation (3 possible actions: Rotate Left, Rotate Right, No Action) - * Side Motion (3 possible actions: Left, Right, No Action) - * Jump (2 possible actions: Jump, No Action) - * Visual Observations: None. +* Agents: The environment contains one agent linked to two different brains. The brain the agent is linked to changes depending on the height of the wall. +* Agent Reward Function: + * -0.0005 for every step. + * +1.0 if the agent touches the goal. + * -1.0 if the agent falls off the platform. +* Brains: Two brains, each with the following observation/action space. + * Vector Observation space: (Continuous) 16 variables corresponding to position and velocities of agent, block, and goal, plus the height of the wall. + * Vector Action space: (Discrete) Size of 74, corresponding to 14 raycasts each detecting 4 possible objects. plus the global position of the agent and whether or not the agent is grounded. + * Visual Observations: None. * Reset Parameters: 4, corresponding to the height of the possible walls. * Benchmark Mean Reward (Big & Small Wall Brain): 0.8 @@ -162,15 +130,13 @@ If you would like to contribute environments, please see our * Set-up: Double-jointed arm which can move to target locations. * Goal: The agents must move it's hand to the goal location, and keep it there. -* Agents: The environment contains 10 agent linked to a single Brain. -* Agent Reward Function (independent): - * +0.1 Each step agent's hand is in goal location. -* Brains: One Brain with the following observation/action space. - * Vector Observation space: 26 variables corresponding to position, rotation, - velocity, and angular velocities of the two arm Rigidbodies. - * Vector Action space: (Continuous) Size of 4, corresponding to torque - applicable to two joints. - * Visual Observations: None. +* Agents: The environment contains 10 agent linked to a single brain. +* Agent Reward Function (independent): + * +0.1 Each step agent's hand is in goal location. +* Brains: One brain with the following observation/action space. + * Vector Observation space: (Continuous) 26 variables corresponding to position, rotation, velocity, and angular velocities of the two arm Rigidbodies. + * Vector Action space: (Continuous) Size of 4, corresponding to torque applicable to two joints. + * Visual Observations: None. * Reset Parameters: Two, corresponding to goal size, and goal movement speed. * Benchmark Mean Reward: 30 @@ -180,19 +146,16 @@ If you would like to contribute environments, please see our * Set-up: A creature with 4 arms and 4 forearms. * Goal: The agents must move its body toward the goal direction without falling. - * `CrawlerStaticTarget` - Goal direction is always forward. - * `CrawlerDynamicTarget`- Goal direction is randomized. -* Agents: The environment contains 3 agent linked to a single Brain. -* Agent Reward Function (independent): - * +0.03 times body velocity in the goal direction. - * +0.01 times body direction alignment with goal direction. -* Brains: One Brain with the following observation/action space. - * Vector Observation space: 117 variables corresponding to position, rotation, - velocity, and angular velocities of each limb plus the acceleration and - angular acceleration of the body. - * Vector Action space: (Continuous) Size of 20, corresponding to target - rotations for joints. - * Visual Observations: None. + * `CrawlerStaticTarget` - Goal direction is always forward. + * `CrawlerDynamicTarget`- Goal direction is randomized. +* Agents: The environment contains 3 agent linked to a single brain. +* Agent Reward Function (independent): + * +0.03 times body velocity in the goal direction. + * +0.01 times body direction alignment with goal direction. +* Brains: One brain with the following observation/action space. + * Vector Observation space: (Continuous) 117 variables corresponding to position, rotation, velocity, and angular velocities of each limb plus the acceleration and angular acceleration of the body. + * Vector Action space: (Continuous) Size of 20, corresponding to target rotations for joints. + * Visual Observations: None. * Reset Parameters: None * Benchmark Mean Reward: 2000 @@ -200,49 +163,35 @@ If you would like to contribute environments, please see our ![Banana](images/banana.png) -* Set-up: A multi-agent environment where agents compete to collect bananas. -* Goal: The agents must learn to move to as many yellow bananas as possible - while avoiding blue bananas. -* Agents: The environment contains 5 agents linked to a single Brain. -* Agent Reward Function (independent): - * +1 for interaction with yellow banana - * -1 for interaction with blue banana. -* Brains: One Brain with the following observation/action space. - * Vector Observation space: 53 corresponding to velocity of agent (2), whether - agent is frozen and/or shot its laser (2), plus ray-based perception of - objects around agent's forward direction (49; 7 raycast angles with 7 - measurements for each). - * Vector Action space: (Discrete) 4 Branches: - * Forward Motion (3 possible actions: Forward, Backwards, No Action) - * Side Motion (3 possible actions: Left, Right, No Action) - * Rotation (3 possible actions: Rotate Left, Rotate Right, No Action) - * Laser (2 possible actions: Laser, No Action) - * Visual Observations (Optional): First-person camera per-agent. Use - `VisualBanana` scene. +* Set-up: A multi-agent environment where agents compete to collect bananas. +* Goal: The agents must learn to move to as many yellow bananas as possible while avoiding blue bananas. +* Agents: The environment contains 5 agents linked to a single brain. +* Agent Reward Function (independent): + * +1 for interaction with yellow banana + * -1 for interaction with blue banana. +* Brains: One brain with the following observation/action space. + * Vector Observation space: (Continuous) 53 corresponding to velocity of agent (2), whether agent is frozen and/or shot its laser (2), plus ray-based perception of objects around agent's forward direction (49; 7 raycast angles with 7 measurements for each). + * Vector Action space: (Continuous) Size of 3, corresponding to forward movement, y-axis rotation, and whether to use laser to disable other agents. + * Visual Observations (Optional): First-person camera per-agent. Use `VisualBanana` scene. * Reset Parameters: None. * Benchmark Mean Reward: 10 -* Optional Imitation Learning scene: `BananaIL`. +* Optional Imitation Learning scene: `BananaIL`. ## [Hallway](https://youtu.be/53GyfpPQRUQ) ![Hallway](images/hallway.png) -* Set-up: Environment where the agent needs to find information in a room, - remember it, and use it to move to the correct goal. -* Goal: Move to the goal which corresponds to the color of the block in the - room. -* Agents: The environment contains one agent linked to a single Brain. +* Set-up: Environment where the agent needs to find information in a room, remember it, and use it to move to the correct goal. +* Goal: Move to the goal which corresponds to the color of the block in the room. +* Agents: The environment contains one agent linked to a single brain. * Agent Reward Function (independent): - * +1 For moving to correct goal. - * -0.1 For moving to incorrect goal. - * -0.0003 Existential penalty. -* Brains: One Brain with the following observation/action space: - * Vector Observation space: 30 corresponding to local ray-casts detecting - objects, goals, and walls. - * Vector Action space: (Discrete) 1 Branch, 4 actions corresponding to agent - rotation and forward/backward movement. - * Visual Observations (Optional): First-person view for the agent. Use - `VisualHallway` scene. + * +1 For moving to correct goal. + * -0.1 For moving to incorrect goal. + * -0.0003 Existential penalty. +* Brains: One brain with the following observation/action space: + * Vector Observation space: (Continuous) 30 corresponding to local ray-casts detecting objects, goals, and walls. + * Vector Action space: (Discrete) 4 corresponding to agent rotation and forward/backward movement. + * Visual Observations (Optional): First-person view for the agent. Use `VisualHallway` scene. * Reset Parameters: None. * Benchmark Mean Reward: 0.7 * Optional Imitation Learning scene: `HallwayIL`. @@ -251,20 +200,17 @@ If you would like to contribute environments, please see our ![Bouncer](images/bouncer.png) -* Set-up: Environment where the agent needs on-demand decision making. The agent - must decide how perform its next bounce only when it touches the ground. +* Set-up: Environment where the agent needs on-demand decision making. The agent must decide how perform its next bounce only when it touches the ground. * Goal: Catch the floating banana. Only has a limited number of jumps. -* Agents: The environment contains one agent linked to a single Brain. +* Agents: The environment contains one agent linked to a single brain. * Agent Reward Function (independent): - * +1 For catching the banana. - * -1 For bouncing out of bounds. - * -0.05 Times the action squared. Energy expenditure penalty. -* Brains: One Brain with the following observation/action space: - * Vector Observation space: 6 corresponding to local position of agent and - banana. - * Vector Action space: (Continuous) 3 corresponding to agent force applied for - the jump. - * Visual Observations: None. + * +1 For catching the banana. + * -1 For bouncing out of bounds. + * -0.05 Times the action squared. Energy expenditure penalty. +* Brains: One brain with the following observation/action space: + * Vector Observation space: (Continuous) 6 corresponding to local position of agent and banana. + * Vector Action space: (Continuous) 3 corresponding to agent force applied for the jump. + * Visual Observations: None. * Reset Parameters: None. * Benchmark Mean Reward: 2.5 @@ -272,56 +218,45 @@ If you would like to contribute environments, please see our ![SoccerTwos](images/soccer.png) -* Set-up: Environment where four agents compete in a 2 vs 2 toy soccer game. +* Set-up: Environment where four agents compete in a 2 vs 2 toy soccer game. * Goal: - * Striker: Get the ball into the opponent's goal. - * Goalie: Prevent the ball from entering its own goal. -* Agents: The environment contains four agents, with two linked to one Brain - (strikers) and two linked to another (goalies). + * Striker: Get the ball into the opponent's goal. + * Goalie: Prevent the ball from entering its own goal. +* Agents: The environment contains four agents, with two linked to one brain (strikers) and two linked to another (goalies). * Agent Reward Function (dependent): - * Striker: - * +1 When ball enters opponent's goal. - * -0.1 When ball enters own team's goal. - * -0.001 Existential penalty. - * Goalie: - * -1 When ball enters team's goal. - * +0.1 When ball enters opponents goal. - * +0.001 Existential bonus. -* Brains: Two Brain with the following observation/action space: - * Vector Observation space: 112 corresponding to local 14 ray casts, each - detecting 7 possible object types, along with the object's distance. - Perception is in 180 degree view from front of agent. - * Vector Action space: (Discrete) One Branch - * Striker: 6 actions corresponding to forward, backward, sideways movement, - as well as rotation. - * Goalie: 4 actions corresponding to forward, backward, sideways movement. - * Visual Observations: None. + * Striker: + * +1 When ball enters opponent's goal. + * -0.1 When ball enters own team's goal. + * -0.001 Existential penalty. + * Goalie: + * -1 When ball enters team's goal. + * +0.1 When ball enters opponents goal. + * +0.001 Existential bonus. +* Brains: Two brain with the following observation/action space: + * Vector Observation space: (Continuous) 112 corresponding to local 14 ray casts, each detecting 7 possible object types, along with the object's distance. Perception is in 180 degree view from front of agent. + * Vector Action space: (Discrete) + * Striker: 6 corresponding to forward, backward, sideways movement, as well as rotation. + * Goalie: 4 corresponding to forward, backward, sideways movement. + * Visual Observations: None. * Reset Parameters: None -* Benchmark Mean Reward (Striker & Goalie Brain): 0 (the means will be inverse - of each other and criss crosses during training) +* Benchmark Mean Reward (Striker & Goalie Brain): 0 (the means will be inverse of each other and criss crosses during training) ## Walker ![Walker](images/walker.png) -* Set-up: Physics-based Humanoids agents with 26 degrees of freedom. These DOFs - correspond to articulation of the following body-parts: hips, chest, spine, - head, thighs, shins, feet, arms, forearms and hands. -* Goal: The agents must move its body toward the goal direction as quickly as - possible without falling. -* Agents: The environment contains 11 independent agent linked to a single - Brain. -* Agent Reward Function (independent): - * +0.03 times body velocity in the goal direction. - * +0.01 times head y position. - * +0.01 times body direction alignment with goal direction. - * -0.01 times head velocity difference from body velocity. -* Brains: One Brain with the following observation/action space. - * Vector Observation space: 215 variables corresponding to position, rotation, - velocity, and angular velocities of each limb, along with goal direction. - * Vector Action space: (Continuous) Size of 39, corresponding to target - rotations applicable to the joints. - * Visual Observations: None. +* Set-up: Physics-based Humanoids agents with 26 degrees of freedom. These DOFs correspond to articulation of the following body-parts: hips, chest, spine, head, thighs, shins, feets, arms, forearms and hands. +* Goal: The agents must move its body toward the goal direction as quickly as possible without falling. +* Agents: The environment contains 11 independent agent linked to a single brain. +* Agent Reward Function (independent): + * +0.03 times body velocity in the goal direction. + * +0.01 times head y position. + * +0.01 times body direction alignment with goal direction. + * -0.01 times head velocity difference from body velocity. +* Brains: One brain with the following observation/action space. + * Vector Observation space: (Continuous) 215 variables corresponding to position, rotation, velocity, and angular velocities of each limb, along with goal direction. + * Vector Action space: (Continuous) Size of 39, corresponding to target rotations applicable to the joints. + * Visual Observations: None. * Reset Parameters: None. * Benchmark Mean Reward: 1000 @@ -329,21 +264,15 @@ If you would like to contribute environments, please see our ![Pyramids](images/pyramids.png) -* Set-up: Environment where the agent needs to press a button to spawn a - pyramid, then navigate to the pyramid, knock it over, and move to the gold - brick at the top. +* Set-up: Environment where the agent needs to press a button to spawn a pyramid, then navigate to the pyramid, knock it over, and move to the gold brick at the top. * Goal: Move to the golden brick on top of the spawned pyramid. -* Agents: The environment contains one agent linked to a single Brain. +* Agents: The environment contains one agent linked to a single brain. * Agent Reward Function (independent): - * +2 For moving to golden brick (minus 0.001 per step). -* Brains: One Brain with the following observation/action space: - * Vector Observation space: 148 corresponding to local ray-casts detecting - switch, bricks, golden brick, and walls, plus variable indicating switch - state. - * Vector Action space: (Discrete) 4 corresponding to agent rotation and - forward/backward movement. - * Visual Observations (Optional): First-person camera per-agent. Us - `VisualPyramids` scene. + * +2 For moving to golden brick (minus 0.001 per step). +* Brains: One brain with the following observation/action space: + * Vector Observation space: (Continuous) 148 corresponding to local ray-casts detecting switch, bricks, golden brick, and walls, plus variable indicating switch state. + * Vector Action space: (Discrete) 4 corresponding to agent rotation and forward/backward movement. + * Visual Observations (Optional): First-person camera per-agent. Use `VisualPyramids` scene. * Reset Parameters: None. * Optional Imitation Learning scene: `PyramidsIL`. * Benchmark Mean Reward: 1.75 diff --git a/docs/Learning-Environment-Executable.md b/docs/Learning-Environment-Executable.md index 829fea10b0..8fde6e8fe7 100644 --- a/docs/Learning-Environment-Executable.md +++ b/docs/Learning-Environment-Executable.md @@ -1,15 +1,11 @@ # Using an Environment Executable -This section will help you create and use built environments rather than the -Editor to interact with an environment. Using an executable has some advantages -over using the Editor: +This section will help you create and use built environments rather than the Editor to interact with an environment. Using an executable has some advantages over using the Editor : -* You can exchange executable with other people without having to share your - entire repository. -* You can put your executable on a remote machine for faster training. -* You can use `Headless` mode for faster training. -* You can keep using the Unity Editor for other tasks while the agents are - training. + * You can exchange executable with other people without having to share your entire repository. + * You can put your executable on a remote machine for faster training. + * You can use `Headless` mode for faster training. + * You can keep using the Unity Editor for other tasks while the agents are training. ## Building the 3DBall environment @@ -18,202 +14,91 @@ environment: 1. Launch Unity. 2. On the Projects dialog, choose the **Open** option at the top of the window. -3. Using the file dialog that opens, locate the `UnitySDK` folder within the - ML-Agents project and click **Open**. -4. In the **Project** window, navigate to the folder - `Assets/ML-Agents/Examples/3DBall/`. -5. Double-click the `3DBall` file to load the scene containing the Balance Ball - environment. +3. Using the file dialog that opens, locate the `unity-environment` folder +within the ML-Agents project and click **Open**. +4. In the **Project** window, navigate to the folder +`Assets/ML-Agents/Examples/3DBall/`. +5. Double-click the `3DBall` file to load the scene containing the Balance +Ball environment. ![3DBall Scene](images/mlagents-Open3DBall.png) -Make sure the Brains in the scene have the right type. For example, if you want -to be able to control your agents from Python, you will need to set the -corresponding Brain to **External**. +Make sure the Brains in the scene have the right type. For example, if you want to be able to control your agents from Python, you will need to set the corresponding brain to **External**. -1. In the **Scene** window, click the triangle icon next to the Ball3DAcademy - object. +1. In the **Scene** window, click the triangle icon next to the Ball3DAcademy +object. 2. Select its child object **Ball3DBrain**. 3. In the Inspector window, set **Brain Type** to **External**. ![Set Brain to External](images/mlagents-SetExternalBrain.png) -Next, we want the set up scene to play correctly when the training process +Next, we want the set up scene to play correctly when the training process launches our environment executable. This means: - -* The environment application runs in the background. -* No dialogs require interaction. -* The correct scene loads automatically. - +* The environment application runs in the background +* No dialogs require interaction +* The correct scene loads automatically + 1. Open Player Settings (menu: **Edit** > **Project Settings** > **Player**). 2. Under **Resolution and Presentation**: - * Ensure that **Run in Background** is Checked. - * Ensure that **Display Resolution Dialog** is set to Disabled. + - Ensure that **Run in Background** is Checked. + - Ensure that **Display Resolution Dialog** is set to Disabled. 3. Open the Build Settings window (menu:**File** > **Build Settings**). 4. Choose your target platform. - * (optional) Select “Development Build” to [log debug - messages](https://docs.unity3d.com/Manual/LogFiles.html). -5. If any scenes are shown in the **Scenes in Build** list, make sure that the - 3DBall Scene is the only one checked. (If the list is empty, than only the - current scene is included in the build). + - (optional) Select “Development Build” to + [log debug messages](https://docs.unity3d.com/Manual/LogFiles.html). +5. If any scenes are shown in the **Scenes in Build** list, make sure that +the 3DBall Scene is the only one checked. (If the list is empty, than only the +current scene is included in the build). 6. Click **Build**: - * In the File dialog, navigate to your ML-Agents directory. - * Assign a file name and click **Save**. - * (For Windows)With Unity 2018.1, it will ask you to select a folder instead - of a file name. Create a subfolder within the ML-Agents folder and select - that folder to build. In the following steps you will refer to this - subfolder's name as `env_name`. + - In the File dialog, navigate to the `python` folder in your ML-Agents + directory. + - Assign a file name and click **Save**. + - (For Windows)With Unity 2018.1, it will ask you to select a folder instead of a file name. Create a subfolder within `python` folder and select that folder to build. In the following steps you will refer to this subfolder's name as `env_name`. ![Build Window](images/mlagents-BuildWindow.png) -Now that we have a Unity executable containing the simulation environment, we +Now that we have a Unity executable containing the simulation environment, we can interact with it. ## Interacting with the Environment - -If you want to use the [Python API](Python-API.md) to interact with your -executable, you can pass the name of the executable with the argument -'file_name' of the `UnityEnvironment`. For instance: +If you want to use the [Python API](Python-API.md) to interact with your executable, you can pass the name of the executable with the argument 'file_name' of the `UnityEnvironment`. For instance : ```python -from mlagents.envs import UnityEnvironment +from unityagents import UnityEnvironment env = UnityEnvironment(file_name=) ``` ## Training the Environment +1. Open a command or terminal window. +2. Nagivate to the folder where you installed ML-Agents. +3. Change to the python directory. +4. Run `python3 learn.py --run-id= --train` +Where: +- `` is the name and path to the executable you exported from Unity (without extension) +- `` is a string used to separate the results of different training runs +- And the `--train` tells learn.py to run a training session (rather than inference) -1. Open a command or terminal window. -2. Navigate to the folder where you installed the ML-Agents Toolkit. If you - followed the default [installation](Installation.md), then navigate to the - `ml-agents/` folder. -3. Run - `mlagents-learn --env= --run-id= --train` - Where: - * `` is the file path of the trainer configuration yaml - * `` is the name and path to the executable you exported from Unity - (without extension) - * `` is a string used to separate the results of different - training runs - * And the `--train` tells `mlagents-learn` to run a training session (rather - than inference) - -For example, if you are training with a 3DBall executable you exported to the -the directory where you installed the ML-Agents Toolkit, run: - -```sh -mlagents-learn ../config/trainer_config.yaml --env=3DBall --run-id=firstRun --train -``` +For example, if you are training with a 3DBall executable you exported to the ml-agents/python directory, run: -And you should see something like - -```console -ml-agents$ mlagents-learn config/trainer_config.yaml --env=3DBall --run-id=first-run --train - - - ▄▄▄▓▓▓▓ - ╓▓▓▓▓▓▓█▓▓▓▓▓ - ,▄▄▄m▀▀▀' ,▓▓▓▀▓▓▄ ▓▓▓ ▓▓▌ - ▄▓▓▓▀' ▄▓▓▀ ▓▓▓ ▄▄ ▄▄ ,▄▄ ▄▄▄▄ ,▄▄ ▄▓▓▌▄ ▄▄▄ ,▄▄ - ▄▓▓▓▀ ▄▓▓▀ ▐▓▓▌ ▓▓▌ ▐▓▓ ▐▓▓▓▀▀▀▓▓▌ ▓▓▓ ▀▓▓▌▀ ^▓▓▌ ╒▓▓▌ - ▄▓▓▓▓▓▄▄▄▄▄▄▄▄▓▓▓ ▓▀ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▄ ▓▓▌ - ▀▓▓▓▓▀▀▀▀▀▀▀▀▀▀▓▓▄ ▓▓ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▐▓▓ - ^█▓▓▓ ▀▓▓▄ ▐▓▓▌ ▓▓▓▓▄▓▓▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▓▄ ▓▓▓▓` - '▀▓▓▓▄ ^▓▓▓ ▓▓▓ └▀▀▀▀ ▀▀ ^▀▀ `▀▀ `▀▀ '▀▀ ▐▓▓▌ - ▀▀▀▀▓▄▄▄ ▓▓▓▓▓▓, ▓▓▓▓▀ - `▀█▓▓▓▓▓▓▓▓▓▌ - ¬`▀▀▀█▓ - - -INFO:mlagents.learn:{'--curriculum': 'None', - '--docker-target-name': 'Empty', - '--env': '3DBall', - '--help': False, - '--keep-checkpoints': '5', - '--lesson': '0', - '--load': False, - '--no-graphics': False, - '--num-runs': '1', - '--run-id': 'firstRun', - '--save-freq': '50000', - '--seed': '-1', - '--slow': False, - '--train': True, - '--worker-id': '0', - '': 'config/trainer_config.yaml'} ``` - -**Note**: If you're using Anaconda, don't forget to activate the ml-agents -environment first. - -If `mlagents-learn` runs correctly and starts training, you should see something -like this: - -```console -CrashReporter: initialized -Mono path[0] = '/Users/dericp/workspace/ml-agents/3DBall.app/Contents/Resources/Data/Managed' -Mono config path = '/Users/dericp/workspace/ml-agents/3DBall.app/Contents/MonoBleedingEdge/etc' -INFO:mlagents.envs: -'Ball3DAcademy' started successfully! -INFO:mlagents.envs: -'Ball3DAcademy' started successfully! -Unity Academy name: Ball3DAcademy - Number of Brains: 1 - Number of External Brains : 1 - Reset Parameters : - -Unity brain name: Ball3DBrain - Number of Visual Observations (per agent): 0 - Vector Observation space size (per agent): 8 - Number of stacked Vector Observation: 1 - Vector Action space type: continuous - Vector Action space size (per agent): [2] - Vector Action descriptions: , -INFO:mlagents.envs:Hyperparameters for the PPO Trainer of brain Ball3DBrain: - batch_size: 64 - beta: 0.001 - buffer_size: 12000 - epsilon: 0.2 - gamma: 0.995 - hidden_units: 128 - lambd: 0.99 - learning_rate: 0.0003 - max_steps: 5.0e4 - normalize: True - num_epoch: 3 - num_layers: 2 - time_horizon: 1000 - sequence_length: 64 - summary_freq: 1000 - use_recurrent: False - graph_scope: - summary_path: ./summaries/first-run-0 - memory_size: 256 - use_curiosity: False - curiosity_strength: 0.01 - curiosity_enc_size: 128 -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 1000. Mean Reward: 1.242. Std of Reward: 0.746. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 2000. Mean Reward: 1.319. Std of Reward: 0.693. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 3000. Mean Reward: 1.804. Std of Reward: 1.056. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 4000. Mean Reward: 2.151. Std of Reward: 1.432. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 5000. Mean Reward: 3.175. Std of Reward: 2.250. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 6000. Mean Reward: 4.898. Std of Reward: 4.019. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 7000. Mean Reward: 6.716. Std of Reward: 5.125. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 8000. Mean Reward: 12.124. Std of Reward: 11.929. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 9000. Mean Reward: 18.151. Std of Reward: 16.871. Training. -INFO:mlagents.trainers: first-run-0: Ball3DBrain: Step: 10000. Mean Reward: 27.284. Std of Reward: 28.667. Training. +python3 learn.py 3DBall --run-id=firstRun --train ``` -You can press Ctrl+C to stop the training, and your trained model will be at -`models//_.bytes`, which corresponds -to your model's latest checkpoint. You can now embed this trained model into -your Internal Brain by following the steps below: +![Training command example](images/training-command-example.png) + +**Note**: If you're using Anaconda, don't forget to activate the ml-agents environment first. + +If the learn.py runs correctly and starts training, you should see something like this: + +![Training running](images/training-running.png) + +You can press Ctrl+C to stop the training, and your trained model will be at `ml-agents/python/models//_.bytes`, which corresponds to your model's latest checkpoint. You can now embed this trained model into your internal brain by following the steps below: -1. Move your model file into - `UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/`. +1. Move your model file into +`unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/`. 2. Open the Unity Editor, and select the **3DBall** scene as described above. 3. Select the **Ball3DBrain** object from the Scene hierarchy. 4. Change the **Type of Brain** to **Internal**. -5. Drag the `_.bytes` file from the Project window of - the Editor to the **Graph Model** placeholder in the **Ball3DBrain** - inspector window. +5. Drag the `_.bytes` file from the Project window of the Editor +to the **Graph Model** placeholder in the **Ball3DBrain** inspector window. 6. Press the Play button at the top of the editor. diff --git a/docs/Limitations.md b/docs/Limitations.md index e16a0335e5..cc5bb2e113 100644 --- a/docs/Limitations.md +++ b/docs/Limitations.md @@ -1,28 +1,19 @@ -# Limitations +# Limitations ## Unity SDK - ### 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](https://docs.unity3d.com/Manual/ExecutionOrder.html) -for more information. +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](https://docs.unity3d.com/Manual/ExecutionOrder.html) for more information. ## Python API ### Python version +As of version 0.3, we no longer support Python 2. -As of version 0.3, we no longer support Python 2. - -### TensorFlow support - -Currently the Ml-Agents toolkit uses TensorFlow 1.7.1 due to the version of the -TensorFlowSharp plugin we are using. +### Tensorflow support +Currently the Ml-Agents toolkit uses TensorFlow 1.7.1 due to the version of the TensorFlowSharp plugin we are using. \ No newline at end of file diff --git a/docs/ML-Agents-Overview.md b/docs/ML-Agents-Overview.md index 52776a4ed1..1be054a645 100644 --- a/docs/ML-Agents-Overview.md +++ b/docs/ML-Agents-Overview.md @@ -1,220 +1,222 @@ # ML-Agents Toolkit Overview -**The Unity Machine Learning Agents Toolkit** (ML-Agents Toolkit) is an -open-source Unity plugin that enables games and simulations to serve as -environments for training intelligent agents. Agents can be trained using -reinforcement learning, imitation learning, neuroevolution, or other machine -learning methods through a simple-to-use Python API. We also provide -implementations (based on TensorFlow) of state-of-the-art algorithms to enable -game developers and hobbyists to easily train intelligent agents for 2D, 3D and -VR/AR games. These trained agents can be used for multiple purposes, including +**The Unity Machine Learning Agents Toolkit** (ML-Agents Toolkit) is an open-source Unity plugin +that enables games and simulations to serve as environments for training +intelligent agents. Agents can be trained using reinforcement learning, +imitation learning, neuroevolution, or other machine learning methods through +a simple-to-use Python API. We also provide implementations (based on +TensorFlow) of state-of-the-art algorithms to enable game developers +and hobbyists to easily train intelligent agents for 2D, 3D and VR/AR games. +These trained agents can be used for multiple purposes, 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 toolkit is mutually beneficial for -both game developers and AI researchers as it provides a central platform where -advances in AI can be evaluated on Unity’s rich environments and then made -accessible to the wider research and game developer communities. - -Depending on your background (i.e. researcher, game developer, hobbyist), you -may have very different questions on your mind at the moment. To make your -transition to the ML-Agents toolkit easier, we provide several background pages -that include overviews and helpful resources on the [Unity -Engine](Background-Unity.md), [machine learning](Background-Machine-Learning.md) -and [TensorFlow](Background-TensorFlow.md). We **strongly** recommend browsing -the relevant background pages if you're not familiar with a Unity scene, basic -machine learning concepts or have not previously heard of TensorFlow. +design decisions pre-release. The ML-Agents toolkit is mutually beneficial for both game +developers and AI researchers as it provides a central platform where advances +in AI can be evaluated on Unity’s rich environments and then made accessible +to the wider research and game developer communities. + +Depending on your background (i.e. researcher, game developer, hobbyist), +you may have very different questions on your mind at the moment. +To make your transition to the ML-Agents toolkit easier, we provide several background +pages that include overviews and helpful resources on the +[Unity Engine](Background-Unity.md), +[machine learning](Background-Machine-Learning.md) and +[TensorFlow](Background-TensorFlow.md). We **strongly** recommend browsing +the relevant background pages if you're not familiar with a Unity scene, +basic machine learning concepts or have not previously heard of TensorFlow. The remainder of this page contains a deep dive into ML-Agents, its key -components, different training modes and scenarios. By the end of it, you should -have a good sense of _what_ the ML-Agents toolkit allows you to do. The -subsequent documentation pages provide examples of _how_ to use ML-Agents. +components, different training modes and scenarios. By the end of it, you +should have a good sense of _what_ the ML-Agents toolkit allows you to do. The subsequent +documentation pages provide examples of _how_ to use ML-Agents. ## Running Example: Training NPC Behaviors To help explain the material and terminology in this page, we'll use a -hypothetical, running example throughout. We will explore the problem of -training the behavior of a non-playable character (NPC) in a game. (An NPC is a -game character that is never controlled by a human player and its behavior is -pre-defined by the game developer.) More specifically, let's assume we're -building a multi-player, war-themed game in which players control the soldiers. -In this game, we have a single NPC who serves as a medic, finding and reviving -wounded players. Lastly, let us assume that there are two teams, each with five -players and one NPC medic. +hypothetical, running example throughout. We will explore the +problem of training the behavior of a non-playable character (NPC) in a game. +(An NPC is a game character that is never controlled by a human player and +its behavior is pre-defined by the game developer.) More specifically, let's +assume we're building a multi-player, war-themed game in which players control +the soldiers. In this game, we have a single NPC who serves as a medic, finding +and reviving wounded players. Lastly, let us assume that there +are two teams, each with five players and one NPC medic. The behavior of a medic is quite complex. It first needs to avoid getting injured, which requires detecting when it is in danger and moving to a safe -location. Second, it needs to be aware of which of its team members are injured -and require assistance. In the case of multiple injuries, it needs to assess the -degree of injury and decide who to help first. Lastly, a good medic will always -place itself in a position where it can quickly help its team members. Factoring -in all of these traits means that at every instance, the medic needs to measure -several attributes of the environment (e.g. position of team members, position -of enemies, which of its team members are injured and to what degree) and then -decide on an action (e.g. hide from enemy fire, move to help one of its -members). Given the large number of settings of the environment and the large -number of actions that the medic can take, defining and implementing such -complex behaviors by hand is challenging and prone to errors. - -With ML-Agents, it is possible to _train_ the behaviors of such NPCs (called -**agents**) using a variety of methods. The basic idea is quite simple. We need -to define three entities at every moment of the game (called **environment**): - +location. Second, it needs to be aware of which of its team members are +injured and require assistance. In the case of multiple injuries, it needs to +assess the degree of injury and decide who to help first. Lastly, a good +medic will always place itself in a position where it can quickly help its +team members. Factoring in all of these traits means that at every instance, +the medic needs to measure several attributes of the environment (e.g. +position of team members, position of enemies, which of its team members are +injured and to what degree) and then decide on an action (e.g. hide from enemy +fire, move to help one of its members). Given the large number of settings of +the environment and the large number of actions that the medic can take, +defining and implementing such complex behaviors by hand is challenging and +prone to errors. + +With ML-Agents, it is possible to _train_ the behaviors of such NPCs +(called **agents**) using a variety of methods. The basic idea is quite simple. +We need to define three entities at every moment of the game +(called **environment**): - **Observations** - what the medic perceives about the environment. - Observations can be numeric and/or visual. Numeric observations measure - attributes of the environment from the point of view of the agent. For our - medic this would be attributes of the battlefield that are visible to it. For - most interesting environments, an agent will require several continuous - numeric observations. Visual observations, on the other hand, are images - generated from the cameras attached to the agent and represent what the agent - is seeing at that point in time. It is common to confuse an agent's - observation with the environment (or game) **state**. The environment state - represents information about the entire scene containing all the game - characters. The agents observation, however, only contains information that - the agent is aware of and is typically a subset of the environment state. For - example, the medic observation cannot include information about an enemy in - hiding that the medic is unaware of. -- **Actions** - what actions the medic can take. Similar to observations, - actions can either be continuous or discrete depending on the complexity of - the environment and agent. In the case of the medic, if the environment is a - simple grid world where only their location matters, then a discrete action - taking on one of four values (north, south, east, west) suffices. However, if - the environment is more complex and the medic can move freely then using two - continuous actions (one for direction and another for speed) is more - appropriate. +Observations can be numeric and/or visual. Numeric observations measure +attributes of the environment from the point of view of the agent. For +our medic this would be attributes of the battlefield that are visible to it. +Observations can either be _discrete_ or _continuous_ depending on the complexity +of the game and agent. For most interesting environments, an agent will require +several continuous numeric observations, while for simple environments with +a small number of unique configurations, a discrete observation will suffice. +Visual observations, on the other hand, are images generated from the cameras +attached to the agent and represent what the agent is seeing at that point +in time. It is common to confuse an agent's observation with the environment +(or game) **state**. The environment state represents information about the +entire scene containing all the game characters. The agents observation, +however, only contains information that the agent is aware of and is typically +a subset of the environment state. For example, the medic observation cannot +include information about an enemy in hiding that the medic is unaware of. +- **Actions** - what actions the medic can take. Similar +to observations, actions can either be continuous or discrete depending +on the complexity of the environment and agent. In the case of the medic, +if the environment is a simple grid world where only their location matters, +then a discrete action taking on one of four values (north, south, east, west) +suffices. However, if the environment is more complex and the medic can move +freely then using two continuous actions (one for direction and another +for speed) is more appropriate. - **Reward signals** - a scalar value indicating how well the medic is doing. - Note that the reward signal need not be provided at every moment, but only - when the medic performs an action that is good or bad. For example, it can - receive a large negative reward if it dies, a modest positive reward whenever - it revives a wounded team member, and a modest negative reward when a wounded - team member dies due to lack of assistance. Note that the reward signal is how - the objectives of the task are communicated to the agent, so they need to be - set up in a manner where maximizing reward generates the desired optimal - behavior. - -After defining these three entities (the building blocks of a **reinforcement -learning task**), we can now _train_ the medic's behavior. This is achieved by -simulating the environment for many trials where the medic, over time, learns -what is the optimal action to take for every observation it measures by -maximizing its future reward. The key is that by learning the actions that -maximize its reward, the medic is learning the behaviors that make it a good -medic (i.e. one who saves the most number of lives). In **reinforcement -learning** terminology, the behavior that is learned is called a **policy**, -which is essentially a (optimal) mapping from observations to actions. Note that +Note that the reward signal need not be +provided at every moment, but only when the medic performs an action that is +good or bad. For example, it can receive a large negative reward if it dies, +a modest positive reward whenever it revives a wounded team member, and a +modest negative reward when a wounded team member dies due to lack of +assistance. Note that the reward signal is how the objectives of the task +are communicated to the agent, so they need to be set up in a manner where +maximizing reward generates the desired optimal behavior. + +After defining these three entities (the building blocks of a +**reinforcement learning task**), +we can now _train_ the medic's behavior. This is achieved by simulating the +environment for many trials where the medic, over time, learns what is the +optimal action to take for every observation it measures by maximizing +its future reward. The key is that by learning the actions that maximize its +reward, the medic is learning the behaviors that make it a good medic (i.e. +one who saves the most number of lives). In **reinforcement learning** +terminology, the behavior that is learned is called a **policy**, which is +essentially a (optimal) mapping from observations to actions. Note that the process of learning a policy through running simulations is called the -**training phase**, while playing the game with an NPC that is using its learned -policy is called the **inference phase**. +**training phase**, while playing the game with an NPC that is using its +learned policy is called the **inference phase**. -The ML-Agents toolkit provides all the necessary tools for using Unity as the -simulation engine for learning the policies of different objects in a Unity -environment. In the next few sections, we discuss how the ML-Agents toolkit -achieves this and what features it provides. +The ML-Agents toolkit provides all the necessary tools for using Unity as the simulation +engine for learning the policies of different objects in a Unity environment. +In the next few sections, we discuss how the ML-Agents toolkit achieves this and what +features it provides. ## Key Components -The ML-Agents toolkit is a Unity plugin that contains three high-level -components: - -- **Learning Environment** - which contains the Unity scene and all the game - characters. -- **Python API** - which contains all the machine learning algorithms that are - used for training (learning a behavior or policy). Note that, unlike the - Learning Environment, the Python API is not part of Unity, but lives outside - and communicates with Unity through the External Communicator. -- **External Communicator** - which connects the Learning Environment with the - Python API. It lives within the Learning Environment. +The ML-Agents toolkit is a Unity plugin that contains three high-level components: +* **Learning Environment** - which contains the Unity scene and all the game +characters. +* **Python API** - which contains all the machine learning algorithms that are +used for training (learning a behavior or policy). Note that, unlike +the Learning Environment, the Python API is not part of Unity, but lives +outside and communicates with Unity through the External Communicator. +* **External Communicator** - which connects the Learning Environment +with the Python API. It lives within the Learning Environment.

- Simplified ML-Agents Scene Block Diagram + Simplified ML-Agents Scene Block Diagram

_Simplified block diagram of ML-Agents._ The Learning Environment contains three additional components that help -organize the Unity scene: - -- **Agents** - which is attached to a Unity GameObject (any character within a - scene) and handles generating its observations, performing the actions it - receives and assigning a reward (positive / negative) when appropriate. Each - Agent is linked to exactly one Brain. -- **Brains** - which encapsulates the logic for making decisions for the Agent. - In essence, the Brain is what holds on to the policy for each Agent and - determines which actions the Agent should take at each instance. More - specifically, it is the component that receives the observations and rewards - from the Agent and returns an action. -- **Academy** - which orchestrates the observation and decision making process. - Within the Academy, several environment-wide parameters such as the rendering - quality and the speed at which the environment is run can be specified. The - External Communicator lives within the Academy. - -Every Learning Environment will always have one global Academy and one Agent for -every character in the scene. While each Agent must be linked to a Brain, it is -possible for Agents that have similar observations and actions to be linked to -the same Brain. In our sample game, we have two teams each with their own medic. -Thus we will have two Agents in our Learning Environment, one for each medic, -but both of these medics can be linked to the same Brain. Note that these two -medics are linked to the same Brain because their _space_ of observations and -actions are similar. This does not mean that at each instance they will have -identical observation and action _values_. In other words, the Brain defines the -space of all possible observations and actions, while the Agents connected to it -(in this case the medics) can each have their own, unique observation and action -values. If we expanded our game to include tank driver NPCs, then the Agent -attached to those characters cannot share a Brain with the Agent linked to the -medics (medics and drivers have different actions). +organize the Unity scene: +* **Agents** - which is attached to a Unity GameObject (any character within a +scene) and handles generating its observations, performing the actions it +receives and assigning a reward (positive / negative) when appropriate. +Each Agent is linked to exactly one Brain. +* **Brains** - which encapsulates the logic for making decisions for the Agent. +In essence, the Brain is what holds on to the policy for each Agent and +determines which actions the Agent should take at each instance. More +specifically, it is the component that receives the observations and rewards +from the Agent and returns an action. +* **Academy** - which orchestrates the observation and decision making process. +Within the Academy, several environment-wide parameters such as the rendering +quality and the speed at which the environment is run can be specified. The +External Communicator lives within the Academy. + +Every Learning Environment will always have one global Academy and one Agent +for every character in the scene. While each Agent must be linked to a Brain, +it is possible for Agents that have similar observations and actions to be +linked to the same Brain. In our sample game, we have two teams each with +their own medic. Thus we will have two Agents in our Learning Environment, +one for each medic, but both of these medics can be linked to the same Brain. +Note that these two medics are linked to the same Brain because their _space_ +of observations and actions are similar. This does not mean that at each +instance they will have identical observation and action _values_. In other +words, the Brain defines the space of all possible observations and actions, +while the Agents connected to it (in this case the medics) can each have +their own, unique observation and action values. If we expanded our game +to include tank driver NPCs, then the Agent attached to those characters +cannot share a Brain with the Agent linked to the medics (medics and drivers +have different actions).

- Example ML-Agents Scene Block Diagram + Example ML-Agents Scene Block Diagram

_Example block diagram of ML-Agents toolkit for our sample game._ -We have yet to discuss how the ML-Agents toolkit trains behaviors, and what role -the Python API and External Communicator play. Before we dive into those -details, let's summarize the earlier components. Each character is attached to -an Agent, and each Agent is linked to a Brain. The Brain receives observations -and rewards from the Agent and returns actions. The Academy ensures that all the +We have yet to discuss how the ML-Agents toolkit trains behaviors, and what role the +Python API and External Communicator play. Before we dive into those details, +let's summarize the earlier components. Each character is attached to an Agent, +and each Agent is linked to a Brain. The Brain receives observations and +rewards from the Agent and returns actions. The Academy ensures that all the Agents and Brains are in sync in addition to controlling environment-wide settings. So how does the Brain control what the Agent does? In practice, we have four different types of Brains, which enable a wide range of training and inference scenarios: - -- **External** - where decisions are made using the Python API. Here, the - observations and rewards collected by the Brain are forwarded to the Python - API through the External Communicator. The Python API then returns the - corresponding action that needs to be taken by the Agent. -- **Internal** - where decisions are made using an embedded - [TensorFlow](Background-TensorFlow.md) model. The embedded TensorFlow model - represents a learned policy and the Brain directly uses this model to - determine the action for each Agent. -- **Player** - where decisions are made using real input from a keyboard or - controller. Here, a human player is controlling the Agent and the observations - and rewards collected by the Brain are not used to control the Agent. -- **Heuristic** - where decisions are made using hard-coded behavior. This - resembles how most character behaviors are currently defined and can be - helpful for debugging or comparing how an Agent with hard-coded rules compares - to an Agent whose behavior has been trained. In our example, once we have - trained a Brain for the medics we could assign a medic on one team to the - trained Brain and assign the medic on the other team a Heuristic Brain with - hard-coded behaviors. We can then evaluate which medic is more effective. - -As currently described, it may seem that the External Communicator and Python -API are only leveraged by the External Brain. This is not true. It is possible -to configure the Internal, Player and Heuristic Brains to also send the -observations, rewards and actions to the Python API through the External -Communicator (a feature called _broadcasting_). As we will see shortly, this -enables additional training modes. +* **External** - where decisions are made using the Python API. Here, the +observations and rewards collected by the Brain are forwarded to the Python +API through the External Communicator. The Python API then returns the +corresponding action that needs to be taken by the Agent. +* **Internal** - where decisions are made using an embedded +[TensorFlow](Background-TensorFlow.md) model. +The embedded TensorFlow model represents a learned policy and the Brain +directly uses this model to determine the action for each Agent. +* **Player** - where decisions are made using real input from a keyboard or +controller. Here, a human player is controlling the Agent and the observations +and rewards collected by the Brain are not used to control the Agent. +* **Heuristic** - where decisions are made using hard-coded behavior. This +resembles how most character behaviors are currently defined and can be +helpful for debugging or comparing how an Agent with hard-coded rules compares +to an Agent whose behavior has been trained. In our example, once we have +trained a Brain for the medics we could assign a medic on one team to the +trained Brain and assign the medic on the other team a Heuristic Brain +with hard-coded behaviors. We can then evaluate which medic is more effective. + +As currently described, it may seem that the External Communicator +and Python API are only leveraged by the External Brain. This is not true. +It is possible to configure the Internal, Player and Heuristic Brains to +also send the observations, rewards and actions to the Python API through +the External Communicator (a feature called _broadcasting_). As we will see +shortly, this enables additional training modes.

- ML-Agents Scene Block Diagram + ML-Agents Scene Block Diagram

-_An example of how a scene containing multiple Agents and Brains might be +_An example of how a scene containing multiple Agents and Brains might be configured._ ## Training Modes @@ -224,31 +226,31 @@ inference can proceed. ### Built-in Training and Inference -As mentioned previously, the ML-Agents toolkit ships with several -implementations of state-of-the-art algorithms for training intelligent agents. -In this mode, the Brain type is set to External during training and Internal -during inference. More specifically, during training, all the medics in the -scene send their observations to the Python API through the External -Communicator (this is the behavior with an External Brain). The Python API -processes these observations and sends back actions for each medic to take. -During training these actions are mostly exploratory to help the Python API -learn the best policy for each medic. Once training concludes, the learned -policy for each medic can be exported. Given that all our implementations are -based on TensorFlow, the learned policy is just a TensorFlow model file. Then -during the inference phase, we switch the Brain type to Internal and include the -TensorFlow model generated from the training phase. Now during the inference -phase, the medics still continue to generate their observations, but instead of -being sent to the Python API, they will be fed into their (internal, embedded) -model to generate the _optimal_ action for each medic to take at every point in -time. - -To summarize: our built-in implementations are based on TensorFlow, thus, during -training the Python API uses the observations it receives to learn a TensorFlow -model. This model is then embedded within the Internal Brain during inference to -generate the optimal actions for all Agents linked to that Brain. **Note that -our Internal Brain is currently experimental as it is limited to TensorFlow -models and leverages the third-party -[TensorFlowSharp](https://github.com/migueldeicaza/TensorFlowSharp) library.** +As mentioned previously, the ML-Agents toolkit ships with several implementations of +state-of-the-art algorithms for training intelligent agents. In this mode, the +Brain type is set to External during training and Internal during inference. +More specifically, during training, all the medics in the scene send their +observations to the Python API through the External Communicator (this is the +behavior with an External Brain). The Python API processes these observations +and sends back actions for each medic to take. During training these actions +are mostly exploratory to help the Python API learn the best policy for each +medic. Once training concludes, the learned policy for each medic can be +exported. Given that all our implementations are based on TensorFlow, the +learned policy is just a TensorFlow model file. Then during the inference +phase, we switch the Brain type to Internal and include the TensorFlow model +generated from the training phase. Now during the inference phase, the medics +still continue to generate their observations, but instead of being sent to +the Python API, they will be fed into their (internal, embedded) model to +generate the _optimal_ action for each medic to take at every point in time. + +To summarize: our built-in implementations are based on TensorFlow, thus, +during training the Python API uses the observations it receives to learn +a TensorFlow model. This model is then embedded within the Internal Brain +during inference to generate the optimal actions for all Agents linked to +that Brain. **Note that our Internal Brain is currently experimental as it +is limited to TensorFlow models and leverages the third-party +[TensorFlowSharp](https://github.com/migueldeicaza/TensorFlowSharp) +library.** The [Getting Started with the 3D Balance Ball Example](Getting-Started-with-Balance-Ball.md) @@ -256,196 +258,201 @@ tutorial covers this training mode with the **3D Balance Ball** sample environme ### Custom Training and Inference -In the previous mode, the External Brain type was used for training to generate -a TensorFlow model that the Internal Brain type can understand and use. However, -any user of the ML-Agents toolkit can leverage their own algorithms for both -training and inference. In this case, the Brain type would be set to External -for both training and inferences phases and the behaviors of all the Agents in -the scene will be controlled within Python. +In the previous mode, the External Brain type was used for training +to generate a TensorFlow model that the Internal Brain type can understand +and use. However, any user of the ML-Agents toolkit can leverage their own algorithms +for both training and inference. In this case, the Brain type would be set +to External for both training and inferences phases and the behaviors of +all the Agents in the scene will be controlled within Python. We do not currently have a tutorial highlighting this mode, but you can learn more about the Python API [here](Python-API.md). ### Curriculum Learning -This mode is an extension of _Built-in Training and Inference_, and is -particularly helpful when training intricate behaviors for complex environments. -Curriculum learning is a way of training a machine learning model where more -difficult aspects of a problem are gradually introduced in such a way that the -model is always optimally challenged. This idea has been around for a long time, -and it is how we humans typically learn. If you imagine any childhood primary -school education, there is an ordering of classes and topics. Arithmetic is -taught before algebra, for example. Likewise, algebra is taught before calculus. -The skills and knowledge learned in the earlier subjects provide a scaffolding -for later lessons. The same principle can be applied to machine learning, where -training on easier tasks can provide a scaffolding for harder tasks in the -future. +This mode is an extension of _Built-in Training and Inference_, and +is particularly helpful when training intricate behaviors for complex +environments. Curriculum learning is a way of training a machine learning +model where more difficult aspects of a problem are gradually introduced in +such a way that the model is always optimally challenged. This idea has been +around for a long time, and it is how we humans typically learn. If you +imagine any childhood primary school education, there is an ordering of +classes and topics. Arithmetic is taught before algebra, for example. +Likewise, algebra is taught before calculus. The skills and knowledge learned +in the earlier subjects provide a scaffolding for later lessons. The same +principle can be applied to machine learning, where training on easier tasks +can provide a scaffolding for harder tasks in the future.

- Example Math Curriculum + Example Math Curriculum

-_Example of a mathematics curriculum. Lessons progress from simpler topics to -more complex ones, with each building on the last._ - -When we think about how reinforcement learning actually works, the learning -signal is reward received occasionally throughout training. The starting point -when training an agent to accomplish this task will be a random policy. That -starting policy will have the agent running in circles, and will likely never, -or very rarely achieve the reward for complex environments. Thus by simplifying -the environment at the beginning of training, we allow the agent to quickly -update the random policy to a more meaningful one that is successively improved -as the environment gradually increases in complexity. In our example, we can -imagine first training the medic when each team only contains one player, and -then iteratively increasing the number of players (i.e. the environment -complexity). The ML-Agents toolkit supports setting custom environment -parameters within the Academy. This allows elements of the environment related -to difficulty or complexity to be dynamically adjusted based on training -progress. +_Example of a mathematics curriculum. Lessons progress from simpler topics to more +complex ones, with each building on the last._ + +When we think about how reinforcement learning actually works, the +learning signal is reward received occasionally throughout training. +The starting point when training an agent to accomplish this task will be a +random policy. That starting policy will have the agent running in circles, +and will likely never, or very rarely achieve the reward for complex +environments. Thus by simplifying the environment at the beginning of training, +we allow the agent to quickly update the random policy to a more meaningful +one that is successively improved as the environment gradually increases in +complexity. In our example, we can imagine first training the medic when each +team only contains one player, and then iteratively increasing the number of +players (i.e. the environment complexity). The ML-Agents toolkit supports setting +custom environment parameters within the Academy. This allows +elements of the environment related to difficulty or complexity to be +dynamically adjusted based on training progress. The [Training with Curriculum Learning](Training-Curriculum-Learning.md) tutorial covers this training mode with the **Wall Area** sample environment. ### Imitation Learning -It is often more intuitive to simply demonstrate the behavior we want an agent -to perform, rather than attempting to have it learn via trial-and-error methods. -For example, instead of training the medic by setting up its reward function, -this mode allows providing real examples from a game controller on how the medic -should behave. More specifically, in this mode, the Brain type during training -is set to Player and all the actions performed with the controller (in addition -to the agent observations) will be recorded and sent to the Python API. The -imitation learning algorithm will then use these pairs of observations and -actions from the human player to learn a policy. [Video -Link](https://youtu.be/kpb8ZkMBFYs). +It is often more intuitive to simply demonstrate the behavior we +want an agent to perform, rather than attempting to have it learn via +trial-and-error methods. For example, instead of training the medic by +setting up its reward function, this mode allows providing real examples from +a game controller on how the medic should behave. More specifically, +in this mode, the Brain type during training is set to Player and all the +actions performed with the controller (in addition to the agent observations) +will be recorded and sent to the Python API. The imitation learning algorithm +will then use these pairs of observations and actions from the human player +to learn a policy. [Video Link](https://youtu.be/kpb8ZkMBFYs). -The [Training with Imitation Learning](Training-Imitation-Learning.md) tutorial -covers this training mode with the **Banana Collector** sample environment. +The [Training with Imitation Learning](Training-Imitation-Learning.md) tutorial covers this +training mode with the **Banana Collector** sample environment. ## Flexible Training Scenarios -While the discussion so-far has mostly focused on training a single agent, with -ML-Agents, several training scenarios are possible. We are excited to see what -kinds of novel and fun environments the community creates. For those new to -training intelligent agents, below are a few examples that can serve as -inspiration: - -- Single-Agent. A single agent linked to a single Brain, with its own reward - signal. The traditional way of training an agent. An example is any - single-player game, such as Chicken. [Video - Link](https://www.youtube.com/watch?v=fiQsmdwEGT8&feature=youtu.be). -- Simultaneous Single-Agent. Multiple independent agents with independent reward - signals linked to a single Brain. A parallelized version of the traditional - training scenario, which can speed-up and stabilize the training process. - Helpful when you have multiple versions of the same character in an - environment who should learn similar behaviors. An example might be training a - dozen robot-arms to each open a door simultaneously. [Video - Link](https://www.youtube.com/watch?v=fq0JBaiCYNA). -- Adversarial Self-Play. Two interacting agents with inverse reward signals - linked to a single Brain. In two-player games, adversarial self-play can allow - an agent to become increasingly more skilled, while always having the - perfectly matched opponent: itself. This was the strategy employed when - training AlphaGo, and more recently used by OpenAI to train a human-beating - 1-vs-1 Dota 2 agent. -- Cooperative Multi-Agent. Multiple interacting agents with a shared reward - signal linked to either a single or multiple different Brains. In this - scenario, all agents must work together to accomplish a task that cannot be - done alone. Examples include environments where each agent only has access to - partial information, which needs to be shared in order to accomplish the task - or collaboratively solve a puzzle. -- Competitive Multi-Agent. Multiple interacting s with inverse reward - signals linked to either a single or multiple different Brains. In this - scenario, s must compete with one another to either win a competition, or - obtain some limited set of resources. All team sports fall into this scenario. -- Ecosystem. Multiple interacting s with independent reward signals linked - to either a single or multiple different Brains. This scenario can be thought - of as creating a small world in which animals with different goals all - interact, such as a savanna in which there might be zebras, elephants and - giraffes, or an autonomous driving simulation within an urban environment. +While the discussion so-far has mostly focused on training a single agent, with +ML-Agents, several training scenarios are possible. +We are excited to see what kinds of novel and fun environments the community +creates. For those new to training intelligent agents, below are a few examples +that can serve as inspiration: +* Single-Agent. A single Agent linked to a single Brain, with its own reward +signal. The traditional way of training an agent. An example is any +single-player game, such as Chicken. +[Video Link](https://www.youtube.com/watch?v=fiQsmdwEGT8&feature=youtu.be). +* Simultaneous Single-Agent. Multiple independent Agents with independent +reward signals linked to a single Brain. A parallelized version of the +traditional training scenario, which can speed-up and stabilize the training +process. Helpful when you have multiple versions of the same character in an +environment who should learn similar behaviors. An example might be training +a dozen robot-arms to each open a door simultaneously. +[Video Link](https://www.youtube.com/watch?v=fq0JBaiCYNA). +* Adversarial Self-Play. Two interacting Agents with inverse reward signals +linked to a single Brain. In two-player games, adversarial self-play can allow +an agent to become increasingly more skilled, while always having the perfectly +matched opponent: itself. This was the strategy employed when training AlphaGo, +and more recently used by OpenAI to train a human-beating 1-vs-1 Dota 2 agent. +* Cooperative Multi-Agent. Multiple interacting Agents with a shared reward +signal linked to either a single or multiple different Brains. In this +scenario, all agents must work together to accomplish a task that cannot be +done alone. Examples include environments where each agent only has access to +partial information, which needs to be shared in order to accomplish the task +or collaboratively solve a puzzle. +* Competitive Multi-Agent. Multiple interacting Agents with inverse reward +signals linked to either a single or multiple different Brains. In this +scenario, agents must compete with one another to either win a competition, +or obtain some limited set of resources. All team sports fall into this +scenario. +* Ecosystem. Multiple interacting Agents with independent reward signals +linked to either a single or multiple different Brains. This scenario can be +thought of as creating a small world in which animals with different goals all +interact, such as a savanna in which there might be zebras, elephants and +giraffes, or an autonomous driving simulation within an urban environment. ## Additional Features -Beyond the flexible training scenarios available, the ML-Agents toolkit includes +Beyond the flexible training scenarios available, the ML-Agents toolkit includes additional features which improve the flexibility and interpretability of the training process. -- **On Demand Decision Making** - With the ML-Agents toolkit it is possible to - have agents request decisions only when needed as opposed to requesting - decisions at every step of the environment. This enables training of turn - based games, games where agents must react to events or games where agents can - take actions of variable duration. Switching between decision taking at every - step and on-demand-decision is one button click away. You can learn more about - the on-demand-decision feature - [here](Learning-Environment-Design-Agents.md#on-demand-decision-making). - -- **Memory-enhanced Agents** - In some scenarios, agents must learn to remember - the past in order to take the best decision. When an agent only has partial - observability of the environment, keeping track of past observations can help - the agent learn. We provide an implementation of _Long Short-term Memory_ - ([LSTM](https://en.wikipedia.org/wiki/Long_short-term_memory)) in our trainers - that enable the agent to store memories to be used in future steps. You can - learn more about enabling LSTM during training [here](Feature-Memory.md). - -- **Monitoring Agent’s Decision Making** - Since communication in ML-Agents is a - two-way street, we provide an Agent Monitor class in Unity which can display - aspects of the trained Agent, such as the Agents perception on how well it is - doing (called **value estimates**) within the Unity environment itself. By - leveraging Unity as a visualization tool and providing these outputs in - real-time, researchers and developers can more easily debug an Agent’s - behavior. You can learn more about using the Monitor class - [here](Feature-Monitor.md). - -- **Complex Visual Observations** - Unlike other platforms, where the agent’s - observation might be limited to a single vector or image, the ML-Agents - toolkit allows multiple cameras to be used for observations per agent. This - enables agents to learn to integrate information from multiple visual streams. - This can be helpful in several scenarios such as training a self-driving car - which requires multiple cameras with different viewpoints, or a navigational - agent which might need to integrate aerial and first-person visuals. You can - learn more about adding visual observations to an agent - [here](Learning-Environment-Design-Agents.md#multiple-visual-observations). - -- **Broadcasting** - As discussed earlier, an External Brain sends the - observations for all its Agents to the Python API by default. This is helpful - for training or inference. Broadcasting is a feature which can be enabled for - the other three modes (Player, Internal, Heuristic) where the Agent - observations and actions are also sent to the Python API (despite the fact - that the Agent is **not** controlled by the Python API). This feature is - leveraged by Imitation Learning, where the observations and actions for a - Player Brain are used to learn the policies of an agent through demonstration. - However, this could also be helpful for the Heuristic and Internal Brains, - particularly when debugging agent behaviors. You can learn more about using - the broadcasting feature - [here](Learning-Environment-Design-Brains.md#using-the-broadcast-feature). - -- **Docker Set-up (Experimental)** - To facilitate setting up ML-Agents without - installing Python or TensorFlow directly, we provide a - [guide](Using-Docker.md) on how to create and run a Docker container. - -- **Cloud Training on AWS** - To facilitate using the ML-Agents toolkit on - Amazon Web Services (AWS) machines, we provide a - [guide](Training-on-Amazon-Web-Service.md) on how to set-up EC2 instances in - addition to a public pre-configured Amazon Machine Image (AMI). - -- **Cloud Training on Microsoft Azure** - To facilitate using the ML-Agents - toolkit on Azure machines, we provide a - [guide](Training-on-Microsoft-Azure.md) on how to set-up virtual machine - instances in addition to a pre-configured data science image. +* **On Demand Decision Making** - With the ML-Agents toolkit it is possible to have agents +request decisions only when needed as opposed to requesting decisions at +every step of the environment. This enables training of turn based games, +games where agents +must react to events or games where agents can take actions of variable +duration. Switching between decision taking at every step and +on-demand-decision is one button click away. You can learn more about the +on-demand-decision feature +[here](Learning-Environment-Design-Agents.md#on-demand-decision-making). + +* **Memory-enhanced Agents** - In some scenarios, agents must learn to +remember the past in order to take the +best decision. When an agent only has partial observability of the environment, +keeping track of past observations can help the agent learn. We provide an +implementation of _Long Short-term Memory_ +([LSTM](https://en.wikipedia.org/wiki/Long_short-term_memory)) +in our trainers that enable the agent to store memories to be used in future +steps. You can learn more about enabling LSTM during training +[here](Feature-Memory.md). + +* **Monitoring Agent’s Decision Making** - Since communication in ML-Agents +is a two-way street, we provide an agent Monitor class in Unity which can +display aspects of the trained agent, such as the agents perception on how +well it is doing (called **value estimates**) within the Unity environment +itself. By leveraging Unity as a visualization tool and providing these +outputs in real-time, researchers and developers can more easily debug an +agent’s behavior. You can learn more about using the Monitor class +[here](Feature-Monitor.md). + +* **Complex Visual Observations** - Unlike other platforms, where the agent’s +observation might be limited to a single vector or image, the ML-Agents toolkit allows +multiple cameras to be used for observations per agent. This enables agents to +learn to integrate information from multiple visual streams. This can be +helpful in several scenarios such as training a self-driving car which requires +multiple cameras with different viewpoints, or a navigational agent which might +need to integrate aerial and first-person visuals. You can learn more about +adding visual observations to an agent +[here](Learning-Environment-Design-Agents.md#multiple-visual-observations). + +* **Broadcasting** - As discussed earlier, an External Brain sends the +observations for all its Agents to the Python API by default. This is helpful +for training or inference. Broadcasting is a feature which can be enabled +for the other three modes (Player, Internal, Heuristic) where the Agent +observations and actions are also sent to the Python API (despite the fact +that the Agent is **not** controlled by the Python API). This feature is +leveraged by Imitation Learning, where the observations and actions for a +Player Brain are used to learn the policies of an agent through demonstration. +However, this could also be helpful for the Heuristic and Internal Brains, +particularly when debugging agent behaviors. You can learn more about using +the broadcasting feature +[here](Learning-Environment-Design-Brains.md#using-the-broadcast-feature). + +* **Docker Set-up (Experimental)** - To facilitate setting up ML-Agents +without installing Python or TensorFlow directly, we provide a +[guide](Using-Docker.md) on how +to create and run a Docker container. + +* **Cloud Training on AWS** - To facilitate using the ML-Agents toolkit on +Amazon Web Services (AWS) machines, we provide a +[guide](Training-on-Amazon-Web-Service.md) +on how to set-up EC2 instances in addition to a public pre-configured Amazon +Machine Image (AMI). + +* **Cloud Training on Microsoft Azure** - To facilitate using the ML-Agents toolkit on +Azure machines, we provide a +[guide](Training-on-Microsoft-Azure.md) +on how to set-up virtual machine instances in addition to a pre-configured data science image. ## Summary and Next Steps -To briefly summarize: The ML-Agents toolkit enables games and simulations built -in Unity to serve as the platform for training intelligent agents. It is -designed to enable a large variety of training modes and scenarios and comes -packed with several features to enable researchers and developers to leverage +To briefly summarize: The ML-Agents toolkit enables games and simulations built in Unity +to serve as the platform for training intelligent agents. It is designed +to enable a large variety of training modes and scenarios and comes packed +with several features to enable researchers and developers to leverage (and enhance) machine learning within Unity. -To help you use ML-Agents, we've created several in-depth tutorials for -[installing ML-Agents](Installation.md), -[getting started](Getting-Started-with-Balance-Ball.md) with the 3D Balance Ball -environment (one of our many -[sample environments](Learning-Environment-Examples.md)) and +To help you use ML-Agents, we've created several in-depth tutorials +for [installing ML-Agents](Installation.md), +[getting started](Getting-Started-with-Balance-Ball.md) +with the 3D Balance Ball environment (one of our many +[sample environments](Learning-Environment-Examples.md)) and [making your own environment](Learning-Environment-Create-New.md). + diff --git a/docs/Migrating.md b/docs/Migrating.md index ef28358ee0..cb0dbfe088 100644 --- a/docs/Migrating.md +++ b/docs/Migrating.md @@ -1,123 +1,34 @@ -# Migrating +# Migrating from ML-Agents toolkit v0.3 to v0.4 -## Migrating from ML-Agents toolkit v0.4 to v0.5 +## Unity API + * `using MLAgents;` needs to be added in all of the C# scripts that use ML-Agents. -### Important +## Python API + * We've changed some of the python packages dependencies in requirement.txt file. Make sure to run `pip install .` within your `ml-agents/python` folder to update your python packages. -* The Unity project `unity-environment` has been renamed `UnitySDK`. -* The `python` folder has been renamed to `ml-agents`. It now contains two - packages, `mlagents.env` and `mlagents.trainers`. `mlagents.env` can be used - to interact directly with a Unity environment, while `mlagents.trainers` - contains the classes for training agents. -* The supported Unity version has changed from `2017.1 or later` to `2017.4 - or later`. 2017.4 is an LTS (Long Term Support) version that helps us - maintain good quality and support. Earlier versions of Unity might still work, - but you may encounter an - [error](FAQ.md#instance-of-corebraininternal-couldnt-be-created) listed here. +# Migrating from ML-Agents toolkit v0.2 to v0.3 -### Unity API +There are a large number of new features and improvements in the ML-Agents toolkit v0.3 which change both the training process and Unity API in ways which will cause incompatibilities with environments made using older versions. This page is designed to highlight those changes for users familiar with v0.1 or v0.2 in order to ensure a smooth transition. -* Discrete Actions now use [branches](https://arxiv.org/abs/1711.08946). You can - now specify concurrent discrete actions. You will need to update the Brain - Parameters in the Brain Inspector in all your environments that use discrete - actions. Refer to the - [discrete action documentation](Learning-Environment-Design-Agents.md#discrete-action-space) - for more information. +## Important + * The ML-Agents toolkit is no longer compatible with Python 2. -### Python API +## Python Training + * The training script `ppo.py` and `PPO.ipynb` Python notebook have been replaced with a single `learn.py` script as the launching point for training with ML-Agents. For more information on using `learn.py`, see [here](). + * Hyperparameters for training brains are now stored in the `trainer_config.yaml` file. For more information on using this file, see [here](). -* In order to run a training session, you can now use the command - `mlagents-learn` instead of `python3 learn.py` after installing the `mlagents` - packages. This change is documented - [here](Training-ML-Agents.md#training-with-mlagents-learn). For example, - if we previously ran +## Unity API + * Modifications to an Agent's rewards must now be done using either `AddReward()` or `SetReward()`. + * Setting an Agent to done now requires the use of the `Done()` method. + * `CollectStates()` has been replaced by `CollectObservations()`, which now no longer returns a list of floats. + * To collect observations, call `AddVectorObs()` within `CollectObservations()`. Note that you can call `AddVectorObs()` with floats, integers, lists and arrays of floats, Vector3 and Quaternions. + * `AgentStep()` has been replaced by `AgentAction()`. + * `WaitTime()` has been removed. + * The `Frame Skip` field of the Academy is replaced by the Agent's `Decision Frequency` field, enabling agent to make decisions at different frequencies. + * The names of the inputs in the Internal Brain have been changed. You must replace `state` with `vector_observation` and `observation` with `visual_observation`. In addition, you must remove the `epsilon` placeholder. - ```sh - python3 learn.py 3DBall --train - ``` - - from the `python/` directory, we now run - - ```sh - mlagents-learn config/trainer_config.yaml --env=3DBall --train - ``` - - from the directory where we installed the ML-Agents Toolkit. - -* It is now required to specify the path to the yaml trainer configuration file - when running `mlagents-learn`. For an example trainer configuration file, see - [trainer_config.yaml](../config/trainer_config.yaml). An example of passing - a trainer configuration to `mlagents-learn` is shown above. -* The environment name is now passed through the `--env` option. -* Curriculum learning has been changed. Refer to the - [curriculum learning documentation](Training-Curriculum-Learning.md) - for detailed information. In summary: - * Curriculum files for the same environment must now be placed into a folder. - Each curriculum file should be named after the brain whose curriculum it - specifies. - * `min_lesson_length` now specifies the minimum number of episodes in a lesson - and affects reward thresholding. - * It is no longer necessary to specify the `Max Steps` of the Academy to use - curriculum learning. - -## Migrating from ML-Agents toolkit v0.3 to v0.4 - -### Unity API - -* `using MLAgents;` needs to be added in all of the C# scripts that use - ML-Agents. - -### Python API - -* We've changed some of the Python packages dependencies in requirement.txt - file. Make sure to run `pip3 install .` within your `ml-agents/python` folder - to update your Python packages. - -## Migrating from ML-Agents toolkit v0.2 to v0.3 - -There are a large number of new features and improvements in the ML-Agents -toolkit v0.3 which change both the training process and Unity API in ways which -will cause incompatibilities with environments made using older versions. This -page is designed to highlight those changes for users familiar with v0.1 or v0.2 -in order to ensure a smooth transition. - -### Important - -* The ML-Agents toolkit is no longer compatible with Python 2. - -### Python Training - -* The training script `ppo.py` and `PPO.ipynb` Python notebook have been - replaced with a single `learn.py` script as the launching point for training - with ML-Agents. For more information on using `learn.py`, see - [here](Training-ML-Agents.md#training-with-mlagents-learn). -* Hyperparameters for training Brains are now stored in the - `trainer_config.yaml` file. For more information on using this file, see - [here](Training-ML-Agents.md#training-config-file). - -### Unity API - -* Modifications to an Agent's rewards must now be done using either - `AddReward()` or `SetReward()`. -* Setting an Agent to done now requires the use of the `Done()` method. -* `CollectStates()` has been replaced by `CollectObservations()`, which now no - longer returns a list of floats. -* To collect observations, call `AddVectorObs()` within `CollectObservations()`. - Note that you can call `AddVectorObs()` with floats, integers, lists and - arrays of floats, Vector3 and Quaternions. -* `AgentStep()` has been replaced by `AgentAction()`. -* `WaitTime()` has been removed. -* The `Frame Skip` field of the Academy is replaced by the Agent's `Decision - Frequency` field, enabling the Agent to make decisions at different frequencies. -* The names of the inputs in the Internal Brain have been changed. You must - replace `state` with `vector_observation` and `observation` with - `visual_observation`. In addition, you must remove the `epsilon` placeholder. - -### Semantics - -In order to more closely align with the terminology used in the Reinforcement -Learning field, and to be more descriptive, we have changed the names of some of -the concepts used in ML-Agents. The changes are highlighted in the table below. +## Semantics +In order to more closely align with the terminology used in the Reinforcement Learning field, and to be more descriptive, we have changed the names of some of the concepts used in ML-Agents. The changes are highlighted in the table below. | Old - v0.2 and earlier | New - v0.3 and later | | --- | --- | diff --git a/docs/Python-API.md b/docs/Python-API.md index 9e993aced2..d3e747997c 100644 --- a/docs/Python-API.md +++ b/docs/Python-API.md @@ -1,149 +1,77 @@ -# Unity ML-Agents Python Interface and Trainers +# Python API -The `mlagents` Python package is part of the [ML-Agents -Toolkit](https://github.com/Unity-Technologies/ml-agents). `mlagents` provides a -Python API that allows direct interaction with the Unity game engine as well as -a collection of trainers and algorithms to train agents in Unity environments. - -The `mlagents` Python package contains two components: a low level API which -allows you to interact directly with a Unity Environment (`mlagents.envs`) and -an entry point to train (`mlagents-learn`) which allows you to train agents in -Unity Environments using our implementations of reinforcement learning or -imitation learning. - -## mlagents.envs - -The ML-Agents Toolkit provides a Python API for controlling the Agent simulation -loop of an environment or game built with Unity. This API is used by the -training algorithms inside the ML-Agent Toolkit, but you can also write your own -Python programs using this API. +The ML-Agents toolkit provides a Python API for controlling the agent simulation loop of a environment or game built with Unity. This API is used by the ML-Agent training algorithms (run with `learn.py`), but you can also write your Python programs using this API. The key objects in the Python API include: -- **UnityEnvironment** — the main interface between the Unity application and - your code. Use UnityEnvironment to start and control a simulation or training - session. -- **BrainInfo** — contains all the data from Agents in the simulation, such as - observations and rewards. -- **BrainParameters** — describes the data elements in a BrainInfo object. For - example, provides the array length of an observation in BrainInfo. +* **UnityEnvironment** — the main interface between the Unity application and your code. Use UnityEnvironment to start and control a simulation or training session. +* **BrainInfo** — contains all the data from agents in the simulation, such as observations and rewards. +* **BrainParameters** — describes the data elements in a BrainInfo object. For example, provides the array length of an observation in BrainInfo. -These classes are all defined in the `ml-agents/mlagents/envs` folder of -the ML-Agents SDK. +These classes are all defined in the `python/unityagents` folder of the ML-Agents SDK. -To communicate with an Agent in a Unity environment from a Python program, the -Agent must either use an **External** Brain or use a Brain that is broadcasting -(has its **Broadcast** property set to true). Your code is expected to return -actions for Agents with external Brains, but can only observe broadcasting -Brains (the information you receive for an Agent is the same in both cases). +To communicate with an agent in a Unity environment from a Python program, the agent must either use an **External** brain or use a brain that is broadcasting (has its **Broadcast** property set to true). Your code is expected to return actions for agents with external brains, but can only observe broadcasting brains (the information you receive for an agent is the same in both cases). See [Using the Broadcast Feature](Learning-Environment-Design-Brains.md#using-the-broadcast-feature). -_Notice: Currently communication between Unity and Python takes place over an -open socket without authentication. As such, please make sure that the network -where training takes place is secure. This will be addressed in a future -release._ +For a simple example of using the Python API to interact with a Unity environment, see the Basic [Jupyter](Background-Jupyter.md) notebook (`python/Basics.ipynb`), which opens an environment, runs a few simulation steps taking random actions, and closes the environment. -### Loading a Unity Environment +_Notice: Currently communication between Unity and Python takes place over an open socket without authentication. As such, please make sure that the network where training takes place is secure. This will be addressed in a future release._ -Python-side communication happens through `UnityEnvironment` which is located in -`ml-agents/mlagents/envs`. To load a Unity environment from a built binary -file, put the file in the same directory as `envs`. For example, if the filename -of your Unity environment is 3DBall.app, in python, run: +## Loading a Unity Environment + +Python-side communication happens through `UnityEnvironment` which is located in `python/unityagents`. To load a Unity environment from a built binary file, put the file in the same directory as `unityagents`. For example, if the filename of your Unity environment is 3DBall.app, in python, run: ```python -from mlagents.env import UnityEnvironment +from unityagents import UnityEnvironment env = UnityEnvironment(file_name="3DBall", worker_id=0, seed=1) ``` -- `file_name` is the name of the environment binary (located in the root - directory of the python project). -- `worker_id` indicates which port to use for communication with the - environment. For use in parallel training regimes such as A3C. -- `seed` indicates the seed to use when generating random numbers during the - training process. In environments which do not involve physics calculations, - setting the seed enables reproducible experimentation by ensuring that the - environment and trainers utilize the same random seed. +* `file_name` is the name of the environment binary (located in the root directory of the python project). +* `worker_id` indicates which port to use for communication with the environment. For use in parallel training regimes such as A3C. +* `seed` indicates the seed to use when generating random numbers during the training process. In environments which do not involve physics calculations, setting the seed enables reproducible experimentation by ensuring that the environment and trainers utilize the same random seed. -If you want to directly interact with the Editor, you need to use -`file_name=None`, then press the :arrow_forward: button in the Editor when the -message _"Start training by pressing the Play button in the Unity Editor"_ is -displayed on the screen +If you want to directly interact with the Editor, you need to use `file_name=None`, then press the :arrow_forward: button in the Editor when the message _"Start training by pressing the Play button in the Unity Editor"_ is displayed on the screen -### Interacting with a Unity Environment +## Interacting with a Unity Environment A BrainInfo object contains the following fields: -- **`visual_observations`** : A list of 4 dimensional numpy arrays. Matrix n of - the list corresponds to the nth observation of the Brain. -- **`vector_observations`** : A two dimensional numpy array of dimension `(batch - size, vector observation size)`. -- **`text_observations`** : A list of string corresponding to the Agents text - observations. -- **`memories`** : A two dimensional numpy array of dimension `(batch size, - memory size)` which corresponds to the memories sent at the previous step. -- **`rewards`** : A list as long as the number of Agents using the Brain - containing the rewards they each obtained at the previous step. -- **`local_done`** : A list as long as the number of Agents using the Brain - containing `done` flags (whether or not the Agent is done). -- **`max_reached`** : A list as long as the number of Agents using the Brain - containing true if the Agents reached their max steps. -- **`agents`** : A list of the unique ids of the Agents using the Brain. -- **`previous_actions`** : A two dimensional numpy array of dimension `(batch - size, vector action size)` if the vector action space is continuous and - `(batch size, number of branches)` if the vector action space is discrete. - -Once loaded, you can use your UnityEnvironment object, which referenced by a -variable named `env` in this example, can be used in the following way: - +* **`visual_observations`** : A list of 4 dimensional numpy arrays. Matrix n of the list corresponds to the nth observation of the brain. +* **`vector_observations`** : A two dimensional numpy array of dimension `(batch size, vector observation size)` if the vector observation space is continuous and `(batch size, 1)` if the vector observation space is discrete. +* **`text_observations`** : A list of string corresponding to the agents text observations. +* **`memories`** : A two dimensional numpy array of dimension `(batch size, memory size)` which corresponds to the memories sent at the previous step. +* **`rewards`** : A list as long as the number of agents using the brain containing the rewards they each obtained at the previous step. +* **`local_done`** : A list as long as the number of agents using the brain containing `done` flags (whether or not the agent is done). +* **`max_reached`** : A list as long as the number of agents using the brain containing true if the agents reached their max steps. +* **`agents`** : A list of the unique ids of the agents using the brain. +* **`previous_actions`** : A two dimensional numpy array of dimension `(batch size, vector action size)` if the vector action space is continuous and `(batch size, 1)` if the vector action space is discrete. + +Once loaded, you can use your UnityEnvironment object, which referenced by a variable named `env` in this example, can be used in the following way: - **Print : `print(str(env))`** - Prints all parameters relevant to the loaded environment and the external - Brains. +Prints all parameters relevant to the loaded environment and the external brains. - **Reset : `env.reset(train_model=True, config=None)`** - Send a reset signal to the environment, and provides a dictionary mapping - Brain names to BrainInfo objects. - - `train_model` indicates whether to run the environment in train (`True`) or - test (`False`) mode. - - `config` is an optional dictionary of configuration flags specific to the - environment. For generic environments, `config` can be ignored. `config` is - a dictionary of strings to floats where the keys are the names of the - `resetParameters` and the values are their corresponding float values. - Define the reset parameters on the Academy Inspector window in the Unity - Editor. +Send a reset signal to the environment, and provides a dictionary mapping brain names to BrainInfo objects. + - `train_model` indicates whether to run the environment in train (`True`) or test (`False`) mode. + - `config` is an optional dictionary of configuration flags specific to the environment. For generic environments, `config` can be ignored. `config` is a dictionary of strings to floats where the keys are the names of the `resetParameters` and the values are their corresponding float values. Define the reset parameters on the [Academy Inspector](Learning-Environment-Design-Academy.md#academy-properties) window in the Unity Editor. - **Step : `env.step(action, memory=None, text_action=None)`** - Sends a step signal to the environment using the actions. For each Brain : - - `action` can be one dimensional arrays or two dimensional arrays if you have - multiple Agents per Brain. - - `memory` is an optional input that can be used to send a list of floats per - Agents to be retrieved at the next step. - - `text_action` is an optional input that be used to send a single string per - Agent. - - Returns a dictionary mapping Brain names to BrainInfo objects. - - For example, to access the BrainInfo belonging to a Brain called - 'brain_name', and the BrainInfo field 'vector_observations': - +Sends a step signal to the environment using the actions. For each brain : + - `action` can be one dimensional arrays or two dimensional arrays if you have multiple agents per brains. + - `memory` is an optional input that can be used to send a list of floats per agents to be retrieved at the next step. + - `text_action` is an optional input that be used to send a single string per agent. + + Returns a dictionary mapping brain names to BrainInfo objects. + + For example, to access the BrainInfo belonging to a brain called 'brain_name', and the BrainInfo field 'vector_observations': ```python info = env.step() brainInfo = info['brain_name'] observations = brainInfo.vector_observations - ``` - - Note that if you have more than one external Brain in the environment, you - must provide dictionaries from Brain names to arrays for `action`, `memory` - and `value`. For example: If you have two external Brains named `brain1` and - `brain2` each with one Agent taking two continuous actions, then you can - have: + ``` + Note that if you have more than one external brain in the environment, you must provide dictionaries from brain names to arrays for `action`, `memory` and `value`. For example: If you have two external brains named `brain1` and `brain2` each with one agent taking two continuous actions, then you can have: ```python action = {'brain1':[1.0, 2.0], 'brain2':[3.0,4.0]} ``` - Returns a dictionary mapping Brain names to BrainInfo objects. -- **Close : `env.close()`** - Sends a shutdown signal to the environment and closes the communication - socket. - -## mlagents-learn - -For more detailed documentation on using `mlagents-learn`, check out -[Training ML-Agents](Training-ML-Agents.md) +Returns a dictionary mapping brain names to BrainInfo objects. +- **Close : `env.close()`** +Sends a shutdown signal to the environment and closes the communication socket. diff --git a/docs/Readme.md b/docs/Readme.md index 4057e19efe..29c26cb456 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -1,56 +1,46 @@ # Unity ML-Agents Toolkit Documentation ## Installation & Set-up - -* [Installation](Installation.md) - * [Background: Jupyter Notebooks](Background-Jupyter.md) - * [Docker Set-up](Using-Docker.md) -* [Basic Guide](Basic-Guide.md) + * [Installation](Installation.md) + * [Background: Jupyter Notebooks](Background-Jupyter.md) + * [Docker Set-up](Using-Docker.md) + * [Basic Guide](Basic-Guide.md) ## Getting Started - -* [ML-Agents Toolkit Overview](ML-Agents-Overview.md) - * [Background: Unity](Background-Unity.md) - * [Background: Machine Learning](Background-Machine-Learning.md) - * [Background: TensorFlow](Background-TensorFlow.md) -* [Getting Started with the 3D Balance Ball Environment](Getting-Started-with-Balance-Ball.md) -* [Example Environments](Learning-Environment-Examples.md) + * [ML-Agents Toolkit Overview](ML-Agents-Overview.md) + * [Background: Unity](Background-Unity.md) + * [Background: Machine Learning](Background-Machine-Learning.md) + * [Background: TensorFlow](Background-TensorFlow.md) + * [Getting Started with the 3D Balance Ball Environment](Getting-Started-with-Balance-Ball.md) + * [Example Environments](Learning-Environment-Examples.md) ## Creating Learning Environments - -* [Making a New Learning Environment](Learning-Environment-Create-New.md) -* [Designing a Learning Environment](Learning-Environment-Design.md) - * [Agents](Learning-Environment-Design-Agents.md) - * [Academy](Learning-Environment-Design-Academy.md) - * [Brains](Learning-Environment-Design-Brains.md): - [Player](Learning-Environment-Design-Player-Brains.md), - [Heuristic](Learning-Environment-Design-Heuristic-Brains.md), - [Internal & External](Learning-Environment-Design-External-Internal-Brains.md) -* [Learning Environment Best Practices](Learning-Environment-Best-Practices.md) -* [Using the Monitor](Feature-Monitor.md) -* [Using an Executable Environment](Learning-Environment-Executable.md) -* [TensorFlowSharp in Unity (Experimental)](Using-TensorFlow-Sharp-in-Unity.md) - + * [Making a New Learning Environment](Learning-Environment-Create-New.md) + * [Designing a Learning Environment](Learning-Environment-Design.md) + * [Agents](Learning-Environment-Design-Agents.md) + * [Academy](Learning-Environment-Design-Academy.md) + * [Brains](Learning-Environment-Design-Brains.md): [Player](Learning-Environment-Design-Player-Brains.md), [Heuristic](Learning-Environment-Design-Heuristic-Brains.md), [Internal & External](Learning-Environment-Design-External-Internal-Brains.md) + * [Learning Environment Best Practices](Learning-Environment-Best-Practices.md) + * [Using the Monitor](Feature-Monitor.md) + * [Using an Executable Environment](Learning-Environment-Executable.md) + * [TensorFlowSharp in Unity (Experimental)](Using-TensorFlow-Sharp-in-Unity.md) + ## Training - -* [Training ML-Agents](Training-ML-Agents.md) -* [Training with Proximal Policy Optimization](Training-PPO.md) -* [Training with Curriculum Learning](Training-Curriculum-Learning.md) -* [Training with Imitation Learning](Training-Imitation-Learning.md) -* [Training with LSTM](Feature-Memory.md) -* [Training on the Cloud with Amazon Web Services](Training-on-Amazon-Web-Service.md) -* [Training on the Cloud with Microsoft Azure](Training-on-Microsoft-Azure.md) -* [Using TensorBoard to Observe Training](Using-Tensorboard.md) + * [Training ML-Agents](Training-ML-Agents.md) + * [Training with Proximal Policy Optimization](Training-PPO.md) + * [Training with Curriculum Learning](Training-Curriculum-Learning.md) + * [Training with Imitation Learning](Training-Imitation-Learning.md) + * [Training with LSTM](Feature-Memory.md) + * [Training on the Cloud with Amazon Web Services](Training-on-Amazon-Web-Service.md) + * [Training on the Cloud with Microsoft Azure](Training-on-Microsoft-Azure.md) + * [Using TensorBoard to Observe Training](Using-Tensorboard.md) ## Help - -* [Migrating from earlier versions of ML-Agents](Migrating.md) -* [Frequently Asked Questions](FAQ.md) -* [ML-Agents Glossary](Glossary.md) -* [Limitations](Limitations.md) - + * [Migrating from earlier versions of ML-Agents](Migrating.md) + * [Frequently Asked Questions](FAQ.md) + * [ML-Agents Glossary](Glossary.md) + * [Limitations](Limitations.md) + ## API Docs - -* [API Reference](API-Reference.md) -* [How to use the Python API](Python-API.md) -* [Wrapping Learning Environment as a Gym](../gym-unity/README.md) + * [API Reference](API-Reference.md) + * [How to use the Python API](Python-API.md) diff --git a/docs/Training-Curriculum-Learning.md b/docs/Training-Curriculum-Learning.md index 57a174140b..2673a56561 100644 --- a/docs/Training-Curriculum-Learning.md +++ b/docs/Training-Curriculum-Learning.md @@ -2,119 +2,68 @@ ## Sample Environment -Imagine a task in which an agent needs to scale a wall to arrive at a goal. The -starting point when training an agent to accomplish this task will be a random -policy. That starting policy will have the agent running in circles, and will -likely never, or very rarely scale the wall properly to the achieve the reward. -If we start with a simpler task, such as moving toward an unobstructed goal, -then the agent can easily learn to accomplish the task. From there, we can -slowly add to the difficulty of the task by increasing the size of the wall, -until the agent can complete the initially near-impossible task of scaling the -wall. We are including just such an environment with the ML-Agents toolkit 0.2, -called __Wall Jump__. +Imagine a task in which an agent needs to scale a wall to arrive at a goal. The starting +point when training an agent to accomplish this task will be a random policy. That +starting policy will have the agent running in circles, and will likely never, or very +rarely scale the wall properly to the achieve the reward. If we start with a simpler +task, such as moving toward an unobstructed goal, then the agent can easily learn to +accomplish the task. From there, we can slowly add to the difficulty of the task by +increasing the size of the wall, until the agent can complete the initially +near-impossible task of scaling the wall. We are including just such an environment with +the ML-Agents toolkit 0.2, called Wall Jump. ![Wall](images/curriculum.png) -_Demonstration of a curriculum training scenario in which a progressively taller -wall obstructs the path to the goal._ - -To see this in action, observe the two learning curves below. Each displays the -reward over time for an agent trained using PPO with the same set of training -hyperparameters. The difference is that one agent was trained using the -full-height wall version of the task, and the other agent was trained using the -curriculum version of the task. As you can see, without using curriculum -learning the agent has a lot of difficulty. We think that by using well-crafted -curricula, agents trained using reinforcement learning will be able to -accomplish tasks otherwise much more difficult. - +_Demonstration of a curriculum training scenario in which a progressively taller wall +obstructs the path to the goal._ + +To see this in action, observe the two learning curves below. Each displays the reward +over time for an agent trained using PPO with the same set of training hyperparameters. +The difference is that one agent was trained using the full-height wall +version of the task, and the other agent was trained using the curriculum version of +the task. As you can see, without using curriculum learning the agent has a lot of +difficulty. We think that by using well-crafted curricula, agents trained using +reinforcement learning will be able to accomplish tasks otherwise much more difficult. + ![Log](images/curriculum_progress.png) ## How-To + +So how does it work? In order to define a curriculum, the first step is to decide which +parameters of the environment will vary. In the case of the Wall Area environment, what +varies is the height of the wall. We can define this as a reset parameter in the Academy +object of our scene, and by doing so it becomes adjustable via the Python API. Rather +than adjusting it by hand, we then create a simple JSON file which describes the +structure of the curriculum. Within it we can set at what points in the training process +our wall height will change, either based on the percentage of training steps which have +taken place, or what the average reward the agent has received in the recent past is. +Once these are in place, we simply launch ppo.py using the `–curriculum-file` flag to +point to the JSON file, and PPO we will train using Curriculum Learning. Of course we can +then keep track of the current lesson and progress via TensorBoard. -Each Brain in an environment can have a corresponding curriculum. These -curriculums are held in what we call a metacurriculum. A metacurriculum allows -different Brains to follow different curriculums within the same environment. - -### Specifying a Metacurriculum - -We first create a folder inside `config/curricula/` for the environment we want -to use curriculum learning with. For example, if we were creating a -metacurriculum for Wall Jump, we would create the folder -`config/curricula/wall-jump/`. We will place our curriculums inside this folder. - -### Specifying a Curriculum - -In order to define a curriculum, the first step is to decide which parameters of -the environment will vary. In the case of the Wall Jump environment, what varies -is the height of the wall. We define this as a `Reset Parameter` in the Academy -object of our scene, and by doing so it becomes adjustable via the Python API. -Rather than adjusting it by hand, we will create a JSON file which -describes the structure of the curriculum. Within it, we can specify which -points in the training process our wall height will change, either based on the -percentage of training steps which have taken place, or what the average reward -the agent has received in the recent past is. Below is an example curriculum for -the BigWallBrain in the Wall Jump environment. ```json { "measure" : "progress", "thresholds" : [0.1, 0.3, 0.5], - "min_lesson_length" : 100, - "signal_smoothing" : true, - "parameters" : + "min_lesson_length" : 2, + "signal_smoothing" : true, + "parameters" : { "big_wall_min_height" : [0.0, 4.0, 6.0, 8.0], - "big_wall_max_height" : [4.0, 7.0, 8.0, 8.0] + "big_wall_max_height" : [4.0, 7.0, 8.0, 8.0], + "small_wall_height" : [1.5, 2.0, 2.5, 4.0] } } ``` * `measure` - What to measure learning progress, and advancement in lessons by. - * `reward` - Uses a measure received reward. - * `progress` - Uses ratio of steps/max_steps. -* `thresholds` (float array) - Points in value of `measure` where lesson should - be increased. -* `min_lesson_length` (int) - The minimum number of episodes that should be - completed before the lesson can change. If `measure` is set to `reward`, the - average cumulative reward of the last `min_lesson_length` episodes will be - used to determine if the lesson should change. Must be nonnegative. - - __Important__: the average reward that is compared to the thresholds is - different than the mean reward that is logged to the console. For example, - if `min_lesson_length` is `100`, the lesson will increment after the average - cumulative reward of the last `100` episodes exceeds the current threshold. - The mean reward logged to the console is dictated by the `summary_freq` - parameter in the - [trainer configuration file](Training-ML-Agents.md#training-config-file). -* `signal_smoothing` (true/false) - Whether to weight the current progress - measure by previous values. - * If `true`, weighting will be 0.75 (new) 0.25 (old). -* `parameters` (dictionary of key:string, value:float array) - Corresponds to - Academy reset parameters to control. Length of each array should be one - greater than number of thresholds. - -Once our curriculum is defined, we have to use the reset parameters we defined -and modify the environment from the Agent's `AgentReset()` function. See -[WallJumpAgent.cs](https://github.com/Unity-Technologies/ml-agents/blob/master/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs) -for an example. Note that if the Academy's __Max Steps__ is not set to some -positive number the environment will never be reset. The Academy must reset -for the environment to reset. - -We will save this file into our metacurriculum folder with the name of its -corresponding Brain. For example, in the Wall Jump environment, there are two -Brains---BigWallBrain and SmallWallBrain. If we want to define a curriculum for -the BigWallBrain, we will save `BigWallBrain.json` into -`curricula/wall-jump/`. - -### Training with a Curriculum - -Once we have specified our metacurriculum and curriculums, we can launch -`mlagents-learn` using the `–curriculum` flag to point to the metacurriculum -folder and PPO will train using Curriculum Learning. For example, to train -agents in the Wall Jump environment with curriculum learning, we can run - -```sh -mlagents-learn config/trainer_config.yaml --curriculum=curricula/wall-jump/ --run-id=wall-jump-curriculum --train -``` - -We can then keep track of the current lessons and progresses via TensorBoard. + * `reward` - Uses a measure received reward. + * `progress` - Uses ratio of steps/max_steps. +* `thresholds` (float array) - Points in value of `measure` where lesson should be increased. +* `min_lesson_length` (int) - How many times the progress measure should be reported before +incrementing the lesson. +* `signal_smoothing` (true/false) - Whether to weight the current progress measure by previous values. + * If `true`, weighting will be 0.75 (new) 0.25 (old). +* `parameters` (dictionary of key:string, value:float array) - Corresponds to academy reset parameters to control. Length of each array +should be one greater than number of thresholds. diff --git a/docs/Training-Imitation-Learning.md b/docs/Training-Imitation-Learning.md index f5f89068ae..583d073481 100644 --- a/docs/Training-Imitation-Learning.md +++ b/docs/Training-Imitation-Learning.md @@ -1,75 +1,35 @@ # Imitation Learning -It is often more intuitive to simply demonstrate the behavior we want an agent -to perform, rather than attempting to have it learn via trial-and-error methods. -Consider our -[running example](ML-Agents-Overview.md#running-example-training-npc-behaviors) -of training a medic NPC : instead of indirectly training a medic with the help -of a reward function, we can give the medic real world examples of observations -from the game and actions from a game controller to guide the medic's behavior. -More specifically, in this mode, the Brain type during training is set to Player -and all the actions performed with the controller (in addition to the agent -observations) will be recorded and sent to the Python API. The imitation -learning algorithm will then use these pairs of observations and actions from -the human player to learn a policy. [Video Link](https://youtu.be/kpb8ZkMBFYs). +It is often more intuitive to simply demonstrate the behavior we want an agent to perform, rather than attempting to have it learn via trial-and-error methods. Consider our [running example](ML-Agents-Overview.md#running-example-training-npc-behaviors) of training a medic NPC : instead of indirectly training a medic with the help of a reward function, we can give the medic real world examples of observations from the game and actions from a game controller to guide the medic's behavior. More specifically, in this mode, the Brain type during training is set to Player and all the actions performed with the controller (in addition to the agent observations) will be recorded and sent to the Python API. The imitation learning algorithm will then use these pairs of observations and actions from the human player to learn a policy. [Video Link](https://youtu.be/kpb8ZkMBFYs). ## Using Behavioral Cloning -There are a variety of possible imitation learning algorithms which can be used, -the simplest one of them is Behavioral Cloning. It works by collecting training -data from a teacher, and then simply uses it to directly learn a policy, in the -same way the supervised learning for image classification or other traditional -Machine Learning tasks work. +There are a variety of possible imitation learning algorithms which can be used, the simplest one of them is Behavioral Cloning. It works by collecting training data from a teacher, and then simply uses it to directly learn a policy, in the same way the supervised learning for image classification or other traditional Machine Learning tasks work. -1. In order to use imitation learning in a scene, the first thing you will need - is to create two Brains, one which will be the "Teacher," and the other which - will be the "Student." We will assume that the names of the Brain - `GameObject`s are "Teacher" and "Student" respectively. -2. Set the "Teacher" Brain to Player mode, and properly configure the inputs to - map to the corresponding actions. **Ensure that "Broadcast" is checked within - the Brain inspector window.** -3. Set the "Student" Brain to External mode. -4. Link the Brains to the desired Agents (one Agent as the teacher and at least - one Agent as a student). -5. In `config/trainer_config.yaml`, add an entry for the "Student" Brain. Set - the `trainer` parameter of this entry to `imitation`, and the - `brain_to_imitate` parameter to the name of the teacher Brain: "Teacher". - Additionally, set `batches_per_epoch`, which controls how much training to do - each moment. Increase the `max_steps` option if you'd like to keep training - the Agents for a longer period of time. -6. Launch the training process with `mlagents-learn config/trainer_config.yaml - --train --slow`, and press the :arrow_forward: button in Unity when the - message _"Start training by pressing the Play button in the Unity Editor"_ is - displayed on the screen -7. From the Unity window, control the Agent with the Teacher Brain by providing - "teacher demonstrations" of the behavior you would like to see. -8. Watch as the Agent(s) with the student Brain attached begin to behave - similarly to the demonstrations. -9. Once the Student Agents are exhibiting the desired behavior, end the training - process with `CTL+C` from the command line. -10. Move the resulting `*.bytes` file into the `TFModels` subdirectory of the - Assets folder (or a subdirectory within Assets of your choosing) , and use - with `Internal` Brain. +1. In order to use imitation learning in a scene, the first thing you will need is to create two Brains, one which will be the "Teacher," and the other which will be the "Student." We will assume that the names of the brain `GameObject`s are "Teacher" and "Student" respectively. +2. Set the "Teacher" brain to Player mode, and properly configure the inputs to map to the corresponding actions. **Ensure that "Broadcast" is checked within the Brain inspector window.** +3. Set the "Student" brain to External mode. +4. Link the brains to the desired agents (one agent as the teacher and at least one agent as a student). +5. In `trainer_config.yaml`, add an entry for the "Student" brain. Set the `trainer` parameter of this entry to `imitation`, and the `brain_to_imitate` parameter to the name of the teacher brain: "Teacher". Additionally, set `batches_per_epoch`, which controls how much training to do each moment. Increase the `max_steps` option if you'd like to keep training the agents for a longer period of time. +6. Launch the training process with `python3 python/learn.py --train --slow`, and press the :arrow_forward: button in Unity when the message _"Start training by pressing the Play button in the Unity Editor"_ is displayed on the screen +7. From the Unity window, control the agent with the Teacher brain by providing "teacher demonstrations" of the behavior you would like to see. +8. Watch as the agent(s) with the student brain attached begin to behave similarly to the demonstrations. +9. Once the Student agents are exhibiting the desired behavior, end the training process with `CTL+C` from the command line. +10. Move the resulting `*.bytes` file into the `TFModels` subdirectory of the Assets folder (or a subdirectory within Assets of your choosing) , and use with `Internal` brain. ### BC Teacher Helper -We provide a convenience utility, `BC Teacher Helper` component that you can add -to the Teacher Agent. +We provide a convenience utility, `BC Teacher Helper` component that you can add to the Teacher Agent.

- BC Teacher Helper + BC Teacher Helper

This utility enables you to use keyboard shortcuts to do the following: -1. To start and stop recording experiences. This is useful in case you'd like to - interact with the game _but not have the agents learn from these - interactions_. The default command to toggle this is to press `R` on the - keyboard. +1. To start and stop recording experiences. This is useful in case you'd like to interact with the game _but not have the agents learn from these interactions_. The default command to toggle this is to press `R` on the keyboard. + +2. Reset the training buffer. This enables you to instruct the agents to forget their buffer of recent experiences. This is useful if you'd like to get them to quickly learn a new behavior. The default command to reset the buffer is to press `C` on the keyboard. -2. Reset the training buffer. This enables you to instruct the agents to forget - their buffer of recent experiences. This is useful if you'd like to get them - to quickly learn a new behavior. The default command to reset the buffer is - to press `C` on the keyboard. diff --git a/docs/Training-ML-Agents.md b/docs/Training-ML-Agents.md index d700f3992a..7e1e4be075 100644 --- a/docs/Training-ML-Agents.md +++ b/docs/Training-ML-Agents.md @@ -1,201 +1,99 @@ # Training ML-Agents -The ML-Agents toolkit conducts training using an external Python training -process. During training, this external process communicates with the Academy -object in the Unity scene to generate a block of agent experiences. These -experiences become the training set for a neural network used to optimize the -agent's policy (which is essentially a mathematical function mapping -observations to actions). In reinforcement learning, the neural network -optimizes the policy by maximizing the expected rewards. In imitation learning, -the neural network optimizes the policy to achieve the smallest difference -between the actions chosen by the agent trainee and the actions chosen by the -expert in the same situation. - -The output of the training process is a model file containing the optimized -policy. This model file is a TensorFlow data graph containing the mathematical -operations and the optimized weights selected during the training process. You -can use the generated model file with the Internal Brain type in your Unity -project to decide the best course of action for an agent. - -Use the command `mlagents-learn` to train your agents. This command is installed -with the `mlagents` package and its implementation can be found at -`ml-agents/mlagents/trainers/learn.py`. The [configuration file](#training-config-file), -`config/trainer_config.yaml` specifies the hyperparameters used during training. -You can edit this file with a text editor to add a specific configuration for -each Brain. - -For a broader overview of reinforcement learning, imitation learning and the -ML-Agents training process, see [ML-Agents Toolkit -Overview](ML-Agents-Overview.md). - -## Training with mlagents-learn - -Use the `mlagents-learn` command to train agents. `mlagents-learn` supports -training with -[reinforcement learning](Background-Machine-Learning.md#reinforcement-learning), -[curriculum learning](Training-Curriculum-Learning.md), -and [behavioral cloning imitation learning](Training-Imitation-Learning.md). - -Run `mlagents-learn` from the command line to launch the training process. Use -the command line patterns and the `config/trainer_config.yaml` file to control -training options. +The ML-Agents toolkit conducts training using an external Python training process. During training, this external process communicates with the Academy object in the Unity scene to generate a block of agent experiences. These experiences become the training set for a neural network used to optimize the agent's policy (which is essentially a mathematical function mapping observations to actions). In reinforcement learning, the neural network optimizes the policy by maximizing the expected rewards. In imitation learning, the neural network optimizes the policy to achieve the smallest difference between the actions chosen by the agent trainee and the actions chosen by the expert in the same situation. -The basic command for training is: +The output of the training process is a model file containing the optimized policy. This model file is a TensorFlow data graph containing the mathematical operations and the optimized weights selected during the training process. You can use the generated model file with the Internal Brain type in your Unity project to decide the best course of action for an agent. + +Use the Python program, `learn.py` to train your agents. This program can be found in the `python` directory of the ML-Agents SDK. The [configuration file](#training-config-file), `trainer_config.yaml` specifies the hyperparameters used during training. You can edit this file with a text editor to add a specific configuration for each brain. + +For a broader overview of reinforcement learning, imitation learning and the ML-Agents training process, see [ML-Agents Toolkit Overview](ML-Agents-Overview.md). + +## Training with learn.py -```sh -mlagents-learn --env= --run-id= --train -``` +Use the Python `learn.py` program to train agents. `learn.py` supports training with [reinforcement learning](Background-Machine-Learning.md#reinforcement-learning), [curriculum learning](Training-Curriculum-Learning.md), and [behavioral cloning imitation learning](Training-Imitation-Learning.md). -where +Run `learn.py` from the command line to launch the training process. Use the command line patterns and the `trainer_config.yaml` file to control training options. -* `` is the file path of the trainer configuration yaml. -* ``__(Optional)__ is the name (including path) of your Unity - executable containing the agents to be trained. If `` is not passed, - the training will happen in the Editor. Press the :arrow_forward: button in - Unity when the message _"Start training by pressing the Play button in the - Unity Editor"_ is displayed on the screen. -* `` is an optional identifier you can use to identify the - results of individual training runs. +The basic command for training is: + + python3 learn.py --run-id= --train -For example, suppose you have a project in Unity named "CatsOnBicycles" which -contains agents ready to train. To perform the training: +where + * ``__(Optional)__ is the name (including path) of your Unity executable containing the agents to be trained. If `` is not passed, the training will happen in the Editor. Press the :arrow_forward: button in Unity when the message _"Start training by pressing the Play button in the Unity Editor"_ is displayed on the screen. + * `` is an optional identifier you can use to identify the results of individual training runs. -1. [Build the project](Learning-Environment-Executable.md), making sure that you - only include the training scene. +For example, suppose you have a project in Unity named "CatsOnBicycles" which contains agents ready to train. To perform the training: + +1. [Build the project](Learning-Environment-Executable.md), making sure that you only include the training scene. 2. Open a terminal or console window. -3. Navigate to the directory where you installed the ML-Agents Toolkit. -4. Run the following to launch the training process using the path to the Unity - environment you built in step 1: +3. Navigate to the ml-agents `python` folder. +4. Run the following to launch the training process using the path to the Unity environment you built in step 1: -```sh -mlagents-learn config/trainer_config.yaml --env=../../projects/Cats/CatsOnBicycles.app --run-id=cob_1 --train -``` + python3 learn.py ../../projects/Cats/CatsOnBicycles.app --run-id=cob_1 --train -During a training session, the training program prints out and saves updates at -regular intervals (specified by the `summary_freq` option). The saved statistics -are grouped by the `run-id` value so you should assign a unique id to each -training run if you plan to view the statistics. You can view these statistics -using TensorBoard during or after training by running the following command: +During a training session, the training program prints out and saves updates at regular intervals (specified by the `summary_freq` option). The saved statistics are grouped by the `run-id` value so you should assign a unique id to each training run if you plan to view the statistics. You can view these statistics using TensorBoard during or after training by running the following command (from the ML-Agents python directory): -```sh -tensorboard --logdir=summaries -``` + tensorboard --logdir=summaries And then opening the URL: [localhost:6006](http://localhost:6006). + +When training is finished, you can find the saved model in the `python/models` folder under the assigned run-id — in the cats example, the path to the model would be `python/models/cob_1/CatsOnBicycles_cob_1.bytes`. -When training is finished, you can find the saved model in the `models` folder -under the assigned run-id — in the cats example, the path to the model would be -`models/cob_1/CatsOnBicycles_cob_1.bytes`. - -While this example used the default training hyperparameters, you can edit the -[training_config.yaml file](#training-config-file) with a text editor to set -different values. +While this example used the default training hyperparameters, you can edit the [training_config.yaml file](#training-config-file) with a text editor to set different values. ### Command line training options -In addition to passing the path of the Unity executable containing your training -environment, you can set the following command line options when invoking -`mlagents-learn`: - -* `--env=` - Specify an executable environment to train. -* `--curriculum=` – Specify a curriculum JSON file for defining the - lessons for curriculum training. See [Curriculum - Training](Training-Curriculum-Learning.md) for more information. -* `--keep-checkpoints=` – Specify the maximum number of model checkpoints to - keep. Checkpoints are saved after the number of steps specified by the - `save-freq` option. Once the maximum number of checkpoints has been reached, - the oldest checkpoint is deleted when saving a new checkpoint. Defaults to 5. -* `--lesson=` – Specify which lesson to start with when performing curriculum - training. Defaults to 0. -* `--load` – If set, the training code loads an already trained model to - initialize the neural network before training. The learning code looks for the - model in `models//` (which is also where it saves models at the end of - training). When not set (the default), the neural network weights are randomly - initialized and an existing model is not loaded. -* `--num-runs=` - Sets the number of concurrent training sessions to perform. - Default is set to 1. Set to higher values when benchmarking performance and - multiple training sessions is desired. Training sessions are independent, and - do not improve learning performance. -* `--run-id=` – Specifies an identifier for each training run. This - identifier is used to name the subdirectories in which the trained model and - summary statistics are saved as well as the saved model itself. The default id - is "ppo". If you use TensorBoard to view the training statistics, always set a - unique run-id for each training run. (The statistics for all runs with the - same id are combined as if they were produced by a the same session.) -* `--save-freq=` Specifies how often (in steps) to save the model during - training. Defaults to 50000. -* `--seed=` – Specifies a number to use as a seed for the random number - generator used by the training code. -* `--slow` – Specify this option to run the Unity environment at normal, game - speed. The `--slow` mode uses the **Time Scale** and **Target Frame Rate** - specified in the Academy's **Inference Configuration**. By default, training - runs using the speeds specified in your Academy's **Training Configuration**. - See - [Academy Properties](Learning-Environment-Design-Academy.md#academy-properties). -* `--train` – Specifies whether to train model or only run in inference mode. - When training, **always** use the `--train` option. -* `--worker-id=` – When you are running more than one training environment at - the same time, assign each a unique worker-id number. The worker-id is added - to the communication port opened between the current instance of - `mlagents-learn` and the ExternalCommunicator object in the Unity environment. - Defaults to 0. -* `--docker-target-name=
` – The Docker Volume on which to store curriculum, - executable and model files. See [Using Docker](Using-Docker.md). -* `--no-graphics` - Specify this option to run the Unity executable in - `-batchmode` and doesn't initialize the graphics driver. Use this only if your - training doesn't involve visual observations (reading from Pixels). See - [here](https://docs.unity3d.com/Manual/CommandLineArguments.html) for more - details. +In addition to passing the path of the Unity executable containing your training environment, you can set the following command line options when invoking `learn.py`: + +* `--curriculum=` – Specify a curriculum JSON file for defining the lessons for curriculum training. See [Curriculum Training](Training-Curriculum-Learning.md) for more information. +* `--keep-checkpoints=` – Specify the maximum number of model checkpoints to keep. Checkpoints are saved after the number of steps specified by the `save-freq` option. Once the maximum number of checkpoints has been reached, the oldest checkpoint is deleted when saving a new checkpoint. Defaults to 5. +* `--lesson=` – Specify which lesson to start with when performing curriculum training. Defaults to 0. +* `--load` – If set, the training code loads an already trained model to initialize the neural network before training. The learning code looks for the model in `python/models//` (which is also where it saves models at the end of training). When not set (the default), the neural network weights are randomly initialized and an existing model is not loaded. +* `--run-id=` – Specifies an identifier for each training run. This identifier is used to name the subdirectories in which the trained model and summary statistics are saved as well as the saved model itself. The default id is "ppo". If you use TensorBoard to view the training statistics, always set a unique run-id for each training run. (The statistics for all runs with the same id are combined as if they were produced by a the same session.) +* `--save-freq=` Specifies how often (in steps) to save the model during training. Defaults to 50000. +* `--seed=` – Specifies a number to use as a seed for the random number generator used by the training code. +* `--slow` – Specify this option to run the Unity environment at normal, game speed. The `--slow` mode uses the **Time Scale** and **Target Frame Rate** specified in the Academy's **Inference Configuration**. By default, training runs using the speeds specified in your Academy's **Training Configuration**. See [Academy Properties](Learning-Environment-Design-Academy.md#academy-properties). +* `--train` – Specifies whether to train model or only run in inference mode. When training, **always** use the `--train` option. +* `--worker-id=` – When you are running more than one training environment at the same time, assign each a unique worker-id number. The worker-id is added to the communication port opened between the current instance of learn.py and the ExternalCommunicator object in the Unity environment. Defaults to 0. +* `--docker-target-name=
` – The Docker Volume on which to store curriculum, executable and model files. See [Using Docker](Using-Docker.md). +* `--no-graphics` - Specify this option to run the Unity executable in `-batchmode` and doesn't initialize the graphics driver. Use this only if your training doesn't involve visual observations (reading from Pixels). See [here](https://docs.unity3d.com/Manual/CommandLineArguments.html) for more details. ### Training config file -The training config file, `config/trainer_config.yaml` specifies the training -method, the hyperparameters, and a few additional values to use during training. -The file is divided into sections. The **default** section defines the default -values for all the available settings. You can also add new sections to override -these defaults to train specific Brains. Name each of these override sections -after the GameObject containing the Brain component that should use these -settings. (This GameObject will be a child of the Academy in your scene.) -Sections for the example environments are included in the provided config file. - -| **Setting** | **Description** | **Applies To Trainer\*** | -| :------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | -| batch_size | The number of experiences in each iteration of gradient descent. | PPO, BC | -| batches_per_epoch | In imitation learning, the number of batches of training examples to collect before training the model. | BC | -| beta | The strength of entropy regularization. | PPO | -| brain\_to\_imitate | For imitation learning, the name of the GameObject containing the Brain component to imitate. | BC | -| buffer_size | The number of experiences to collect before updating the policy model. | PPO | -| curiosity\_enc\_size | The size of the encoding to use in the forward and inverse models in the Curioity module. | PPO | -| curiosity_strength | Magnitude of intrinsic reward generated by Intrinsic Curiosity Module. | PPO | -| epsilon | Influences how rapidly the policy can evolve during training. | PPO | -| gamma | The reward discount rate for the Generalized Advantage Estimator (GAE). | PPO | -| hidden_units | The number of units in the hidden layers of the neural network. | PPO, BC | -| lambd | The regularization parameter. | PPO | -| learning_rate | The initial learning rate for gradient descent. | PPO, BC | -| max_steps | The maximum number of simulation steps to run during a training session. | PPO, BC | -| memory_size | The size of the memory an agent must keep. Used for training with a recurrent neural network. See [Using Recurrent Neural Networks](Feature-Memory.md). | PPO, BC | -| normalize | Whether to automatically normalize observations. | PPO | -| num_epoch | The number of passes to make through the experience buffer when performing gradient descent optimization. | PPO | -| num_layers | The number of hidden layers in the neural network. | PPO, BC | -| sequence_length | Defines how long the sequences of experiences must be while training. Only used for training with a recurrent neural network. See [Using Recurrent Neural Networks](Feature-Memory.md). | PPO, BC | -| summary_freq | How often, in steps, to save training statistics. This determines the number of data points shown by TensorBoard. | PPO, BC | -| time_horizon | How many steps of experience to collect per-agent before adding it to the experience buffer. | PPO, BC | -| trainer | The type of training to perform: "ppo" or "imitation". | PPO, BC | -| use_curiosity | Train using an additional intrinsic reward signal generated from Intrinsic Curiosity Module. | PPO | -| use_recurrent | Train using a recurrent neural network. See [Using Recurrent Neural Networks](Feature-Memory.md). | PPO, BC | - -\*PPO = Proximal Policy Optimization, BC = Behavioral Cloning (Imitation) - -For specific advice on setting hyperparameters based on the type of training you -are conducting, see: +The training config file, `trainer_config.yaml` specifies the training method, the hyperparameters, and a few additional values to use during training. The file is divided into sections. The **default** section defines the default values for all the available settings. You can also add new sections to override these defaults to train specific Brains. Name each of these override sections after the GameObject containing the Brain component that should use these settings. (This GameObject will be a child of the Academy in your scene.) Sections for the example environments are included in the provided config file. `Learn.py` finds the config file by name and looks for it in the same directory as itself. + +| ** Setting ** | **Description** | **Applies To Trainer**| +| :-- | :-- | :-- | +| batch_size | The number of experiences in each iteration of gradient descent.| PPO, BC | +| batches_per_epoch | In imitation learning, the number of batches of training examples to collect before training the model.| BC | +| beta | The strength of entropy regularization.| PPO, BC | +| brain\_to\_imitate | For imitation learning, the name of the GameObject containing the Brain component to imitate. | BC | +| buffer_size | The number of experiences to collect before updating the policy model. | PPO | +| curiosity\_enc\_size | The size of the encoding to use in the forward and inverse models in the Curioity module. | PPO | +| curiosity_strength | Magnitude of intrinsic reward generated by Intrinsic Curiosity Module. | PPO | +| epsilon | Influences how rapidly the policy can evolve during training.| PPO, BC | +| gamma | The reward discount rate for the Generalized Advantage Estimator (GAE). | PPO | +| hidden_units | The number of units in the hidden layers of the neural network. | PPO, BC | +| lambd | The regularization parameter. | PPO | +| learning_rate | The initial learning rate for gradient descent. | PPO, BC | +| max_steps | The maximum number of simulation steps to run during a training session. | PPO, BC | +| memory_size | The size of the memory an agent must keep. Used for training with a recurrent neural network. See [Using Recurrent Neural Networks](Feature-Memory.md). | PPO, BC | +| normalize | Whether to automatically normalize observations. | PPO, BC | +| num_epoch | The number of passes to make through the experience buffer when performing gradient descent optimization. | PPO, BC | +| num_layers | The number of hidden layers in the neural network. | PPO, BC | +| sequence_length | Defines how long the sequences of experiences must be while training. Only used for training with a recurrent neural network. See [Using Recurrent Neural Networks](Feature-Memory.md). | PPO, BC | +| summary_freq | How often, in steps, to save training statistics. This determines the number of data points shown by TensorBoard. | PPO, BC | +| time_horizon | How many steps of experience to collect per-agent before adding it to the experience buffer. | PPO, BC | +| trainer | The type of training to perform: "ppo" or "imitation".| PPO, BC | +| use_curiosity | Train using an additional intrinsic reward signal generated from Intrinsic Curiosity Module. | PPO | +| use_recurrent | Train using a recurrent neural network. See [Using Recurrent Neural Networks](Feature-Memory.md).| PPO, BC | +|| PPO = Proximal Policy Optimization, BC = Behavioral Cloning (Imitation)) || + +For specific advice on setting hyperparameters based on the type of training you are conducting, see: * [Training with PPO](Training-PPO.md) * [Using Recurrent Neural Networks](Feature-Memory.md) * [Training with Curriculum Learning](Training-Curriculum-Learning.md) * [Training with Imitation Learning](Training-Imitation-Learning.md) -You can also compare the -[example environments](Learning-Environment-Examples.md) -to the corresponding sections of the `config/trainer_config.yaml` file for each -example to see how the hyperparameters and other configuration variables have -been changed from the defaults. +You can also compare the [example environments](Learning-Environment-Examples.md) to the corresponding sections of the `trainer-config.yaml` file for each example to see how the hyperparameters and other configuration variables have been changed from the defaults. diff --git a/docs/Training-PPO.md b/docs/Training-PPO.md index 7f9047ff5f..29b2d5def8 100644 --- a/docs/Training-PPO.md +++ b/docs/Training-PPO.md @@ -1,248 +1,172 @@ # Training with Proximal Policy Optimization -ML-Agents uses a reinforcement learning technique called -[Proximal Policy Optimization (PPO)](https://blog.openai.com/openai-baselines-ppo/). -PPO uses a neural network to approximate the ideal function that maps an agent's -observations to the best action an agent can take in a given state. The -ML-Agents PPO algorithm is implemented in TensorFlow and runs in a separate -Python process (communicating with the running Unity application over a socket). +ML-Agents uses a reinforcement learning technique called [Proximal Policy Optimization (PPO)](https://blog.openai.com/openai-baselines-ppo/). PPO uses a neural network to approximate the ideal function that maps an agent's observations to the best action an agent can take in a given state. The ML-Agents PPO algorithm is implemented in TensorFlow and runs in a separate Python process (communicating with the running Unity application over a socket). -See [Training ML-Agents](Training-ML-Agents.md) for instructions on running the -training program, `learn.py`. +See [Training ML-Agents](Training-ML-Agents.md) for instructions on running the training program, `learn.py`. -If you are using the recurrent neural network (RNN) to utilize memory, see -[Using Recurrent Neural Networks](Feature-Memory.md) for RNN-specific training -details. +If you are using the recurrent neural network (RNN) to utilize memory, see [Using Recurrent Neural Networks](Feature-Memory.md) for RNN-specific training details. -If you are using curriculum training to pace the difficulty of the learning task -presented to an agent, see [Training with Curriculum -Learning](Training-Curriculum-Learning.md). +If you are using curriculum training to pace the difficulty of the learning task presented to an agent, see [Training with Curriculum Learning](Training-Curriculum-Learning.md). -For information about imitation learning, which uses a different training -algorithm, see -[Training with Imitation Learning](Training-Imitation-Learning.md). +For information about imitation learning, which uses a different training algorithm, see [Training with Imitation Learning](Training-Imitation-Learning.md). ## Best Practices when training with PPO -Successfully training a Reinforcement Learning model often involves tuning the -training hyperparameters. This guide contains some best practices for tuning the -training process when the default parameters don't seem to be giving the level -of performance you would like. +Successfully training a Reinforcement Learning model often involves tuning the training hyperparameters. This guide contains some best practices for tuning the training process when the default parameters don't seem to be giving the level of performance you would like. ## Hyperparameters -### Gamma +#### Gamma -`gamma` corresponds to the discount factor for future rewards. This can be -thought of as how far into the future the agent should care about possible -rewards. In situations when the agent should be acting in the present in order -to prepare for rewards in the distant future, this value should be large. In -cases when rewards are more immediate, it can be smaller. +`gamma` corresponds to the discount factor for future rewards. This can be thought of as how far into the future the agent should care about possible rewards. In situations when the agent should be acting in the present in order to prepare for rewards in the distant future, this value should be large. In cases when rewards are more immediate, it can be smaller. Typical Range: `0.8` - `0.995` -### Lambda +#### Lambda -`lambd` corresponds to the `lambda` parameter used when calculating the -Generalized Advantage Estimate ([GAE](https://arxiv.org/abs/1506.02438)). This -can be thought of as how much the agent relies on its current value estimate -when calculating an updated value estimate. Low values correspond to relying -more on the current value estimate (which can be high bias), and high values -correspond to relying more on the actual rewards received in the environment -(which can be high variance). The parameter provides a trade-off between the -two, and the right value can lead to a more stable training process. +`lambd` corresponds to the `lambda` parameter used when calculating the Generalized Advantage Estimate ([GAE](https://arxiv.org/abs/1506.02438)). This can be thought of as how much the agent relies on its current value estimate when calculating an updated value estimate. Low values correspond to relying more on the current value estimate (which can be high bias), and high values correspond to relying more on the actual rewards received in the environment (which can be high variance). The parameter provides a trade-off between the two, and the right value can lead to a more stable training process. Typical Range: `0.9` - `0.95` -### Buffer Size +#### Buffer Size -`buffer_size` corresponds to how many experiences (agent observations, actions -and rewards obtained) should be collected before we do any learning or updating -of the model. **This should be a multiple of `batch_size`**. Typically a larger -`buffer_size` corresponds to more stable training updates. +`buffer_size` corresponds to how many experiences (agent observations, actions and rewards obtained) should be collected before we do any +learning or updating of the model. **This should be a multiple of `batch_size`**. Typically larger `buffer_size` correspond to more stable training updates. Typical Range: `2048` - `409600` -### Batch Size +#### Batch Size -`batch_size` is the number of experiences used for one iteration of a gradient -descent update. **This should always be a fraction of the `buffer_size`**. If -you are using a continuous action space, this value should be large (in the -order of 1000s). If you are using a discrete action space, this value should be -smaller (in order of 10s). +`batch_size` is the number of experiences used for one iteration of a gradient descent update. **This should always be a fraction of the +`buffer_size`**. If you are using a continuous action space, this value should be large (in the order of 1000s). If you are using a discrete action space, this value +should be smaller (in order of 10s). Typical Range (Continuous): `512` - `5120` Typical Range (Discrete): `32` - `512` -### Number of Epochs -`num_epoch` is the number of passes through the experience buffer during -gradient descent. The larger the `batch_size`, the larger it is acceptable to -make this. Decreasing this will ensure more stable updates, at the cost of -slower learning. +#### Number of Epochs + +`num_epoch` is the number of passes through the experience buffer during gradient descent. The larger the `batch_size`, the +larger it is acceptable to make this. Decreasing this will ensure more stable updates, at the cost of slower learning. Typical Range: `3` - `10` -### Learning Rate -`learning_rate` corresponds to the strength of each gradient descent update -step. This should typically be decreased if training is unstable, and the reward -does not consistently increase. +#### Learning Rate + +`learning_rate` corresponds to the strength of each gradient descent update step. This should typically be decreased if +training is unstable, and the reward does not consistently increase. Typical Range: `1e-5` - `1e-3` -### Time Horizon -`time_horizon` corresponds to how many steps of experience to collect per-agent -before adding it to the experience buffer. When this limit is reached before the -end of an episode, a value estimate is used to predict the overall expected -reward from the agent's current state. As such, this parameter trades off -between a less biased, but higher variance estimate (long time horizon) and more -biased, but less varied estimate (short time horizon). In cases where there are -frequent rewards within an episode, or episodes are prohibitively large, a -smaller number can be more ideal. This number should be large enough to capture -all the important behavior within a sequence of an agent's actions. +#### Time Horizon + +`time_horizon` corresponds to how many steps of experience to collect per-agent before adding it to the experience buffer. +When this limit is reached before the end of an episode, a value estimate is used to predict the overall expected reward from the agent's current state. +As such, this parameter trades off between a less biased, but higher variance estimate (long time horizon) and more biased, but less varied estimate (short time horizon). +In cases where there are frequent rewards within an episode, or episodes are prohibitively large, a smaller number can be more ideal. +This number should be large enough to capture all the important behavior within a sequence of an agent's actions. Typical Range: `32` - `2048` -### Max Steps +#### Max Steps -`max_steps` corresponds to how many steps of the simulation (multiplied by -frame-skip) are run during the training process. This value should be increased -for more complex problems. +`max_steps` corresponds to how many steps of the simulation (multiplied by frame-skip) are run during the training process. This value should be increased for more complex problems. Typical Range: `5e5` - `1e7` -### Beta +#### Beta -`beta` corresponds to the strength of the entropy regularization, which makes -the policy "more random." This ensures that agents properly explore the action -space during training. Increasing this will ensure more random actions are -taken. This should be adjusted such that the entropy (measurable from -TensorBoard) slowly decreases alongside increases in reward. If entropy drops -too quickly, increase `beta`. If entropy drops too slowly, decrease `beta`. +`beta` corresponds to the strength of the entropy regularization, which makes the policy "more random." This ensures that agents properly explore the action space during training. Increasing this will ensure more random actions are taken. This should be adjusted such that the entropy (measurable from TensorBoard) slowly decreases alongside increases in reward. If entropy drops too quickly, increase `beta`. If entropy drops too slowly, decrease `beta`. Typical Range: `1e-4` - `1e-2` -### Epsilon -`epsilon` corresponds to the acceptable threshold of divergence between the old -and new policies during gradient descent updating. Setting this value small will -result in more stable updates, but will also slow the training process. +#### Epsilon + +`epsilon` corresponds to the acceptable threshold of divergence between the old and new policies during gradient descent updating. Setting this value small will result in more stable updates, but will also slow the training process. Typical Range: `0.1` - `0.3` -### Normalize +#### Normalize -`normalize` corresponds to whether normalization is applied to the vector -observation inputs. This normalization is based on the running average and -variance of the vector observation. Normalization can be helpful in cases with -complex continuous control problems, but may be harmful with simpler discrete -control problems. +`normalize` corresponds to whether normalization is applied to the vector observation inputs. This normalization is based on the running average and variance of the vector observation. +Normalization can be helpful in cases with complex continuous control problems, but may be harmful with simpler discrete control problems. -### Number of Layers +#### Number of Layers -`num_layers` corresponds to how many hidden layers are present after the -observation input, or after the CNN encoding of the visual observation. For -simple problems, fewer layers are likely to train faster and more efficiently. -More layers may be necessary for more complex control problems. +`num_layers` corresponds to how many hidden layers are present after the observation input, or after the CNN encoding of the visual observation. For simple problems, +fewer layers are likely to train faster and more efficiently. More layers may be necessary for more complex control problems. Typical range: `1` - `3` -### Hidden Units +#### Hidden Units -`hidden_units` correspond to how many units are in each fully connected layer of -the neural network. For simple problems where the correct action is a -straightforward combination of the observation inputs, this should be small. For -problems where the action is a very complex interaction between the observation -variables, this should be larger. +`hidden_units` correspond to how many units are in each fully connected layer of the neural network. For simple problems +where the correct action is a straightforward combination of the observation inputs, this should be small. For problems where +the action is a very complex interaction between the observation variables, this should be larger. Typical Range: `32` - `512` -## (Optional) Recurrent Neural Network Hyperparameters +### (Optional) Recurrent Neural Network Hyperparameters The below hyperparameters are only used when `use_recurrent` is set to true. -### Sequence Length +#### Sequence Length -`sequence_length` corresponds to the length of the sequences of experience -passed through the network during training. This should be long enough to -capture whatever information your agent might need to remember over time. For -example, if your agent needs to remember the velocity of objects, then this can -be a small value. If your agent needs to remember a piece of information given -only once at the beginning of an episode, then this should be a larger value. +`sequence_length` corresponds to the length of the sequences of experience passed through the network during training. This should be long enough to capture whatever information your agent might need to remember over time. For example, if your agent needs to remember the velocity of objects, then this can be a small value. If your agent needs to remember a piece of information given only once at the beginning of an episode, then this should be a larger value. Typical Range: `4` - `128` -### Memory Size +#### Memory Size -`memory_size` corresponds to the size of the array of floating point numbers -used to store the hidden state of the recurrent neural network. This value must -be a multiple of 4, and should scale with the amount of information you expect -the agent will need to remember in order to successfully complete the task. +`memory_size` corresponds to the size of the array of floating point numbers used to store the hidden state of the recurrent neural network. This value must be a multiple of 4, and should scale with the amount of information you expect the agent will need to remember in order to successfully complete the task. Typical Range: `64` - `512` -## (Optional) Intrinsic Curiosity Module Hyperparameters +### (Optional) Intrinsic Curiosity Module Hyperparameters The below hyperparameters are only used when `use_curiosity` is set to true. -### Curioisty Encoding Size +#### Curioisty Encoding Size -`curiosity_enc_size` corresponds to the size of the hidden layer used to encode -the observations within the intrinsic curiosity module. This value should be -small enough to encourage the curiosity module to compress the original -observation, but also not too small to prevent it from learning the dynamics of -the environment. +`curiosity_enc_size` corresponds to the size of the hidden layer used to encode the observations within the intrinsic curiosity module. This value should be small enough to encourage the curiosity module to compress the original observation, but also not too small to prevent it from learning the dynamics of the environment. Typical Range: `64` - `256` -### Curiosity Strength +#### Curiosity Strength -`curiosity_strength` corresponds to the magnitude of the intrinsic reward -generated by the intrinsic curiosity module. This should be scaled in order to -ensure it is large enough to not be overwhelmed by extrnisic reward signals in -the environment. Likewise it should not be too large to overwhelm the extrinsic -reward signal. +`curiosity_strength` corresponds to the magnitude of the intrinsic reward generated by the intrinsic curiosity module. This should be scaled in order to ensure it is large enough to not be overwhelmed by extrnisic reward signals in the environment. Likewise it should not be too large to overwhelm the extrinsic reward signal. Typical Range: `0.1` - `0.001` ## Training Statistics -To view training statistics, use TensorBoard. For information on launching and -using TensorBoard, see -[here](./Getting-Started-with-Balance-Ball.md#observing-training-progress). +To view training statistics, use TensorBoard. For information on launching and using TensorBoard, see [here](./Getting-Started-with-Balance-Ball.md#observing-training-progress). -### Cumulative Reward +#### Cumulative Reward -The general trend in reward should consistently increase over time. Small ups -and downs are to be expected. Depending on the complexity of the task, a -significant increase in reward may not present itself until millions of steps -into the training process. +The general trend in reward should consistently increase over time. Small ups and downs are to be expected. Depending on the complexity of the task, a significant increase in reward may not present itself until millions of steps into the training process. -### Entropy +#### Entropy -This corresponds to how random the decisions of a Brain are. This should -consistently decrease during training. If it decreases too soon or not at all, -`beta` should be adjusted (when using discrete action space). +This corresponds to how random the decisions of a brain are. This should consistently decrease during training. If it decreases too soon or not at all, `beta` should be adjusted (when using discrete action space). -### Learning Rate +#### Learning Rate This will decrease over time on a linear schedule. -### Policy Loss +#### Policy Loss -These values will oscillate during training. Generally they should be less than -1.0. +These values will oscillate during training. Generally they should be less than 1.0. -### Value Estimate +#### Value Estimate -These values should increase as the cumulative reward increases. They correspond -to how much future reward the agent predicts itself receiving at any given -point. +These values should increase as the cumulative reward increases. They correspond to how much future reward the agent predicts itself receiving at any given point. -### Value Loss +#### Value Loss -These values will increase as the reward increases, and then should decrease -once reward becomes stable. +These values will increase as the reward increases, and then should decrease once reward becomes stable. diff --git a/docs/Training-on-Amazon-Web-Service.md b/docs/Training-on-Amazon-Web-Service.md index 49280fbccc..b61036098a 100644 --- a/docs/Training-on-Amazon-Web-Service.md +++ b/docs/Training-on-Amazon-Web-Service.md @@ -1,24 +1,18 @@ # Training on Amazon Web Service -This page contains instructions for setting up an EC2 instance on Amazon Web -Service for training ML-Agents environments. +This page contains instructions for setting up an EC2 instance on Amazon Web Service for training ML-Agents environments. ## Preconfigured AMI -We've prepared an preconfigured AMI for you with the ID: `ami-18642967` in the -`us-east-1` region. It was created as a modification of [Deep Learning AMI -(Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C). If you want to do -training without the headless mode, you need to enable X Server on it. After -launching your EC2 instance using the ami and ssh into it, run the following -commands to enable it: +We've prepared an preconfigured AMI for you with the ID: `ami-18642967` in the `us-east-1` region. It was created as a modification of [Deep Learning AMI (Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C). If you want to do training without the headless mode, you need to enable X Server on it. After launching your EC2 instance using the ami and ssh into it, run the following commands to enable it: -```console +``` //Start the X Server, press Enter to come to the command line -$ sudo /usr/bin/X :0 & +sudo /usr/bin/X :0 & //Check if Xorg process is running //You will have a list of processes running on the GPU, Xorg should be in the list, as shown below -$ nvidia-smi +nvidia-smi /* * Thu Jun 14 20:27:26 2018 * +-----------------------------------------------------------------------------+ @@ -40,16 +34,12 @@ $ nvidia-smi */ //Make the ubuntu use X Server for display -$ export DISPLAY=:0 +export DISPLAY=:0 ``` ## Configuring your own instance -You could also choose to configure your own instance. To begin with, you will -need an EC2 instance which contains the latest Nvidia drivers, CUDA9, and cuDNN. -In this tutorial we used the -[Deep Learning AMI (Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C) -listed under AWS Marketplace with a p2.xlarge instance. +You could also choose to configure your own instance. To begin with, you will need an EC2 instance which contains the latest Nvidia drivers, CUDA9, and cuDNN. In this tutorial we used the [Deep Learning AMI (Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C) listed under AWS Marketplace with a p2.xlarge instance. ### Installing the ML-Agents toolkit on the instance @@ -57,81 +47,72 @@ After launching your EC2 instance using the ami and ssh into it: 1. Activate the python3 environment - ```sh + ``` source activate python3 ``` -2. Clone the ML-Agents repo and install the required Python packages +2. Clone the ML-Agents repo and install the required python packages - ```sh + ``` git clone https://github.com/Unity-Technologies/ml-agents.git - cd ml-agents/ml-agents/ + cd ml-agents/python pip3 install . ``` ### Setting up X Server (optional) -X Server setup is only necessary if you want to do training that requires visual -observation input. _Instructions here are adapted from this -[Medium post](https://medium.com/towards-data-science/how-to-run-unity-on-amazon-cloud-or-without-monitor-3c10ce022639) -on running general Unity applications in the cloud._ +X Server setup is only necessary if you want to do training that requires visual observation input. _Instructions here are adapted from this [Medium post](https://medium.com/towards-data-science/how-to-run-unity-on-amazon-cloud-or-without-monitor-3c10ce022639) on running general Unity applications in the cloud._ -Current limitations of the Unity Engine require that a screen be available to -render to when using visual observations. In order to make this possible when -training on a remote server, a virtual screen is required. We can do this by -installing Xorg and creating a virtual screen. Once installed and created, we -can display the Unity environment in the virtual environment, and train as we -would on a local machine. Ensure that `headless` mode is disabled when building -linux executables which use visual observations. +Current limitations of the Unity Engine require that a screen be available to render to when using visual observations. In order to make this possible when training on a remote server, a virtual screen is required. We can do this by installing Xorg and creating a virtual screen. Once installed and created, we can display the Unity environment in the virtual environment, and train as we would on a local machine. Ensure that `headless` mode is disabled when building linux executables which use visual observations. 1. Install and setup Xorg: - ```console + ``` //Install Xorg - $ sudo apt-get update - $ sudo apt-get install -y xserver-xorg mesa-utils - $ sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024 + sudo apt-get update + sudo apt-get install -y xserver-xorg mesa-utils + sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024 //Get the BusID information - $ nvidia-xconfig --query-gpu-info + nvidia-xconfig --query-gpu-info //Add the BusID information to your /etc/X11/xorg.conf file - $ sudo sed -i 's/ BoardName "Tesla K80"/ BoardName "Tesla K80"\n BusID "0:30:0"/g' /etc/X11/xorg.conf + sudo sed -i 's/ BoardName "Tesla K80"/ BoardName "Tesla K80"\n BusID "0:30:0"/g' /etc/X11/xorg.conf //Remove the Section "Files" from the /etc/X11/xorg.conf file - $ sudo vim /etc/X11/xorg.conf //And remove two lines that contain Section "Files" and EndSection + sudo vim /etc/X11/xorg.conf //And remove two lines that contain Section "Files" and EndSection ``` 2. Update and setup Nvidia driver: - ```console + ``` //Download and install the latest Nvidia driver for ubuntu - $ wget http://download.nvidia.com/XFree86/Linux-x86_64/390.67/NVIDIA-Linux-x86_64-390.67.run - $ sudo /bin/bash ./NVIDIA-Linux-x86_64-390.67.run --accept-license --no-questions --ui=none + wget http://download.nvidia.com/XFree86/Linux-x86_64/390.67/NVIDIA-Linux-x86_64-390.67.run + sudo /bin/bash ./NVIDIA-Linux-x86_64-390.67.run --accept-license --no-questions --ui=none //Disable Nouveau as it will clash with the Nvidia driver - $ sudo echo 'blacklist nouveau' | sudo tee -a /etc/modprobe.d/blacklist.conf - $ sudo echo 'options nouveau modeset=0' | sudo tee -a /etc/modprobe.d/blacklist.conf - $ sudo echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf - $ sudo update-initramfs -u + sudo echo 'blacklist nouveau' | sudo tee -a /etc/modprobe.d/blacklist.conf + sudo echo 'options nouveau modeset=0' | sudo tee -a /etc/modprobe.d/blacklist.conf + sudo echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf + sudo update-initramfs -u ``` -3. Restart the EC2 instance: +2. Restart the EC2 instance: - ```console + ``` sudo reboot now ``` -4. Make sure there are no Xorg processes running: +3. Make sure there are no Xorg processes running: - ```console + ``` //Kill any possible running Xorg processes //Note that you might have to run this command multiple times depending on how Xorg is configured. - $ sudo killall Xorg + sudo killall Xorg //Check if there is any Xorg process left //You will have a list of processes running on the GPU, Xorg should not be in the list, as shown below. - $ nvidia-smi + nvidia-smi /* * Thu Jun 14 20:21:11 2018 * +-----------------------------------------------------------------------------+ @@ -153,25 +134,25 @@ linux executables which use visual observations. */ ``` -5. Start X Server and make the ubuntu use X Server for display: +4. Start X Server and make the ubuntu use X Server for display: - ```console + ``` //Start the X Server, press Enter to come to the command line - $ sudo /usr/bin/X :0 & + sudo /usr/bin/X :0 & //Check if Xorg process is running //You will have a list of processes running on the GPU, Xorg should be in the list. - $ nvidia-smi + nvidia-smi //Make the ubuntu use X Server for display - $ export DISPLAY=:0 + export DISPLAY=:0 ``` -6. Ensure the Xorg is correctly configured: +5. Ensure the Xorg is correctly configured: - ```console - //For more information on glxgears, see ftp://www.x.org/pub/X11R6.8.1/doc/glxgears.1.html. - $ glxgears + ``` + //For more information on glxgears, see ftp://www.x.org/pub/X11R6.8.1/doc/glxgears.1.html. + glxgears //If Xorg is configured correctly, you should see the following message /* * Running synchronized to the vertical refresh. The framerate should be @@ -184,27 +165,26 @@ linux executables which use visual observations. ## Training on EC2 instance -1. In the Unity Editor, load a project containing an ML-Agents environment (you - can use one of the example environments if you have not created your own). +1. In the Unity Editor, load a project containing an ML-Agents environment (you can use one of the example environments if you have not created your own). 2. Open the Build Settings window (menu: File > Build Settings). 3. Select Linux as the Target Platform, and x86_64 as the target architecture. 4. Check Headless Mode (If you haven't setup the X Server). 5. Click Build to build the Unity environment executable. -6. Upload the executable to your EC2 instance within `ml-agents` folder. +6. Upload the executable to your EC2 instance within `ml-agents/python` folder. 7. Test the instance setup from Python using: ```python - from mlagents.envs import UnityEnvironment + from unityagents import UnityEnvironment env = UnityEnvironment() ``` - Where `` corresponds to the path to your environment executable. You should receive a message confirming that the environment was loaded successfully. 8. Train the executable - ```console - chmod +x .x86_64 - mlagents-learn --env= --train ``` + //cd into your ml-agents/python folder + chmod +x .x86_64 + python learn.py --train + ``` \ No newline at end of file diff --git a/docs/Training-on-Microsoft-Azure-Custom-Instance.md b/docs/Training-on-Microsoft-Azure-Custom-Instance.md index 931bc1aa3a..7e0764c6a7 100644 --- a/docs/Training-on-Microsoft-Azure-Custom-Instance.md +++ b/docs/Training-on-Microsoft-Azure-Custom-Instance.md @@ -2,91 +2,75 @@ This page contains instructions for setting up a custom Virtual Machine on Microsoft Azure so you can running ML-Agents training in the cloud. -1. Start by - [deploying an Azure VM](https://docs.microsoft.com/azure/virtual-machines/linux/quick-create-portal) - with Ubuntu Linux (tests were done with 16.04 LTS). To use GPU support, use - a N-Series VM. -2. SSH into your VM. -3. Start with the following commands to install the Nvidia driver: +1. Start by [deploying an Azure VM](https://docs.microsoft.com/azure/virtual-machines/linux/quick-create-portal) with Ubuntu Linux (tests were done with 16.04 LTS). To use GPU support, use a N-Series VM. +2. SSH into your VM. +3. Start with the following commands to install the Nvidia driver: - ```sh - wget http://us.download.nvidia.com/tesla/375.66/nvidia-diag-driver-local-repo-ubuntu1604_375.66-1_amd64.deb +``` +wget http://us.download.nvidia.com/tesla/375.66/nvidia-diag-driver-local-repo-ubuntu1604_375.66-1_amd64.deb - sudo dpkg -i nvidia-diag-driver-local-repo-ubuntu1604_375.66-1_amd64.deb +sudo dpkg -i nvidia-diag-driver-local-repo-ubuntu1604_375.66-1_amd64.deb - sudo apt-get update +sudo apt-get update - sudo apt-get install cuda-drivers +sudo apt-get install cuda-drivers - sudo reboot - ``` +sudo reboot +``` -4. After a minute you should be able to reconnect to your VM and install the - CUDA toolkit: +4. After a minute you should be able to reconnect to your VM and install the CUDA toolkit: - ```sh - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb +``` +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb - sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb +sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb - sudo apt-get update +sudo apt-get update - sudo apt-get install cuda-8-0 - ``` +sudo apt-get install cuda-8-0 +``` -5. You'll next need to download cuDNN from the Nvidia developer site. This - requires a registered account. +5. You'll next need to download cuDNN from the Nvidia developer site. This requires a registered account. -6. Navigate to [http://developer.nvidia.com](http://developer.nvidia.com) and - create an account and verify it. +6. Navigate to [http://developer.nvidia.com](http://developer.nvidia.com) and create an account and verify it. -7. Download (to your own computer) cuDNN from [this url](https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v6/prod/8.0_20170307/Ubuntu16_04_x64/libcudnn6_6.0.20-1+cuda8.0_amd64-deb). +7. Download (to your own computer) cuDNN from [this url](https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v6/prod/8.0_20170307/Ubuntu16_04_x64/libcudnn6_6.0.20-1+cuda8.0_amd64-deb). -8. Copy the deb package to your VM: +8. Copy the deb package to your VM: ```scp libcudnn6_6.0.21-1+cuda8.0_amd64.deb @:libcudnn6_6.0.21-1+cuda8.0_amd64.deb ``` - ```sh - scp libcudnn6_6.0.21-1+cuda8.0_amd64.deb @:libcudnn6_6.0.21-1+cuda8.0_amd64.deb - ``` +9. SSH back to your VM and execute the following: -9. SSH back to your VM and execute the following: +``` +sudo dpkg -i libcudnn6_6.0.21-1+cuda8.0_amd64.deb - ```console - sudo dpkg -i libcudnn6_6.0.21-1+cuda8.0_amd64.deb +export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH +. ~/.profile - export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH - . ~/.profile +sudo reboot +``` - sudo reboot - ``` +10. After a minute, you should be able to SSH back into your VM. After doing so, run the following: -10. After a minute, you should be able to SSH back into your VM. After doing - so, run the following: +``` +sudo apt install python-pip +sudo apt install python3-pip +``` - ```sh - sudo apt install python-pip - sudo apt install python3-pip - ``` +11. At this point, you need to install TensorFlow. The version you install should be tied to if you are using GPU to train: -11. At this point, you need to install TensorFlow. The version you install - should be tied to if you are using GPU to train: +``` +pip3 install tensorflow-gpu==1.4.0 keras==2.0.6 +``` +Or CPU to train: +``` +pip3 install tensorflow==1.4.0 keras==2.0.6 +``` - ```sh - pip3 install tensorflow-gpu==1.4.0 keras==2.0.6 - ``` +12. You'll then need to install additional dependencies: +``` +pip3 install pillow +pip3 install numpy +pip3 install docopt +``` - Or CPU to train: - - ```sh - pip3 install tensorflow==1.4.0 keras==2.0.6 - ``` - -12. You'll then need to install additional dependencies: - - ```sh - pip3 install pillow - pip3 install numpy - pip3 install docopt - ``` - -13. You can now return to the - [main Azure instruction page](Training-on-Microsoft-Azure.md). +13. You can now return to the [main Azure instruction page](Training-on-Microsoft-Azure.md). \ No newline at end of file diff --git a/docs/Training-on-Microsoft-Azure.md b/docs/Training-on-Microsoft-Azure.md index 6651fc89b2..fdd93ac23a 100644 --- a/docs/Training-on-Microsoft-Azure.md +++ b/docs/Training-on-Microsoft-Azure.md @@ -1,47 +1,30 @@ # Training on Microsoft Azure (works with ML-Agents toolkit v0.3) -This page contains instructions for setting up training on Microsoft Azure -through either -[Azure Container Instances](https://azure.microsoft.com/services/container-instances/) -or Virtual Machines. Non "headless" training has not yet been tested to verify -support. +This page contains instructions for setting up training on Microsoft Azure through either [Azure Container Instances](https://azure.microsoft.com/services/container-instances/) or Virtual Machines. Non "headless" training has not yet been tested to verify support. ## Pre-Configured Azure Virtual Machine +A pre-configured virtual machine image is available in the Azure Marketplace and is nearly compltely ready for training. You can start by deploying the [Data Science Virtual Machine for Linux (Ubuntu)](https://azuremarketplace.microsoft.com/marketplace/apps/microsoft-ads.linux-data-science-vm-ubuntu) into your Azure subscription. Once your VM is deployed, SSH into it and run the following command to complete dependency installation: -A pre-configured virtual machine image is available in the Azure Marketplace and -is nearly compltely ready for training. You can start by deploying the -[Data Science Virtual Machine for Linux (Ubuntu)](https://azuremarketplace.microsoft.com/marketplace/apps/microsoft-ads.linux-data-science-vm-ubuntu) -into your Azure subscription. Once your VM is deployed, SSH into it and run the -following command to complete dependency installation: - -```sh -pip3 install docopt +``` +pip install docopt ``` -Note that, if you choose to deploy the image to an -[N-Series GPU optimized VM](https://docs.microsoft.com/azure/virtual-machines/linux/sizes-gpu), -training will, by default, run on the GPU. If you choose any other type of VM, -training will run on the CPU. +Note that, if you choose to deploy the image to an [N-Series GPU optimized VM](https://docs.microsoft.com/azure/virtual-machines/linux/sizes-gpu), training will, by default, run on the GPU. If you choose any other type of VM, training will run on the CPU. ## Configuring your own Instance -Setting up your own instance requires a number of package installations. Please -view the documentation for doing so -[here](Training-on-Microsoft-Azure-Custom-Instance.md). +Setting up your own instance requires a number of package installations. Please view the documentation for doing so [here](Training-on-Microsoft-Azure-Custom-Instance.md). ## Installing ML-Agents -1. [Move](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/copy-files-to-linux-vm-using-scp) - the `ml-agents` sub-folder of this ml-agents repo to the remote Azure - instance, and set it as the working directory. +2. [Move](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/copy-files-to-linux-vm-using-scp) the `python` sub-folder of this ml-agents repo to the remote Azure instance, and set it as the working directory. 2. Install the required packages with `pip3 install .`. ## Testing To verify that all steps worked correctly: -1. In the Unity Editor, load a project containing an ML-Agents environment (you - can use one of the example environments if you have not created your own). +1. In the Unity Editor, load a project containing an ML-Agents environment (you can use one of the example environments if you have not created your own). 2. Open the Build Settings window (menu: File > Build Settings). 3. Select Linux as the Target Platform, and x86_64 as the target architecture. 4. Check Headless Mode. @@ -50,71 +33,49 @@ To verify that all steps worked correctly: 7. Test the instance setup from Python using: ```python -from mlagents.envs import UnityEnvironment +from unityagents import UnityEnvironment env = UnityEnvironment() ``` - Where `` corresponds to the path to your environment executable. - -You should receive a message confirming that the environment was loaded -successfully. + +You should receive a message confirming that the environment was loaded successfully. ## Running Training on your Virtual Machine To run your training on the VM: -1. [Move](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/copy-files-to-linux-vm-using-scp) - your built Unity application to your Virtual Machine. -2. Set the the directory where the ML-Agents Toolkit was installed to your - working directory. -3. Run the following command: +1. [Move](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/copy-files-to-linux-vm-using-scp) your built Unity application to your Virtual Machine. +2. Set the `python` sub-folder of the ml-agents repo to your working directory. +3. Run the following command: -```sh -mlagents-learn --env= --run-id= --train +``` +python3 learn.py --run-id= --train ``` -Where `` is the path to your app (i.e. -`~/unity-volume/3DBallHeadless`) and `` is an identifer you would like -to identify your training run with. +Where `` is the path to your app (i.e. `~/unity-volume/3DBallHeadless`) and `` is an identifer you would like to identify your training run with. -If you've selected to run on a N-Series VM with GPU support, you can verify that -the GPU is being used by running `nvidia-smi` from the command line. +If you've selected to run on a N-Series VM with GPU support, you can verify that the GPU is being used by running `nvidia-smi` from the command line. ## Monitoring your Training Run with Tensorboard -Once you have started training, you can [use Tensorboard to observe the -training](Using-Tensorboard.md). - -1. Start by [opening the appropriate port for web traffic to connect to your VM](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal). - - * Note that you don't need to generate a new `Network Security Group` but - instead, go to the **Networking** tab under **Settings** for your VM. - * As an example, you could use the following settings to open the Port with - the following Inbound Rule settings: - * Source: Any - * Source Port Ranges: * - * Destination: Any - * Destination Port Ranges: 6006 - * Protocol: Any - * Action: Allow - * Priority: (Leave as default) - -2. Unless you started the training as a background process, connect to your VM - from another terminal instance. -3. Run the following command from your terminal - `tensorboard --logdir=summaries --host 0.0.0.0` -4. You should now be able to open a browser and navigate to - `:6060` to view the TensorBoard report. +Once you have started training, you can [use Tensorboard to observe the training](Using-Tensorboard.md). + +1. Start by [opening the appropriate port for web traffic to connect to your VM](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal). + * Note that you don't need to generate a new `Network Security Group` but instead, go to the **Networking** tab under **Settings** for your VM. + * As an example, you could use the following settings to open the Port with the following Inbound Rule settings: + * Source: Any + * Source Port Ranges: * + * Destination: Any + * Destination Port Ranges: 6006 + * Protocol: Any + * Action: Allow + * Priority: +2. Unless you started the training as a background process, connect to your VM from another terminal instance. +3. Set the `python` folder in ml-agents to your current working directory. +4. Run the following command from your `tensorboard --logdir=summaries --host 0.0.0.0` +5. You should now be able to open a browser and navigate to `:6060` to view the TensorBoard report. ## Running on Azure Container Instances -[Azure Container Instances](https://azure.microsoft.com/services/container-instances/) -allow you to spin up a container, on demand, that will run your training and -then be shut down. This ensures you aren't leaving a billable VM running when -it isn't needed. You can read more about -[The ML-Agents toolkit support for Docker containers here](Using-Docker.md). -Using ACI enables you to offload training of your models without needing to -install Python and TensorFlow on your own computer. You can find instructions, -including a pre-deployed image in DockerHub for you to use, available -[here](https://github.com/druttka/unity-ml-on-azure). +[Azure Container Instances](https://azure.microsoft.com/services/container-instances/) allow you to spin up a container, on demand, that will run your training and then be shut down. This ensures you aren't leaving a billable VM running when it isn't needed. You can read more about [The ML-Agents toolkit support for Docker containers here](Using-Docker.md). Using ACI enables you to offload training of your models without needing to install Python and Tensorflow on your own computer. You can find [instructions, including a pre-deployed image in DockerHub for you to use, available here](https://github.com/druttka/unity-ml-on-azure). \ No newline at end of file diff --git a/docs/Using-Docker.md b/docs/Using-Docker.md index 05f44b1952..1ac6a85c6e 100644 --- a/docs/Using-Docker.md +++ b/docs/Using-Docker.md @@ -1,147 +1,94 @@ # Using Docker For ML-Agents -We currently offer a solution for Windows and Mac users who would like to do -training or inference using Docker. This option may be appealing to those who -would like to avoid installing Python and TensorFlow themselves. The current -setup forces both TensorFlow and Unity to _only_ rely on the CPU for -computations. Consequently, our Docker simulation does not use a GPU and uses -[`Xvfb`](https://en.wikipedia.org/wiki/Xvfb) to do visual rendering. `Xvfb` is a -utility that enables `ML-Agents` (or any other application) to do rendering -virtually i.e. it does not assume that the machine running `ML-Agents` has a GPU -or a display attached to it. This means that rich environments which involve -agents using camera-based visual observations might be slower. +We currently offer a solution for Windows and Mac users who would like to do training or inference using Docker. This option may be appealing to those who would like to avoid installing Python and TensorFlow themselves. The current setup forces both TensorFlow and Unity to _only_ rely on the CPU for computations. Consequently, our Docker simulation does not use a GPU and uses [`Xvfb`](https://en.wikipedia.org/wiki/Xvfb) to do visual rendering. `Xvfb` is a utility that enables `ML-Agents` (or any other application) to do rendering virtually i.e. it does not assume that the machine running `ML-Agents` has a GPU or a display attached to it. This means that rich environments which involve agents using camera-based visual observations might be slower. -## Requirements +## Requirements - Unity _Linux Build Support_ Component - [Docker](https://www.docker.com) ## Setup -- [Download](https://unity3d.com/get-unity/download) the Unity Installer and add - the _Linux Build Support_ Component +- [Download](https://unity3d.com/get-unity/download) the Unity Installer and +add the _Linux Build Support_ Component -- [Download](https://www.docker.com/community-edition#/download) and install - Docker if you don't have it setup on your machine. +- [Download](https://www.docker.com/community-edition#/download) and +install Docker if you don't have it setup on your machine. -- Since Docker runs a container in an environment that is isolated from the host - machine, a mounted directory in your host machine is used to share data, e.g. - the trainer configuration file, Unity executable, curriculum files and - TensorFlow graph. For convenience, we created an empty `unity-volume` - directory at the root of the repository for this purpose, but feel free to use - any other directory. The remainder of this guide assumes that the - `unity-volume` directory is the one used. +- Since Docker runs a container in an environment that is isolated from the host machine, a mounted directory in your host machine is used to share data, e.g. the Unity executable, curriculum files and TensorFlow graph. For convenience, we created an empty `unity-volume` directory at the root of the repository for this purpose, but feel free to use any other directory. The remainder of this guide assumes that the `unity-volume` directory is the one used. ## Usage -Using Docker for ML-Agents involves three steps: building the Unity environment -with specific flags, building a Docker container and, finally, running the -container. If you are not familiar with building a Unity environment for -ML-Agents, please read through our [Getting Started with the 3D Balance Ball -Example](Getting-Started-with-Balance-Ball.md) guide first. +Using Docker for ML-Agents involves three steps: building the Unity environment with specific flags, building a Docker container and, finally, running the container. If you are not familiar with building a Unity environment for ML-Agents, please read through our [Getting Started with the 3D Balance Ball Example](Getting-Started-with-Balance-Ball.md) guide first. ### Build the Environment (Optional) - _If you want to used the Editor to perform training, you can skip this step._ -Since Docker typically runs a container sharing a (linux) kernel with the host -machine, the Unity environment **has** to be built for the **linux platform**. -When building a Unity environment, please select the following options from the -the Build Settings window: - +Since Docker typically runs a container sharing a (linux) kernel with the host machine, the +Unity environment **has** to be built for the **linux platform**. When building a Unity environment, please select the following options from the the Build Settings window: - Set the _Target Platform_ to `Linux` - Set the _Architecture_ to `x86_64` -- If the environment does not contain visual observations, you can select the - `headless` option here. +- If the environment does not contain visual observations, you can select the `headless` option here. -Then click `Build`, pick an environment name (e.g. `3DBall`) and set the output -directory to `unity-volume`. After building, ensure that the file -`.x86_64` and subdirectory `_Data/` are -created under `unity-volume`. +Then click `Build`, pick an environment name (e.g. `3DBall`) and set the output directory to `unity-volume`. After building, ensure that the file `.x86_64` and subdirectory `_Data/` are created under `unity-volume`. ![Build Settings For Docker](images/docker_build_settings.png) ### Build the Docker Container -First, make sure the Docker engine is running on your machine. Then build the -Docker container by calling the following command at the top-level of the -repository: +First, make sure the Docker engine is running on your machine. Then build the Docker container by calling the following command at the top-level of the repository: -```sh -docker build -t . ``` +docker build -t . +``` +Replace `` with a name for the Docker image, e.g. `balance.ball.v0.1`. -Replace `` with a name for the Docker image, e.g. -`balance.ball.v0.1`. +**Note** if you modify hyperparameters in `trainer_config.yaml` you will have to build a new Docker Container before running. ### Run the Docker Container -Run the Docker container by calling the following command at the top-level of -the repository: +Run the Docker container by calling the following command at the top-level of the repository: -```sh +``` docker run --name \ --mount type=bind,source="$(pwd)"/unity-volume,target=/unity-volume \ -p 5005:5005 \ - :latest \ + :latest \ --docker-target-name=unity-volume \ - \ - --env= \ --train \ --run-id= ``` Notes on argument values: - -- `` is used to identify the container (in case you want to - interrupt and terminate it). This is optional and Docker will generate a - random name if this is not set. _Note that this must be unique for every run - of a Docker image._ +- `` is used to identify the container (in case you want to interrupt and terminate it). This is optional and Docker will generate a random name if this is not set. _Note that this must be unique for every run of a Docker image._ - `` references the image name used when building the container. -- `` __(Optional)__: If you are training with a linux - executable, this is the name of the executable. If you are training in the - Editor, do not pass a `` argument and press the - :arrow_forward: button in Unity when the message _"Start training by pressing - the Play button in the Unity Editor"_ is displayed on the screen. -- `source`: Reference to the path in your host OS where you will store the Unity - executable. -- `target`: Tells Docker to mount the `source` path as a disk with this name. -- `docker-target-name`: Tells the ML-Agents Python package what the name of the - disk where it can read the Unity executable and store the graph. **This should - therefore be identical to `target`.** -- `trainer-config-file`, `train`, `run-id`: ML-Agents arguments passed to - `mlagents-learn`. `trainer-config-file` is the filename of the trainer config - file, `train` trains the algorithm, and `run-id` is used to tag each - experiment with a unique identifier. We recommend placing the trainer-config - file inside `unity-volume` so that the container has access to the file. +- `` __(Optional)__: If you are training with a linux executable, this is the name of the executable. If you are training in the Editor, do not pass a `` argument and press the :arrow_forward: button in Unity when the message _"Start training by pressing the Play button in the Unity Editor"_ is displayed on the screen. +- `source`: Reference to the path in your host OS where you will store the Unity executable. +- `target`: Tells Docker to mount the `source` path as a disk with this name. +- `docker-target-name`: Tells the ML-Agents Python package what the name of the disk where it can read the Unity executable and store the graph. **This should therefore be identical to `target`.** +- `train`, `run-id`: ML-Agents arguments passed to `learn.py`. `train` trains the algorithm, `run-id` is used to tag each experiment with a unique identifier. To train with a `3DBall` environment executable, the command would be: -```sh +``` docker run --name 3DBallContainer.first.trial \ --mount type=bind,source="$(pwd)"/unity-volume,target=/unity-volume \ -p 5005:5005 \ balance.ball.v0.1:latest 3DBall \ --docker-target-name=unity-volume \ - trainer_config.yaml \ - --env=3DBall --train \ --run-id=3dball_first_trial ``` -For more detail on Docker mounts, check out -[these](https://docs.docker.com/storage/bind-mounts/) docs from Docker. +For more detail on Docker mounts, check out [these](https://docs.docker.com/storage/bind-mounts/) docs from Docker. + ### Stopping Container and Saving State -If you are satisfied with the training progress, you can stop the Docker -container while saving state by either using `Ctrl+C` or `⌘+C` (Mac) or by using -the following command: +If you are satisfied with the training progress, you can stop the Docker container while saving state by either using `Ctrl+C` or `⌘+C` (Mac) or by using the following command: -```sh +``` docker kill --signal=SIGINT ``` -`` is the name of the container specified in the earlier `docker -run` command. If you didn't specify one, you can find the randomly generated -identifier by running `docker container ls`. +`` is the name of the container specified in the earlier `docker run` command. If you didn't specify one, you can find the randomly generated identifier by running `docker container ls`. diff --git a/docs/Using-TensorFlow-Sharp-in-Unity.md b/docs/Using-TensorFlow-Sharp-in-Unity.md index 2e3f2246cf..6652c2c979 100644 --- a/docs/Using-TensorFlow-Sharp-in-Unity.md +++ b/docs/Using-TensorFlow-Sharp-in-Unity.md @@ -1,81 +1,52 @@ # Using TensorFlowSharp in Unity (Experimental) -The ML-Agents toolkit allows you to use pre-trained -[TensorFlow graphs](https://www.tensorflow.org/programmers_guide/graphs) -inside your Unity -games. This support is possible thanks to the -[TensorFlowSharp project](https://github.com/migueldeicaza/TensorFlowSharp). -The primary purpose for this support is to use the TensorFlow models produced by -the ML-Agents toolkit's own training programs, but a side benefit is that you -can use any TensorFlow model. - -_Notice: This feature is still experimental. While it is possible to embed -trained models into Unity games, Unity Technologies does not officially support -this use-case for production games at this time. As such, no guarantees are -provided regarding the quality of experience. If you encounter issues regarding -battery life, or general performance (especially on mobile), please let us -know._ - -## Supported devices - -* Linux 64 bits -* Mac OS X 64 bits -* Windows 64 bits -* iOS (Requires additional steps) -* Android +The ML-Agents toolkit allows you to use pre-trained [TensorFlow graphs](https://www.tensorflow.org/programmers_guide/graphs) inside your Unity games. This support is possible thanks to [the TensorFlowSharp project](https://github.com/migueldeicaza/TensorFlowSharp). The primary purpose for this support is to use the TensorFlow models produced by the ML-Agents toolkit's own training programs, but a side benefit is that you can use any TensorFlow model. + +_Notice: This feature is still experimental. While it is possible to embed trained models into Unity games, Unity Technologies does not officially support this use-case for production games at this time. As such, no guarantees are provided regarding the quality of experience. If you encounter issues regarding battery life, or general performance (especially on mobile), please let us know._ + +## Supported devices : + + * Linux 64 bits + * Mac OS X 64 bits + * Windows 64 bits + * iOS (Requires additional steps) + * Android ## Requirements -* Unity 2017.4 or above -* Unity TensorFlow Plugin ([Download here](https://s3.amazonaws.com/unity-ml-agents/0.5/TFSharpPlugin.unitypackage)) +* Unity 2017.1 or above +* Unity TensorFlow Plugin ([Download here](https://s3.amazonaws.com/unity-ml-agents/0.4/TFSharpPlugin.unitypackage)) -## Using TensorFlowSharp with ML-Agents +# Using TensorFlowSharp with ML-Agents -Go to `Edit` -> `Player Settings` and add `ENABLE_TENSORFLOW` to the `Scripting -Define Symbols` for each type of device you want to use (**`PC, Mac and Linux -Standalone`**, **`iOS`** or **`Android`**). +Go to `Edit` -> `Player Settings` and add `ENABLE_TENSORFLOW` to the `Scripting Define Symbols` for each type of device you want to use (**`PC, Mac and Linux Standalone`**, **`iOS`** or **`Android`**). -Set the Brain you used for training to `Internal`. Drag `your_name_graph.bytes` -into Unity and then drag it into The `Graph Model` field in the Brain. +Set the Brain you used for training to `Internal`. Drag `your_name_graph.bytes` into Unity and then drag it into The `Graph Model` field in the Brain. ## Using your own trained graphs -The TensorFlow data graphs produced by the ML-Agents training programs work -without any additional settings. +The TensorFlow data graphs produced by the ML-Agents training programs work without any additional settings. -In order to use a TensorFlow data graph in Unity, make sure the nodes of your -graph have appropriate names. You can assign names to nodes in TensorFlow : +In order to use a TensorFlow data graph in Unity, make sure the nodes of your graph have appropriate names. You can assign names to nodes in TensorFlow : ```python variable= tf.identity(variable, name="variable_name") ``` We recommend using the following naming conventions: + * Name the batch size input placeholder `batch_size` + * Name the input vector observation placeholder `state` + * Name the output node `action` + * Name the recurrent vector (memory) input placeholder `recurrent_in` (if any) + * Name the recurrent vector (memory) output node `recurrent_out` (if any) + * Name the observations placeholders input placeholders `visual_observation_i` where `i` is the index of the observation (starting at 0) -* Name the batch size input placeholder `batch_size` -* Name the input vector observation placeholder `state` -* Name the output node `action` -* Name the recurrent vector (memory) input placeholder `recurrent_in` (if any) -* Name the recurrent vector (memory) output node `recurrent_out` (if any) -* Name the observations placeholders input placeholders `visual_observation_i` - where `i` is the index of the observation (starting at 0) - -You can have additional placeholders for float or integers but they must be -placed in placeholders of dimension 1 and size 1. (Be sure to name them.) - -It is important that the inputs and outputs of the graph are exactly the ones -you receive and return when training your model with an `External` Brain. This -means you cannot have any operations such as reshaping outside of the graph. The -object you get by calling `step` or `reset` has fields `vector_observations`, -`visual_observations` and `memories` which must correspond to the placeholders -of your graph. Similarly, the arguments `action` and `memory` you pass to `step` -must correspond to the output nodes of your graph. - -While training your Agent using the Python API, you can save your graph at any -point of the training. Note that the argument `output_node_names` must be the -name of the tensor your graph outputs (separated by a coma if using multiple -outputs). In this case, it will be either `action` or `action,recurrent_out` if -you have recurrent outputs. +You can have additional placeholders for float or integers but they must be placed in placeholders of dimension 1 and size 1. (Be sure to name them.) + +It is important that the inputs and outputs of the graph are exactly the ones you receive and return when training your model with an `External` brain. This means you cannot have any operations such as reshaping outside of the graph. +The object you get by calling `step` or `reset` has fields `vector_observations`, `visual_observations` and `memories` which must correspond to the placeholders of your graph. Similarly, the arguments `action` and `memory` you pass to `step` must correspond to the output nodes of your graph. + +While training your Agent using the Python API, you can save your graph at any point of the training. Note that the argument `output_node_names` must be the name of the tensor your graph outputs (separated by a coma if using multiple outputs). In this case, it will be either `action` or `action,recurrent_out` if you have recurrent outputs. ```python from tensorflow.python.tools import freeze_graph @@ -89,49 +60,32 @@ freeze_graph.freeze_graph(input_graph = model_path +'/raw_graph_def.pb', restore_op_name = "save/restore_all", filename_tensor_name = "save/Const:0") ``` -Your model will be saved with the name `your_name_graph.bytes` and will contain -both the graph and associated weights. Note that you must save your graph as a -.bytes file so Unity can load it. +Your model will be saved with the name `your_name_graph.bytes` and will contain both the graph and associated weights. Note that you must save your graph as a .bytes file so Unity can load it. -In the Unity Editor, you must specify the names of the nodes used by your graph -in the **Internal** Brain Inspector window. If you used a scope when defining -your graph, specify it in the `Graph Scope` field. +In the Unity Editor, you must specify the names of the nodes used by your graph in the **Internal** brain Inspector window. If you used a scope when defining your graph, specify it in the `Graph Scope` field. ![Internal Brain Inspector](images/internal_brain.png) -See -[Internal Brain](Learning-Environment-Design-External-Internal-Brains.md#internal-brain) -for more information about using Internal Brains. +See [Internal Brain](Learning-Environment-Design-External-Internal-Brains.md#internal-brain) for more information about using Internal Brains. -If you followed these instructions well, the Agents in your environment that use -this Brain will use your fully trained network to make decisions. +If you followed these instructions well, the agents in your environment that use this brain will use your fully trained network to make decisions. -## iOS additional instructions for building +# iOS additional instructions for building -* Before build your game against iOS platform, make sure you've set the - flag `ENABLE_TENSORFLOW` for it. -* Once you build the project for iOS in the editor, open the .xcodeproj file - within the project folder using Xcode. -* Set up your ios account following the - [iOS Account setup page](https://docs.unity3d.com/Manual/iphone-accountsetup.html). +* Once you build the project for iOS in the editor, open the .xcodeproj file within the project folder using Xcode. +* Set up your ios account following the [iOS Account setup page](https://docs.unity3d.com/Manual/iphone-accountsetup.html). * In **Build Settings** > **Linking** > **Other Linker Flags**: * Double click on the flag list to expand the list * Add `-force_load` - * Drag the library `libtensorflow-core.a` from the **Project Navigator** on - the left under `Libraries/ML-Agents/Plugins/iOS` into the flag list, after - `-force_load`. + * Drag the library `libtensorflow-core.a` from the **Project Navigator** on the left under `Libraries/ML-Agents/Plugins/iOS` into the flag list, after `-force_load`. -## Using TensorFlowSharp without ML-Agents +# Using TensorFlowSharp without ML-Agents -Beyond controlling an in-game agent, you can also use TensorFlowSharp for more -general computation. The following instructions describe how to generally embed -TensorFlow models without using the ML-Agents framework. +Beyond controlling an in-game agent, you can also use TensorFlowSharp for more general computation. The following instructions describe how to generally embed TensorFlow models without using the ML-Agents framework. -You must have a TensorFlow graph, such as `your_name_graph.bytes`, made using -TensorFlow's `freeze_graph.py`. The process to create such graph is explained in -the [Using your own trained graphs](#using-your-own-trained-graphs) section. +You must have a TensorFlow graph, such as `your_name_graph.bytes`, made using TensorFlow's `freeze_graph.py`. The process to create such graph is explained in the [Using your own trained graphs](#using-your-own-trained-graphs) section. -### Inside of Unity +## Inside of Unity To load and use a TensorFlow data graph in Unity: @@ -139,49 +93,46 @@ To load and use a TensorFlow data graph in Unity: 2. At the top off your C# script, add the line: - ```csharp - using TensorFlow; - ``` +```csharp +using TensorFlow; +``` -3. If you will be building for android, you must add this block at the start of - your code : +3. If you will be building for android, you must add this block at the start of your code : - ```csharp - #if UNITY_ANDROID && !UNITY_EDITOR - TensorFlowSharp.Android.NativeBinding.Init(); - #endif - ``` +```csharp +#if UNITY_ANDROID +TensorFlowSharp.Android.NativeBinding.Init(); +#endif +``` 4. Load your graph as a text asset into a variable, such as `graphModel`: - ```csharp - TextAsset graphModel = Resources.Load (your_name_graph) as TextAsset; - ``` +```csharp +TextAsset graphModel = Resources.Load (your_name_graph) as TextAsset; +``` 5. You then must instantiate the graph in Unity by adding the code : - ```csharp graph = new TFGraph (); - graph.Import (graphModel.bytes); - session = new TFSession (graph); - ``` +```csharp +graph = new TFGraph (); +graph.Import (graphModel.bytes); +session = new TFSession (graph); +``` -6. Assign the input tensors for the graph. For example, the following code - assigns a one dimensional input tensor of size 2: +6. Assign the input tensors for the graph. For example, the following code assigns a one dimensional input tensor of size 2: - ```csharp - var runner = session.GetRunner (); - runner.AddInput (graph ["input_placeholder_name"] [0], new float[]{ placeholder_value1, placeholder_value2 }); - ``` +```csharp +var runner = session.GetRunner (); +runner.AddInput (graph ["input_placeholder_name"] [0], new float[]{ placeholder_value1, placeholder_value2 }); +``` - You must provide all required inputs to the graph. Supply one input per - TensorFlow placeholder. +You must provide all required inputs to the graph. Supply one input per TensorFlow placeholder. 7. To calculate and access the output of your graph, run the following code. - ```csharp - runner.Fetch (graph["output_placeholder_name"][0]); - float[,] recurrent_tensor = runner.Run () [0].GetValue () as float[,]; - ``` +```csharp +runner.Fetch (graph["output_placeholder_name"][0]); +float[,] recurrent_tensor = runner.Run () [0].GetValue () as float[,]; +``` -Note that this example assumes the output array is a two-dimensional tensor of -floats. Cast to a long array if your outputs are integers. +Note that this example assumes the output array is a two-dimensional tensor of floats. Cast to a long array if your outputs are integers. diff --git a/docs/Using-Tensorboard.md b/docs/Using-Tensorboard.md index a97313705c..013efc97ee 100644 --- a/docs/Using-Tensorboard.md +++ b/docs/Using-Tensorboard.md @@ -1,80 +1,61 @@ # Using TensorBoard to Observe Training -The ML-Agents toolkit saves statistics during learning session that you can view -with a TensorFlow utility named, -[TensorBoard](https://www.tensorflow.org/programmers_guide/summaries_and_tensorboard). +The ML-Agents toolkit saves statistics during learning session that you can view with a TensorFlow utility named, [TensorBoard](https://www.tensorflow.org/programmers_guide/summaries_and_tensorboard). -The `mlagents-learn` command saves training statistics to a folder named -`summaries`, organized by the `run-id` value you assign to a training session. +The `learn.py` program saves training statistics to a folder named `summaries`, organized by the `run-id` value you assign to a training session. -In order to observe the training process, either during training or afterward, +In order to observe the training process, either during training or afterward, start TensorBoard: 1. Open a terminal or console window: -2. Navigate to the directory where the ML-Agents Toolkit is installed. +2. Navigate to the ml-agents/python folder. 3. From the command line run : - ```sh - tensorboard --logdir=summaries - ``` + tensorboard --logdir=summaries 4. Open a browser window and navigate to [localhost:6006](http://localhost:6006). -**Note:** If you don't assign a `run-id` identifier, `mlagents-learn` uses the -default string, "ppo". All the statistics will be saved to the same sub-folder -and displayed as one session in TensorBoard. After a few runs, the displays can -become difficult to interpret in this situation. You can delete the folders -under the `summaries` directory to clear out old statistics. +**Note:** If you don't assign a `run-id` identifier, `learn.py` uses the default string, "ppo". All the statistics will be saved to the same sub-folder and displayed as one session in TensorBoard. After a few runs, the displays can become difficult to interpret in this situation. You can delete the folders under the `summaries` directory to clear out old statistics. -On the left side of the TensorBoard window, you can select which of the training -runs you want to display. You can select multiple run-ids to compare statistics. -The TensorBoard window also provides options for how to display and smooth -graphs. - -When you run the training program, `mlagents-learn`, you can use the -`--save-freq` option to specify how frequently to save the statistics. +On the left side of the TensorBoard window, you can select which of the training runs you want to display. You can select multiple run-ids to compare statistics. The TensorBoard window also provides options for how to display and smooth graphs. + +When you run the training program, `learn.py`, you can use the `--save-freq` option to specify how frequently to save the statistics. ## The ML-Agents toolkit training statistics -The ML-Agents training program saves the following statistics: +The ML-agents training program saves the following statistics: ![Example TensorBoard Run](images/mlagents-TensorBoard.png) -* Lesson - Plots the progress from lesson to lesson. Only interesting when - performing [curriculum training](Training-Curriculum-Learning.md). +* Lesson - Plots the progress from lesson to lesson. Only interesting when performing +[curriculum training](Training-Curriculum-Learning.md). -* Cumulative Reward - The mean cumulative episode reward over all agents. Should - increase during a successful training session. +* Cumulative Reward - The mean cumulative episode reward over all agents. +Should increase during a successful training session. -* Entropy - How random the decisions of the model are. Should slowly decrease - during a successful training process. If it decreases too quickly, the `beta` - hyperparameter should be increased. +* Entropy - How random the decisions of the model are. Should slowly decrease +during a successful training process. If it decreases too quickly, the `beta` +hyperparameter should be increased. -* Episode Length - The mean length of each episode in the environment for all - agents. +* Episode Length - The mean length of each episode in the environment for all +agents. -* Learning Rate - How large a step the training algorithm takes as it searches - for the optimal policy. Should decrease over time. +* Learning Rate - How large a step the training algorithm takes as it searches +for the optimal policy. Should decrease over time. * Policy Loss - The mean magnitude of policy loss function. Correlates to how - much the policy (process for deciding actions) is changing. The magnitude of - this should decrease during a successful training session. +much the policy (process for deciding actions) is changing. The magnitude of +this should decrease during a successful training session. -* Value Estimate - The mean value estimate for all states visited by the agent. - Should increase during a successful training session. +* Value Estimate - The mean value estimate for all states visited by the agent. +Should increase during a successful training session. * Value Loss - The mean loss of the value function update. Correlates to how - well the model is able to predict the value of each state. This should - increase while the agent is learning, and then decrease once the reward - stabilizes. +well the model is able to predict the value of each state. This should increase +while the agent is learning, and then decrease once the reward stabilizes. -* _(Curiosity-Specific)_ Intrinsic Reward - This corresponds to the mean - cumulative intrinsic reward generated per-episode. +* _(Curiosity-Specific)_ Intrinsic Reward - This corresponds to the mean cumulative intrinsic reward generated per-episode. -* _(Curiosity-Specific)_ Forward Loss - The mean magnitude of the inverse model - loss function. Corresponds to how well the model is able to predict the new - observation encoding. +* _(Curiosity-Specific)_ Forward Loss - The mean magnitude of the inverse model loss function. Corresponds to how well the model is able to predict the new observation encoding. -* _(Curiosity-Specific)_ Inverse Loss - The mean magnitude of the forward model - loss function. Corresponds to how well the model is able to predict the action - taken between two observations. +* _(Curiosity-Specific)_ Inverse Loss - The mean magnitude of the forward model loss function. Corresponds to how well the model is able to predict the action taken between two observations. \ No newline at end of file diff --git a/docs/dox-ml-agents.conf b/docs/dox-ml-agents.conf index f5feb66f94..9b8d8be418 100644 --- a/docs/dox-ml-agents.conf +++ b/docs/dox-ml-agents.conf @@ -783,10 +783,10 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../UnitySDK/Assets/ML-Agents/Scripts/Academy.cs \ - ../UnitySDK/Assets/ML-Agents/Scripts/Agent.cs \ - ../UnitySDK/Assets/ML-Agents/Scripts/Monitor.cs \ - ../UnitySDK/Assets/ML-Agents/Scripts/Decision.cs +INPUT = ../unity-environment/Assets/ML-Agents/Scripts/Academy.cs \ + ../unity-environment/Assets/ML-Agents/Scripts/Agent.cs \ + ../unity-environment/Assets/ML-Agents/Scripts/Monitor.cs \ + ../unity-environment/Assets/ML-Agents/Scripts/Decision.cs # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/docs/images/3dballhard.png b/docs/images/3dballhard.png deleted file mode 100644 index a452167157..0000000000 Binary files a/docs/images/3dballhard.png and /dev/null differ diff --git a/docs/images/bananaimitation.png b/docs/images/bananaimitation.png deleted file mode 100644 index 7fcf2fed87..0000000000 Binary files a/docs/images/bananaimitation.png and /dev/null differ diff --git a/docs/images/banner.png b/docs/images/banner.png old mode 100644 new mode 100755 diff --git a/docs/images/image-banner.png b/docs/images/image-banner.png deleted file mode 100644 index 1c705bb00e..0000000000 Binary files a/docs/images/image-banner.png and /dev/null differ diff --git a/docs/images/player_brain.png b/docs/images/player_brain.png old mode 100644 new mode 100755 diff --git a/docs/images/scene-hierarchy.png b/docs/images/scene-hierarchy.png old mode 100644 new mode 100755 diff --git a/docs/images/training-command-example.png b/docs/images/training-command-example.png new file mode 100644 index 0000000000..8634226c7f Binary files /dev/null and b/docs/images/training-command-example.png differ diff --git a/docs/images/training-running.png b/docs/images/training-running.png new file mode 100644 index 0000000000..a6325186d7 Binary files /dev/null and b/docs/images/training-running.png differ diff --git a/docs/images/unity-logo-rgb.png b/docs/images/unity-logo-rgb.png old mode 100644 new mode 100755 diff --git a/docs/localized/zh-CN/README.md b/docs/localized/zh-CN/README.md index 0d38124091..fc57ff2fd5 100755 --- a/docs/localized/zh-CN/README.md +++ b/docs/localized/zh-CN/README.md @@ -56,7 +56,8 @@ ML-Agents 是一个开源项目,我们鼓励并欢迎大家贡献自己的力 [贡献准则](/CONTRIBUTING.md)和 [行为准则](/CODE_OF_CONDUCT.md)。 -您可以通过 Unity Connect 和 GitHub 与我们以及更广泛的社区进行交流: +您可以通过 Unity Connect 和 GitHub 与我们 +以及更广泛的社区进行交流: * 加入我们的 [Unity 机器学习频道](https://connect.unity.com/messages/c/035fba4f88400000) 与使用 ML-Agents 的其他人以及对机器学习充满热情的 Unity 开发者 @@ -67,7 +68,7 @@ ML-Agents 是一个开源项目,我们鼓励并欢迎大家贡献自己的力 确保提供尽可能多的详细信息。 对于任何其他问题或反馈,请直接与 ML-Agents 团队联系, -电子邮件地址为 ml-agents@unity3d.com。 +地址为 ml-agents@unity3d.com。 ## 许可证 diff --git a/docs/localized/zh-CN/docs/Getting-Started-with-Balance-Ball.md b/docs/localized/zh-CN/docs/Getting-Started-with-Balance-Ball.md index 48776e37a5..29a402b803 100755 --- a/docs/localized/zh-CN/docs/Getting-Started-with-Balance-Ball.md +++ b/docs/localized/zh-CN/docs/Getting-Started-with-Balance-Ball.md @@ -42,7 +42,7 @@ Inspector 窗口。Inspector 会显示游戏对象上的每个组件。 在打开 3D Balance Ball 场景后,您可能会首先注意到它包含的 不是一个平台,而是多个平台。场景中的每个平台都是 -独立的 agent,但它们全部共享同一个 Brain。3D Balance Ball 通过 +独立的 agent,但它们全部共享同一个 brain。3D Balance Ball 通过 这种方式可以加快训练速度,因为所有 12 个 agent 可以并行参与训练任务。 ### Academy @@ -86,16 +86,16 @@ Academy 的子级。)3D Balance Ball 环境中的所有 agent 使用 Brain 不存储关于 agent 的任何信息, 只是将 agent 收集的观测结果发送到决策过程, 然后将所选的动作返回给 agent。因此,所有 agent 可共享 -同一个 Brain,但会独立行动。Brain 设置可以提供很多 +同一个 brain,但会独立行动。Brain 设置可以提供很多 关于 agent 工作方式的信息。 **Brain Type** 决定了 agent 如何决策。 **External** 和 **Internal** 类型需要协同使用:训练 agent 时使用 **External**, 而在采用经过训练的模型时使用 **Internal**。 -**Heuristic** Brain 允许您通过扩展 Decision 类来对 agent 的逻辑进行 -手动编码。最后,**Player** Brain 可让您将键盘命令 +**Heuristic** brain 允许您通过扩展 Decision 类来对 agent 的逻辑进行 +手动编码。最后,**Player** brain 可让您将键盘命令 映射到动作,这样在测试 agent 和环境时 -会非常有用。如果这些类型的 Brain 都不能满足您的需求,您可以 +会非常有用。如果这些类型的 brain 都不能满足您的需求,您可以 实现自己的 CoreBrain 来创建自有的类型。 在本教程中,进行训练时,需要将 **Brain Type** 设置为 **External**; @@ -120,12 +120,12 @@ Brain 不存储关于 agent 的任何信息, **向量运动空间** -Brain 以*动作*的形式向 agent 提供指令。与状态 +brain 以*动作*的形式向 agent 提供指令。与状态 一样,ML-Agents 将动作分为两种类型:**Continuous** 向量运动空间是一个可以连续变化的数字向量。向量 每个元素的含义都是由 agent 逻辑定义的(PPO 训练过程是一个了解agent的哪种状态更好的过程,这个过程是通过学习不同agent的不同状态会对应多少奖励来实现的)。 例如,一个元素可能表示施加到 agent 某个 -`Rigidbody` 上的力或扭矩。**Discrete** 向量运动空间将其动作 +`RigidBody` 上的力或扭矩。**Discrete** 向量运动空间将其动作 定义为一个表。提供给 agent 的具体动作是这个表的 索引。 @@ -142,9 +142,9 @@ Agent 是在环境中进行观测并采取动作的参与者。 平台游戏对象上。基础 Agent 对象有一些影响其行为的 属性: -* **Brain** — 每个 Agent 必须有一个 Brain。Brain 决定了 agent 如何 +* **Brain** — 每个 Agent 必须有一个 Brain。brain 决定了 agent 如何 决策。3D Balance Ball 场景中的所有 agent 共享同一个 -Brain。 +brain。 * **Visual Observations** — 定义 agent 用来观测其环境的 任何 Camera 对象。3D Balance Ball 不使用摄像机观测。 * **Max Step** — 定义在 agent 决定自己完成之前可以发生多少个 @@ -167,7 +167,7 @@ Ball3DAgent 子类定义了以下方法: agent 的 Brain 实例设置为状态大小为 8 的连续向量观测空间, 因此 `CollectObservations()` 必须调用 8 次 `AddVectorObs`。 -* Agent.AgentAction() — 在每个模拟步骤调用。接收 Brain 选择的 +* Agent.AgentAction() — 在每个模拟步骤调用。接收 brain 选择的 动作。Ball3DAgent 示例可以处理连续和离散 运动空间类型。在此环境中,两种状态类型之间实际上 没有太大的差别:这两种向量运动空间在每一步都会 @@ -195,7 +195,7 @@ Unity 场景: ![3DBall 场景](images/mlagents-Open3DBall.png) 由于我们要建立此环境来进行训练,因此我们需要 -将 agent 使用的 Brain 设置为 **External**。这样 agent 在 +将 agent 使用的 brain 设置为 **External**。这样 agent 在 进行决策时能够与外部训练过程进行通信。 1. 在 **Scene** 窗口中,单击 Ball3DAcademy 对象旁边的三角形 @@ -310,7 +310,7 @@ python3 python/learn.py --run-id= --train 一旦训练过程完成,并且训练过程保存了模型 (通过 `Saved Model` 消息可看出),您便可以将该模型添加到 Unity 项目中, -然后将其用于 Brain 类型为 **Internal** 的 agent。 +然后将其用于 brain 类型为 **Internal** 的 agent。 ### 设置 TensorFlowSharp 支持 @@ -320,7 +320,7 @@ python3 python/learn.py --run-id= --train 1. 确保 TensorFlowSharp 插件位于 `Assets` 文件夹中。 可在 -[此处](https://s3.amazonaws.com/unity-ml-agents/0.5/TFSharpPlugin.unitypackage)下载一个包含 TF# 的 Plugins 文件夹。 +[此处](https://s3.amazonaws.com/unity-ml-agents/0.3/TFSharpPlugin.unitypackage)下载一个包含 TF# 的 Plugins 文件夹。 下载后,双击并将其导入。您可以在 Project 选项卡中 (位于 `Assets` > `ML-Agents` > `Plugins` > `Computer` 下) 检查 TensorFlow 的相关文件来查看是否安装成功 diff --git a/docs/localized/zh-CN/docs/Installation.md b/docs/localized/zh-CN/docs/Installation.md index 4f17f483af..c6810264ff 100755 --- a/docs/localized/zh-CN/docs/Installation.md +++ b/docs/localized/zh-CN/docs/Installation.md @@ -40,7 +40,7 @@ Unity Assets。`python` 目录包含训练代码。 ### Mac 和 Unix 用户 -如果您的 Python 环境不包括 `pip3`,请参阅这些 +如果您的 Python 环境不包括 `pip`,请参阅这些 [说明](https://packaging.python.org/guides/installing-using-linux-tools/#installing-pip-setuptools-wheel-with-linux-package-managers) 以了解其安装方法。 @@ -56,7 +56,7 @@ Unity Assets。`python` 目录包含训练代码。 ## Unity 包 -您可以通过 Unity 包的形式下载TensorFlowSharp 插件 ([AWS S3链接](https://s3.amazonaws.com/unity-ml-agents/0.5/TFSharpPlugin.unitypackage),[百度盘链接](https://pan.baidu.com/s/1s0mJN8lvuxTcYbs2kL2FqA)) +您可以通过 Unity 包的形式下载TensorFlowSharp 插件([AWS S3链接](https://s3.amazonaws.com/unity-ml-agents/0.3/TFSharpPlugin.unitypackage),[百度盘链接](https://pan.baidu.com/s/1s0mJN8lvuxTcYbs2kL2FqA)) ## 帮助 diff --git a/docs/localized/zh-CN/docs/Learning-Environment-Create-New.md b/docs/localized/zh-CN/docs/Learning-Environment-Create-New.md index efee4fa1ea..541bc5485d 100755 --- a/docs/localized/zh-CN/docs/Learning-Environment-Create-New.md +++ b/docs/localized/zh-CN/docs/Learning-Environment-Create-New.md @@ -256,7 +256,7 @@ Agent 代码的最后一部分是 Agent.AgentAction() 函数,此函数接收 B **动作** -Brain 的决策以动作数组的形式传递给 `AgentAction()` 函数。此数组中的元素数量由 agent 的 Brain 的 `Vector Action Space Type` 和 `Vector Action Space Size` 设置确定。RollerAgent 使用连续向量运动空间,并需要 Brain 提供的两个连续控制信号。因此,我们要将 Brain `Vector Action Size` 设置为 2。第一个元素 `action[0]` 确定沿 x 轴施加的力;`action[1]` 确定沿 z 轴施加的力。(如果我们允许 agent 以三维方式移动,那么我们需要将 `Vector Action Size` 设置为 3。)注意,Brain 并不知道动作数组中的值是什么意思。训练过程只是根据观测输入来调整动作值,然后看看会得到什么样的奖励。 +Brain 的决策以动作数组的形式传递给 `AgentAction()` 函数。此数组中的元素数量由 agent 的 Brain 的 `Vector Action Space Type` 和 `Vector Action Space Size` 设置确定。RollerAgent 使用连续向量运动空间,并需要 brain 提供的两个连续控制信号。因此,我们要将 Brain `Vector Action Size` 设置为 2。第一个元素 `action[0]` 确定沿 x 轴施加的力;`action[1]` 确定沿 z 轴施加的力。(如果我们允许 agent 以三维方式移动,那么我们需要将 `Vector Action Size` 设置为 3。)注意,Brain 并不知道动作数组中的值是什么意思。训练过程只是根据观测输入来调整动作值,然后看看会得到什么样的奖励。 RollerAgent 使用 `Rigidbody.AddForce` 函数将 action[] 数组中的值应用到其 Rigidbody 组件 `rBody`: @@ -392,7 +392,7 @@ public override void AgentAction(float[] vectorAction, string textAction) 1. 选择 Brain 游戏对象以便在 Inspector 中查看该对象的属性。 2. 将 **Brain Type** 设置为 **Player**。 -3. 展开 **Continuous Player Actions**(仅在使用 **Player* Brain 时可见)。 +3. 展开 **Continuous Player Actions**(仅在使用 **Player* brain 时可见)。 4. 将 **Size** 设置为 4。 5. 设置以下映射: diff --git a/docs/localized/zh-CN/docs/Learning-Environment-Design.md b/docs/localized/zh-CN/docs/Learning-Environment-Design.md index 3e6be8f3b7..7dcdafbb48 100755 --- a/docs/localized/zh-CN/docs/Learning-Environment-Design.md +++ b/docs/localized/zh-CN/docs/Learning-Environment-Design.md @@ -10,7 +10,7 @@ ML-Agents 使用一种称为 [Proximal Policy Optimization (PPO)](https://blog.o 训练和模拟过程以 ML-Agents Academy 类编排的步骤进行。Academy 与场景中的 Agent 和 Brain 对象一起协作逐步完成模拟。当 Academy 已达到其最大步数或场景中的所有 agent 均_完成_时,一个训练场景即完成。 -在训练期间,处于外部的 Python 进程会在训练过程中与 Academy 不断进行通信以便运行一系列场景,同时会收集数据并优化其神经网络模型。分配给 agent 的 Brain 类型决定了我们是否进行训练。**External** Brain 会与外部过程进行通信以训练 TensorFlow 模型。成功完成训练后,您可以将经过训练的模型文件添加到您的 Unity 项目中,以便提供给 **Internal** Brain 来控制agent的行为。 +在训练期间,处于外部的 Python 进程会在训练过程中与 Academy 不断进行通信以便运行一系列场景,同时会收集数据并优化其神经网络模型。分配给 agent 的 Brain 类型决定了我们是否进行训练。**External** brain 会与外部过程进行通信以训练 TensorFlow 模型。成功完成训练后,您可以将经过训练的模型文件添加到您的 Unity 项目中,以便提供给 **Internal** brain 来控制agent的行为。 ML-Agents Academy 类按如下方式编排 agent 模拟循环: @@ -19,7 +19,7 @@ ML-Agents Academy 类按如下方式编排 agent 模拟循环: 3. 对场景中的每个 agent 调用 `CollectObservations()` 函数。 4. 使用每个 agent 的 Brain 类来决定 agent 的下一动作。 5. 调用您的子类的 `AcademyAct()` 函数。 -6. 对场景中的每个 agent 调用 `AgentAction()` 函数,传入由 agent 的 Brain 选择的动作。(如果 agent 已完成,则不调用此函数。) +6. 对场景中的每个 agent 调用 `AgentAction()` 函数,传入由 agent 的 brain 选择的动作。(如果 agent 已完成,则不调用此函数。) 7. 如果 agent 已达到其 `Max Step` 计数或者已将其自身标记为 `done`,则调用 agent 的 `AgentOnDone()` 函数。或者,如果某个 agent 在场景结束之前已完成,您可以将其设置为重新开始。在这种情况下,Academy 会调用 `AgentReset()` 函数。 8. 当 Academy 达到其自身的 `Max Step` 计数时,它会通过调用您的 Academy 子类的 `AcademyReset()` 函数来再次开始下一场景。 @@ -33,7 +33,7 @@ ML-Agents Academy 类按如下方式编排 agent 模拟循环: [Screenshot of scene hierarchy] -您必须为每个 agent 分配一个 Brain,但可以在多个 agent 之间共享 Brain。每个 agent 都将进行自己的观测并独立行动,但会使用相同的决策逻辑,而对于 **Internal** Brain,则会使用相同的经过训练的 TensorFlow 模型。 +您必须为每个 agent 分配一个 brain,但可以在多个 agent 之间共享 brain。每个 agent 都将进行自己的观测并独立行动,但会使用相同的决策逻辑,而对于 **Internal** brain,则会使用相同的经过训练的 TensorFlow 模型。 ### Academy @@ -53,9 +53,9 @@ Academy 基类还定义了若干可以在 Unity Editor Inspector 中设置的重 Brain 内部封装了决策过程。Brain 对象必须放在 Hierarchy 视图中的 Academy 的子级。我们必须为每个 Agent 分配一个 Brain,但可以在多个 Agent 之间共享同一个 Brain。 -当我们使用 Brain 类的时候不需要使用其子类,而应该直接使用 Brain 这个类。Brain 的行为取决于 Brain 的类型。在训练期间,应将 agent 上连接的 Brain 的 Brain Type 设置为 **External**。要使用经过训练的模型,请将模型文件导入 Unity 项目,并将对应 Brain 的 Brain Type 更改为 **Internal**。请参阅 [Brain](/docs/Learning-Environment-Design-Brains.md) 以了解有关使用不同类型的 Brain 的详细信息。如果四种内置的类型不能满足您的需求,您可以扩展 CoreBrain 类以创建其它的 Brain 类型。 +当我们使用 Brain 类的时候不需要使用其子类,而应该直接使用 Brain 这个类。Brain 的行为取决于 brain 的类型。在训练期间,应将 agent 上连接的 Brain 的 Brain Type 设置为 **External**。要使用经过训练的模型,请将模型文件导入 Unity 项目,并将对应 Brain 的 Brain Type 更改为 **Internal**。请参阅 [Brain](/docs/Learning-Environment-Design-Brains.md) 以了解有关使用不同类型的 Brain 的详细信息。如果四种内置的类型不能满足您的需求,您可以扩展 CoreBrain 类以创建其它的 Brain 类型。 -Brain 类有若干可以使用 Inspector 窗口进行设置的重要属性。对于使用 Brain 的 agent,这些属性必须恰当。例如,`Vector Observation Space Size` 属性必须与 agent 创建的特征向量的长度完全匹配。请参阅 [Agent](/docs/Learning-Environment-Design-Agents.md) 以获取有关创建 agent 和正确设置 Brain 实例的信息。 +Brain 类有若干可以使用 Inspector 窗口进行设置的重要属性。对于使用 brain 的 agent,这些属性必须恰当。例如,`Vector Observation Space Size` 属性必须与 agent 创建的特征向量的长度完全匹配。请参阅 [Agent](/docs/Learning-Environment-Design-Agents.md) 以获取有关创建 agent 和正确设置 Brain 实例的信息。 请参阅 [Brain](/docs/Learning-Environment-Design-Brains.md) 以查看 Brain 属性的完整列表。 @@ -66,7 +66,7 @@ Agent 类代表场景中负责收集观测结果并采取动作的一个参与 要创建 agent,请扩展 Agent 类并实现基本的 `CollectObservations()` 和 `AgentAction()` 方法: * `CollectObservations()` — 收集 agent 对其环境的观测结果。 -* `AgentAction()` — 执行由 agent 的 Brain 选择的动作,并为当前状态分配奖励。 +* `AgentAction()` — 执行由 agent 的 brain 选择的动作,并为当前状态分配奖励。 这些函数的实现决定了分配给此 agent 的 Brain 的属性要如何设置。 @@ -83,7 +83,7 @@ ML-Agents 中的_环境_可以是 Unity 中构建的任何场景。Unity 场景 在 Unity 中创建训练环境时,必须设置场景以便可以通过外部训练过程来控制场景。注意以下几点: * 在训练程序启动后,Unity 可执行文件会被自动打开,然后训练场景会自动开始训练。 -* 场景中至少须包括一个 **External** Brain。 +* 场景中至少须包括一个 **External** brain。 * Academy 必须在每一轮训练后将场景重置为有效的初始状态。 * 训练场景必须有明确的结束状态,为此需要使用 `Max Steps`,或让每个 agent 将自身设置为 `done`。 diff --git a/docs/localized/zh-CN/docs/Learning-Environment-Examples.md b/docs/localized/zh-CN/docs/Learning-Environment-Examples.md index be1e772313..718f491780 100644 --- a/docs/localized/zh-CN/docs/Learning-Environment-Examples.md +++ b/docs/localized/zh-CN/docs/Learning-Environment-Examples.md @@ -19,11 +19,11 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:一种线性移动任务,在此任务中 agent 必须向左或向右移动到奖励状态。 * 目标:移动到最高奖励状态。 -* Agent设置:环境包含一个 agent,上面附带了单个 Brain。 +* Agent设置:环境包含一个 agent,上面附带了单个 brain。 * Agent 奖励函数设置: * 达到次优状态时 +0.1。 * 达到最优状态时 +1.0。 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:(离散变量)一个变量,对应于当前状态。 * 向量运动空间:(离散变量)两个可能的动作(向左移动、向右移动)。 * 视觉观测:0 @@ -35,11 +35,11 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:一种平衡球任务,在此任务中 agent 需要控制平台。 * 目标:agent 必须平衡平台,以尽可能长时间在平台上保持球不掉落。 -* Agent设置:环境包含 12 个全部链接到单个 Brain 的同类 agent。 +* Agent设置:环境包含 12 个全部链接到单个 brain 的同类 agent。 * Agent 奖励函数设置: * 球在平台上保持不掉下的每一步都 +0.1。 * 球掉下平台时 -1.0。 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:(连续变量)8 个,对应于平台的旋转以及球的位置、旋转和速度。 * 向量观测空间(困难版本,因为观测到的信息减少了):(连续变量)5 个变量,对应于平台的旋转以及球的位置和旋转。 * 向量运动空间:(连续变量)2 个,其中一个值对应于 X 旋转,而另一个值对应于 Z 旋转。 @@ -52,12 +52,12 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:某一个典型版本的的grid-world任务。场景包含 agent、目标和障碍。 * 目标:agent 必须在网格中避开障碍的同时移动到目标。 -* Agent设置:环境包含一个链接到单个 Brain 的 agent。 +* Agent设置:环境包含一个链接到单个 brain 的 agent。 * Agent 奖励函数设置: * 每一步 -0.01。 * agent 导航到目标网格位置时 +1.0(场景结束)。 * agent 移动到障碍物时 -1.0(场景结束)。 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:无 * 向量运动空间:(离散变量)4 个,对应于基本方向的移动。 * 视觉观测:一个对应于 GridWorld 自上而下的视图。 @@ -70,11 +70,11 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:agent 控制球拍将球弹过球网的双人游戏。 * 目标:agent 必须在彼此之间弹起网球,同时不能丢球或击球出界。 -* Agent设置:环境包含两个链接到单个 Brain TennisBrain)的 agent。在训练之后,您可以将另一个名为 MyBrain 的 Brain 附加到其中一个 agent,从而与经过训练的模型进行游戏比赛。 +* Agent设置:环境包含两个链接到单个 brain(名为 TennisBrain)的 agent。在训练之后,您可以将另一个名为 MyBrain 的 brain 附加到其中一个 agent,从而与经过训练的模型进行游戏比赛。 * Agent 奖励函数设置(agent互相之间独立): * agent 击球过网时 +0.1。 * agent 让球落入自己的范围或者击球出界时 -0.1。 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:(连续变量)8 个,分别对应于球和球拍的位置和速度。 * 向量运动空间:(连续变量)2 个,分别对应于朝向球网或远离球网的运动,以及上下的运动。 * 视觉观测:无 @@ -86,11 +86,11 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:一个平台,agent 可以在该平台上推动方块。 * 目标:agent 必须将方块推向目标。 -* Agent设置:环境包含一个链接到单个 Brain 的 agent。 +* Agent设置:环境包含一个链接到单个 brain 的 agent。 * Agent 奖励函数设置: * 每一步 -0.0025。 * 方块接触到目标时 +1.0。 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:(连续变量)15 个,分别对应于 agent、方块和目标的位置和速度。 * 向量运动空间:(连续变量)2 个,分别对应于 X 和 Z 方向的移动。 * 视觉观测:无。 @@ -102,12 +102,12 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:一个平台环境,agent 可以在该环境中跳过墙。 * 目标:agent 必须利用一个方块越过墙并到达目标。 -* Agent设置:环境包含一个链接到两个不同 Brain 的 agent。agent 链接到的 Brain 根据墙的高度而变化。 +* Agent设置:环境包含一个链接到两个不同 brain 的 agent。agent 链接到的 brain 根据墙的高度而变化。 * Agent 奖励函数设置: * 每一步 -0.0005。 * agent 接触到目标时 +1.0。 * agent 掉下平台时 -1.0。 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:(连续变量)16 个,分别对应于 agent、方块和目标的位置和速度以及墙的高度。 * 向量运动空间:(离散变量)74 个,分别对应于 14 个射线投射,每个射线投射可检测 4 个可能的物体,加上 agent 的全局位置以及 agent 是否落地。 * 视觉观测:无。 @@ -119,10 +119,10 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:可以移动到目标位置的双关节臂。 * 目标:agent 必须将手移动到目标位置,并保持在此处。 -* Agent设置:环境包含 32 个链接到单个 Brain 的 agent。 +* Agent设置:环境包含 32 个链接到单个 brain 的 agent。 * Agent 奖励函数设置(agent互相之间独立): * 当 agent 的手处于目标位置时,每过一步 +0.1。 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:(连续变量)26 个,对应于两个机械臂 Rigidbody 的位置、旋转、速度和角速度。 * 向量运动空间:(连续变量)4 个,对应于两个关节的两个方向上的转动。 * 视觉观测:无 @@ -134,14 +134,14 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:一种有 4 个手臂的生物,每个手臂分两节 * 目标:agent 必须沿 x 轴移动其身体,并且保持不跌倒。 -* Agent设置:环境包含 3 个链接到单个 Brain 的 agent。 +* Agent设置:环境包含 3 个链接到单个 brain 的 agent。 * Agent 奖励函数设置(agent互相之间独立): * +1 乘以 x 方向的速度 * 跌倒时 -1。 * -0.01 乘以动作平方 * -0.05 乘以 y 位置变化 * -0.05 乘以 z 方向的速度 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:(连续变量)117 个,对应于每个肢体的位置、旋转、速度和角速度以及身体的加速度和角速度。 * 向量运动空间:(连续变量)12 个,对应于适用于 12 个关节的扭矩。 * 视觉观测:无 @@ -153,11 +153,11 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:一个包含多个 agent 的环境,这些 agent 争相收集香蕉。 * 目标:agent 必须学习尽可能接近更多的黄色香蕉,同时避开红色香蕉。 -* Agent设置:环境包含 10 个链接到单个 Brain 的 agent。 +* Agent设置:环境包含 10 个链接到单个 brain 的 agent。 * Agent 奖励函数设置(agent互相之间独立): * 接触黄色香蕉时 +1 * 接触红色香蕉时 -1。 -* Brain 设置:一个有以下观测/运动空间的 Brain。 +* Brain 设置:一个有以下观测/运动空间的 brain。 * 向量观测空间:(连续变量)51 个,对应于 agent 的速度, agent 前进方向,以及 agent 对周围物体进行基于射线的感知。 * 向量运动空间:(连续变量)3 个,对应于向前移动,绕 y 轴旋转,以及是否使用激光使其他 agent 瘫痪。 * 视觉观测(可选):每个 agent 的第一人称视图。 @@ -169,7 +169,7 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:在一个环境中,agent 需要在房间内查找信息、记住信息并使用信息移动到正确目标。 * 目标:移动到与房间内的方块的颜色相对应的目标。 -* Agent设置:环境包含一个链接到单个 Brain 的 agent。 +* Agent设置:环境包含一个链接到单个 brain 的 agent。 * Agent 奖励函数设置(agent互相之间独立): * 移动到正确目标时 +1。 * 移动到错误目标时 -0.1。 @@ -186,7 +186,7 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 训练环境:在一个环境中,agent 需要按需决策。agent 必须决定在接触地面时如何进行下一次弹跳。 * 目标:抓住漂浮的香蕉。跳跃次数有限。 -* Agent设置:环境包含一个链接到单个 Brain 的 agent。 +* Agent设置:环境包含一个链接到单个 brain 的 agent。 * Agent 奖励函数设置(agent互相之间独立): * 抓住香蕉时 +1。 * 弹跳出界时 -1。 @@ -205,7 +205,7 @@ Unity ML-Agents 工具包中内置了一些搭建好的学习环境的示例, * 目标: * 前锋:让球进入对手的球门。 * 守门员:防止球进入自己的球门。 -* Agent设置:环境包含四个 agent,其中两个链接到一个 Brain(前锋),两个链接到另一个 Brain(守门员)。 +* Agent设置:环境包含四个 agent,其中两个链接到一个 brain(前锋),两个链接到另一个 brain(守门员)。 * Agent 奖励函数设置(agent互相之间非独立): * 前锋: * 球进入对手球门时 +1。 diff --git a/docs/localized/zh-CN/docs/ML-Agents-Overview.md b/docs/localized/zh-CN/docs/ML-Agents-Overview.md index f488a74eb7..7c3c899020 100644 --- a/docs/localized/zh-CN/docs/ML-Agents-Overview.md +++ b/docs/localized/zh-CN/docs/ML-Agents-Overview.md @@ -228,7 +228,7 @@ Brain 类型在训练期间设置为 External,在预测期间设置为 Interna 我们将 Brain 类型切换为 Internal,并加入从训练阶段 生成的 TensorFlow 模型。现在,在预测阶段,军医 仍然继续生成他们的观测结果,但不再将结果发送到 -Python API,而是送入他们的嵌入了的 TensorFlow 模型, +Python API,而是送入他们的嵌入了的 Tensorflow 模型, 以便生成每个军医在每个时间点上要采取的_最佳_动作。 总结一下:我们的实现是基于 TensorFlow 的,因此, diff --git a/gym-unity/README.md b/gym-unity/README.md deleted file mode 100755 index c83d0bb81f..0000000000 --- a/gym-unity/README.md +++ /dev/null @@ -1,158 +0,0 @@ -# Unity ML-Agents Gym Wrapper - -A common way in which machine learning researchers interact with simulation -environments is via a wrapper provided by OpenAI called `gym`. For more -information on the gym interface, see [here](https://github.com/openai/gym). - -We provide a a gym wrapper, and instructions for using it with existing machine -learning algorithms which utilize gyms. Both wrappers provide interfaces on top -of our `UnityEnvironment` class, which is the default way of interfacing with a -Unity environment via Python. - -## Installation - -The gym wrapper can be installed using: - -```sh -pip install gym_unity -``` - -or by running the following from the `/gym-unity` directory of the repository: - -```sh -pip install . -``` - -## Using the Gym Wrapper - -The gym interface is available from `gym_unity.envs`. To launch an environmnent -from the root of the project repository use: - -```python -from gym_unity.envs import UnityEnv - -env = UnityEnv(environment_filename, worker_id, default_visual, multiagent) -``` - -* `environment_filename` refers to the path to the Unity environment. -* `worker_id` refers to the port to use for communication with the environment. - Defaults to `0`. -* `use_visual` refers to whether to use visual observations (True) or vector - observations (False) as the default observation provided by the `reset` and - `step` functions. Defaults to `False`. -* `multiagent` refers to whether you intent to launch an environment which - contains more than one agent. Defaults to `False`. - -The returned environment `env` will function as a gym. - -For more on using the gym interface, see our -[Jupyter Notebook tutorial](../notebooks/getting-started-gym.ipynb). - -## Limitation - -* It is only possible to use an environment with a single Brain. -* By default the first visual observation is provided as the `observation`, if - present. Otherwise vector observations are provided. -* All `BrainInfo` output from the environment can still be accessed from the - `info` provided by `env.step(action)`. -* Stacked vector observations are not supported. -* Environment registration for use with `gym.make()` is currently not supported. - -## Running OpenAI Baselines Algorithms - -OpenAI provides a set of open-source maintained and tested Reinforcement -Learning algorithms called the [Baselines](https://github.com/openai/baselines). - -Using the provided Gym wrapper, it is possible to train ML-Agents environments -using these algorithms. This requires the creation of custom training scripts to -launch each algorithm. In most cases these scripts can be created by making -slightly modifications to the ones provided for Atari and Mujoco environments. - -### Example - DQN Baseline - -In order to train an agent to play the `GridWorld` environment using the -Baselines DQN algorithm, create a file called `train_unity.py` within the -`baselines/deepq/experiments` subfolder of the baselines repository. This file -will be a modification of the `run_atari.py` file within the same folder. Then -create and `/envs/` directory within the repository, and build the GridWorld -environment to that directory. For more information on building Unity -environments, see [here](../docs/Learning-Environment-Executable.md). Add the -following code to the `train_unity.py` file: - -```python -import gym - -from baselines import deepq -from gym_unity.envs import UnityEnv - -def main(): - env = UnityEnv("./envs/GridWorld", 0, use_visual=True) - model = deepq.models.cnn_to_mlp( - convs=[(32, 8, 4), (64, 4, 2), (64, 3, 1)], - hiddens=[256], - dueling=True, - ) - act = deepq.learn( - env, - q_func=model, - lr=1e-3, - max_timesteps=100000, - buffer_size=50000, - exploration_fraction=0.1, - exploration_final_eps=0.02, - print_freq=10, - ) - print("Saving model to unity_model.pkl") - act.save("unity_model.pkl") - - -if __name__ == '__main__': - main() -``` - -To start the training process, run the following from the root of the baselines -repository: - -```sh -python -m baselines.deepq.experiments.train_unity -``` - -### Other Algorithms - -Other algorithms in the Baselines repository can be run using scripts similar to -the example provided above. In most cases, the primary changes needed to use a -Unity environment are to import `UnityEnv`, and to replace the environment -creation code, typically `gym.make()`, with a call to `UnityEnv(env_path)` -passing the environment binary path. - -A typical rule of thumb is that for vision-based environments, modification -should be done to Atari training scripts, and for vector observation -environments, modification should be done to Mujoco scripts. - -Some algorithms will make use of `make_atari_env()` or `make_mujoco_env()` -functions. These are defined in `baselines/common/cmd_util.py`. In order to use -Unity environments for these algorithms, add the following import statement and -function to `cmd_utils.py`: - -```python -from gym_unity.envs import UnityEnv - -def make_unity_env(env_directory, num_env, visual, start_index=0): - """ - Create a wrapped, monitored Unity environment. - """ - def make_env(rank): # pylint: disable=C0111 - def _thunk(): - env = UnityEnv(env_directory, rank, use_visual=True) - env = Monitor(env, logger.get_dir() and os.path.join(logger.get_dir(), str(rank))) - return env - return _thunk - if visual: - return SubprocVecEnv([make_env(i + start_index) for i in range(num_env)]) - else: - rank = MPI.COMM_WORLD.Get_rank() - env = UnityEnv(env_directory, rank, use_visual=False) - env = Monitor(env, logger.get_dir() and os.path.join(logger.get_dir(), str(rank))) - return env - -``` diff --git a/gym-unity/gym_unity/__init__.py b/gym-unity/gym_unity/__init__.py deleted file mode 100644 index 6314bce1d3..0000000000 --- a/gym-unity/gym_unity/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from gym.envs.registration import register diff --git a/gym-unity/gym_unity/envs/__init__.py b/gym-unity/gym_unity/envs/__init__.py deleted file mode 100644 index d7a499a59f..0000000000 --- a/gym-unity/gym_unity/envs/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from gym_unity.envs.unity_env import UnityEnv, UnityGymException diff --git a/gym-unity/gym_unity/envs/unity_env.py b/gym-unity/gym_unity/envs/unity_env.py deleted file mode 100755 index cb24d6e51a..0000000000 --- a/gym-unity/gym_unity/envs/unity_env.py +++ /dev/null @@ -1,207 +0,0 @@ -import gym -import numpy as np -from mlagents.envs import UnityEnvironment -from gym import error, spaces, logger - - -class UnityGymException(error.Error): - """ - Any error related to the gym wrapper of ml-agents. - """ - pass - - -class UnityEnv(gym.Env): - """ - Provides Gym wrapper for Unity Learning Environments. - Multi-agent environments use lists for object types, as done here: - https://github.com/openai/multiagent-particle-envs - """ - - def __init__(self, environment_filename: str, worker_id=0, use_visual=False, multiagent=False): - """ - Environment initialization - :param environment_filename: The UnityEnvironment path or file to be wrapped in the gym. - :param worker_id: Worker number for environment. - :param use_visual: Whether to use visual observation or vector observation. - :param multiagent: Whether to run in multi-agent mode (lists of obs, reward, done). - """ - self._env = UnityEnvironment(environment_filename, worker_id) - self.name = self._env.academy_name - self.visual_obs = None - self._current_state = None - self._n_agents = None - self._multiagent = multiagent - - # Check brain configuration - if len(self._env.brains) != 1: - raise UnityGymException( - "There can only be one brain in a UnityEnvironment " - "if it is wrapped in a gym.") - self.brain_name = self._env.external_brain_names[0] - brain = self._env.brains[self.brain_name] - - if use_visual and brain.number_visual_observations == 0: - raise UnityGymException("`use_visual` was set to True, however there are no" - " visual observations as part of this environment.") - self.use_visual = brain.number_visual_observations == 1 and use_visual - - if brain.num_stacked_vector_observations != 1: - raise UnityGymException( - "There can only be one stacked vector observation in a UnityEnvironment " - "if it is wrapped in a gym.") - - # Check for number of agents in scene. - initial_info = self._env.reset()[self.brain_name] - self._check_agents(len(initial_info.agents)) - - # Set observation and action spaces - if brain.vector_action_space_type == "discrete": - if len(brain.vector_action_space_size) == 1: - self._action_space = spaces.Discrete(brain.vector_action_space_size[0]) - else: - self._action_space = spaces.MultiDiscrete(brain.vector_action_space_size) - else: - high = np.array([1] * brain.vector_action_space_size[0]) - self._action_space = spaces.Box(-high, high, dtype=np.float32) - high = np.array([np.inf] * brain.vector_observation_space_size) - self.action_meanings = brain.vector_action_descriptions - if self.use_visual: - if brain.camera_resolutions[0]["blackAndWhite"]: - depth = 1 - else: - depth = 3 - self._observation_space = spaces.Box(0, 1, dtype=np.float32, - shape=(brain.camera_resolutions[0]["height"], - brain.camera_resolutions[0]["width"], - depth)) - else: - self._observation_space = spaces.Box(-high, high, dtype=np.float32) - - def reset(self): - """Resets the state of the environment and returns an initial observation. - In the case of multi-agent environments, this is a list. - Returns: observation (object/list): the initial observation of the - space. - """ - info = self._env.reset()[self.brain_name] - n_agents = len(info.agents) - self._check_agents(n_agents) - - if not self._multiagent: - obs, reward, done, info = self._single_step(info) - else: - obs, reward, done, info = self._multi_step(info) - return obs - - def step(self, action): - """Run one timestep of the environment's dynamics. When end of - episode is reached, you are responsible for calling `reset()` - to reset this environment's state. - Accepts an action and returns a tuple (observation, reward, done, info). - In the case of multi-agent environments, these are lists. - Args: - action (object/list): an action provided by the environment - Returns: - observation (object/list): agent's observation of the current environment - reward (float/list) : amount of reward returned after previous action - done (boolean/list): whether the episode has ended. - info (dict): contains auxiliary diagnostic information, including BrainInfo. - """ - - # Use random actions for all other agents in environment. - if self._multiagent: - if not isinstance(action, list): - raise UnityGymException("The environment was expecting `action` to be a list.") - if len(action) != self._n_agents: - raise UnityGymException("The environment was expecting a list of {} actions.".format(self._n_agents)) - else: - action = np.array(action) - - info = self._env.step(action)[self.brain_name] - n_agents = len(info.agents) - self._check_agents(n_agents) - self._current_state = info - - if not self._multiagent: - obs, reward, done, info = self._single_step(info) - else: - obs, reward, done, info = self._multi_step(info) - return obs, reward, done, info - - def _single_step(self, info): - if self.use_visual: - self.visual_obs = info.visual_observations[0][0, :, :, :] - default_observation = self.visual_obs - else: - default_observation = info.vector_observations[0, :] - - return default_observation, info.rewards[0], info.local_done[0], {"text_observation": info.text_observations[0], - "brain_info": info} - - def _multi_step(self, info): - if self.use_visual: - self.visual_obs = info.visual_observations - default_observation = self.visual_obs - else: - default_observation = info.vector_observations - return list(default_observation), info.rewards, info.local_done, {"text_observation": info.text_observations, - "brain_info": info} - - def render(self, mode='rgb_array'): - return self.visual_obs - - def close(self): - """Override _close in your subclass to perform any necessary cleanup. - Environments will automatically close() themselves when - garbage collected or when the program exits. - """ - self._env.close() - - def get_action_meanings(self): - return self.action_meanings - - def seed(self, seed=None): - """Sets the seed for this env's random number generator(s). - Currently not implemented. - """ - logger.warn("Could not seed environment %s", self.name) - return - - def _check_agents(self, n_agents): - if not self._multiagent and n_agents > 1: - raise UnityGymException("The environment was launched as a single-agent environment, however" - "there is more than one agent in the scene.") - elif self._multiagent and n_agents <= 1: - raise UnityGymException("The environment was launched as a mutli-agent environment, however" - "there is only one agent in the scene.") - if self._n_agents is None: - self._n_agents = n_agents - logger.info("{} agents within environment.".format(n_agents)) - elif self._n_agents != n_agents: - raise UnityGymException("The number of agents in the environment has changed since " - "initialization. This is not supported.") - - @property - def metadata(self): - return {'render.modes': ['rgb_array']} - - @property - def reward_range(self): - return -float('inf'), float('inf') - - @property - def spec(self): - return None - - @property - def action_space(self): - return self._action_space - - @property - def observation_space(self): - return self._observation_space - - @property - def number_agents(self): - return self._n_agents diff --git a/gym-unity/setup.py b/gym-unity/setup.py deleted file mode 100755 index 10069f7f23..0000000000 --- a/gym-unity/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup, Command, find_packages - -setup(name='gym_unity', - version='0.1.0', - description='Unity Machine Learning Agents Gym Interface', - license='Apache License 2.0', - author='Unity Technologies', - author_email='ML-Agents@unity3d.com', - url='https://github.com/Unity-Technologies/ml-agents', - packages=find_packages(), - install_requires = ['gym', 'mlagents'] - ) diff --git a/gym-unity/tests/test_gym.py b/gym-unity/tests/test_gym.py deleted file mode 100644 index a5149b042b..0000000000 --- a/gym-unity/tests/test_gym.py +++ /dev/null @@ -1,46 +0,0 @@ -import unittest.mock as mock -import pytest -import numpy as np - -from gym_unity.envs import UnityEnv, UnityGymException -from tests.mock_communicator import MockCommunicator - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_gym_wrapper(mock_communicator, mock_launcher): - mock_communicator.return_value = MockCommunicator( - discrete_action=False, visual_inputs=0, stack=False, num_agents=1) - - # Test for incorrect number of agents. - with pytest.raises(UnityGymException): - UnityEnv(' ', use_visual=False, multiagent=True) - - env = UnityEnv(' ', use_visual=False) - assert isinstance(env, UnityEnv) - assert isinstance(env.reset(), np.ndarray) - actions = env.action_space.sample() - assert actions.shape[0] == 2 - obs, rew, done, info = env.step(actions) - assert isinstance(obs, np.ndarray) - assert isinstance(rew, float) - assert isinstance(done, bool) - assert isinstance(info, dict) - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_multi_agent(mock_communicator, mock_launcher): - mock_communicator.return_value = MockCommunicator( - discrete_action=False, visual_inputs=0, stack=False, num_agents=2) - - # Test for incorrect number of agents. - with pytest.raises(UnityGymException): - UnityEnv(' ', multiagent=False) - - env = UnityEnv(' ', use_visual=False, multiagent=True) - assert isinstance(env.reset(), list) - actions = [env.action_space.sample() for i in range(env.number_agents)] - obs, rew, done, info = env.step(actions) - assert isinstance(obs, list) - assert isinstance(rew, list) - assert isinstance(done, list) - assert isinstance(info, dict) diff --git a/ml-agents/README.md b/ml-agents/README.md deleted file mode 100644 index 473b09c2cb..0000000000 --- a/ml-agents/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Unity ML-Agents Python Interface and Trainers - -The `mlagents` Python package is part of the -[ML-Agents Toolkit](https://github.com/Unity-Technologies/ml-agents). -`mlagents` provides a Python API that allows direct interaction with the Unity -game engine as well as a collection of trainers and algorithms to train agents -in Unity environments. - -The `mlagents` Python package contains two sub packages: - -* `mlagents.envs`: A low level API which allows you to interact directly with a - Unity Environment. See - [here](https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Python-API.md) - for more information on using this package. - -* `mlagents.trainers`: A set of Reinforcement Learning algorithms designed to be - used with Unity environments. Access them using the: `mlagents-learn` access - point. See - [here](https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Training-ML-Agents.md) - for more information on using this package. - -## Installation - -Install the `mlagents` package with: - -```sh -pip install mlagents -``` - -## Usage & More Information - -For more detailed documentation, check out the -[ML-Agents Toolkit documentation.](https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Readme.md) diff --git a/ml-agents/mlagents/__init__.py b/ml-agents/mlagents/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_output_pb2.py b/ml-agents/mlagents/envs/communicator_objects/unity_output_pb2.py deleted file mode 100644 index 012cab7fb6..0000000000 --- a/ml-agents/mlagents/envs/communicator_objects/unity_output_pb2.py +++ /dev/null @@ -1,82 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/unity_output.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from mlagents.envs.communicator_objects import unity_rl_output_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__output__pb2 -from mlagents.envs.communicator_objects import unity_rl_initialization_output_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__initialization__output__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/unity_output.proto', - package='communicator_objects', - syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n5mlagents/envs/communicator_objects/unity_output.proto\x12\x14\x63ommunicator_objects\x1a\x38mlagents/envs/communicator_objects/unity_rl_output.proto\x1aGmlagents/envs/communicator_objects/unity_rl_initialization_output.proto\"\x9a\x01\n\x0bUnityOutput\x12\x36\n\trl_output\x18\x01 \x01(\x0b\x32#.communicator_objects.UnityRLOutput\x12S\n\x18rl_initialization_output\x18\x02 \x01(\x0b\x32\x31.communicator_objects.UnityRLInitializationOutputB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') - , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__output__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__initialization__output__pb2.DESCRIPTOR,]) - - - - -_UNITYOUTPUT = _descriptor.Descriptor( - name='UnityOutput', - full_name='communicator_objects.UnityOutput', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='rl_output', full_name='communicator_objects.UnityOutput.rl_output', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='rl_initialization_output', full_name='communicator_objects.UnityOutput.rl_initialization_output', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=211, - serialized_end=365, -) - -_UNITYOUTPUT.fields_by_name['rl_output'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__output__pb2._UNITYRLOUTPUT -_UNITYOUTPUT.fields_by_name['rl_initialization_output'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__initialization__output__pb2._UNITYRLINITIALIZATIONOUTPUT -DESCRIPTOR.message_types_by_name['UnityOutput'] = _UNITYOUTPUT -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -UnityOutput = _reflection.GeneratedProtocolMessageType('UnityOutput', (_message.Message,), dict( - DESCRIPTOR = _UNITYOUTPUT, - __module__ = 'mlagents.envs.communicator_objects.unity_output_pb2' - # @@protoc_insertion_point(class_scope:communicator_objects.UnityOutput) - )) -_sym_db.RegisterMessage(UnityOutput) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/trainers/bc/models.py b/ml-agents/mlagents/trainers/bc/models.py deleted file mode 100644 index 25e7c3ccf6..0000000000 --- a/ml-agents/mlagents/trainers/bc/models.py +++ /dev/null @@ -1,56 +0,0 @@ -import tensorflow as tf -import tensorflow.contrib.layers as c_layers -from mlagents.trainers.models import LearningModel - - -class BehavioralCloningModel(LearningModel): - def __init__(self, brain, h_size=128, lr=1e-4, n_layers=2, m_size=128, - normalize=False, use_recurrent=False, scope='PPO', seed=0): - with tf.variable_scope(scope): - LearningModel.__init__(self, m_size, normalize, use_recurrent, brain, seed) - num_streams = 1 - hidden_streams = self.create_observation_streams(num_streams, h_size, n_layers) - hidden = hidden_streams[0] - self.dropout_rate = tf.placeholder(dtype=tf.float32, shape=[], name="dropout_rate") - hidden_reg = tf.layers.dropout(hidden, self.dropout_rate) - if self.use_recurrent: - tf.Variable(self.m_size, name="memory_size", trainable=False, dtype=tf.int32) - self.memory_in = tf.placeholder(shape=[None, self.m_size], dtype=tf.float32, name='recurrent_in') - hidden_reg, self.memory_out = self.create_recurrent_encoder(hidden_reg, self.memory_in, - self.sequence_length) - self.memory_out = tf.identity(self.memory_out, name='recurrent_out') - - if brain.vector_action_space_type == "discrete": - policy_branches = [] - for size in self.act_size: - policy_branches.append( - tf.layers.dense( - hidden, - size, - activation=None, - use_bias=False, - kernel_initializer=c_layers.variance_scaling_initializer(factor=0.01))) - self.action_probs = tf.concat( - [tf.nn.softmax(branch) for branch in policy_branches], axis=1, name="action_probs") - self.action_masks = tf.placeholder(shape=[None, sum(self.act_size)], dtype=tf.float32, name="action_masks") - self.sample_action_float, _ = self.create_discrete_action_masking_layer( - tf.concat(policy_branches, axis = 1), self.action_masks, self.act_size) - self.sample_action_float = tf.identity(self.sample_action_float, name="action") - self.sample_action = tf.cast(self.sample_action_float, tf.int32) - self.true_action = tf.placeholder(shape=[None, len(policy_branches)], dtype=tf.int32, name="teacher_action") - self.action_oh = tf.concat([ - tf.one_hot(self.true_action[:, i], self.act_size[i]) for i in range(len(self.act_size))], axis=1) - self.loss = tf.reduce_sum(-tf.log(self.action_probs + 1e-10) * self.action_oh) - self.action_percent = tf.reduce_mean(tf.cast( - tf.equal(tf.cast(tf.argmax(self.action_probs, axis=1), tf.int32), self.sample_action), tf.float32)) - else: - self.policy = tf.layers.dense(hidden_reg, self.act_size[0], activation=None, use_bias=False, name='pre_action', - kernel_initializer=c_layers.variance_scaling_initializer(factor=0.01)) - self.clipped_sample_action = tf.clip_by_value(self.policy, -1, 1) - self.sample_action = tf.identity(self.clipped_sample_action, name="action") - self.true_action = tf.placeholder(shape=[None, self.act_size[0]], dtype=tf.float32, name="teacher_action") - self.clipped_true_action = tf.clip_by_value(self.true_action, -1, 1) - self.loss = tf.reduce_sum(tf.squared_difference(self.clipped_true_action, self.sample_action)) - - optimizer = tf.train.AdamOptimizer(learning_rate=lr) - self.update = optimizer.minimize(self.loss) diff --git a/ml-agents/mlagents/trainers/bc/policy.py b/ml-agents/mlagents/trainers/bc/policy.py deleted file mode 100644 index 585d8eb6fe..0000000000 --- a/ml-agents/mlagents/trainers/bc/policy.py +++ /dev/null @@ -1,87 +0,0 @@ -import logging - -import numpy as np -from mlagents.trainers.bc.models import BehavioralCloningModel -from mlagents.trainers.policy import Policy - -logger = logging.getLogger("mlagents.trainers") - - -class BCPolicy(Policy): - def __init__(self, seed, brain, trainer_parameters, sess): - """ - :param seed: Random seed. - :param brain: Assigned Brain object. - :param trainer_parameters: Defined training parameters. - :param sess: TensorFlow session. - """ - super().__init__(seed, brain, trainer_parameters, sess) - - self.model = BehavioralCloningModel( - h_size=int(trainer_parameters['hidden_units']), - lr=float(trainer_parameters['learning_rate']), - n_layers=int(trainer_parameters['num_layers']), - m_size=self.m_size, - normalize=False, - use_recurrent=trainer_parameters['use_recurrent'], - brain=brain, - scope=self.variable_scope, - seed=seed) - - self.inference_dict = {'action': self.model.sample_action} - self.update_dict = {'policy_loss': self.model.loss, - 'update_batch': self.model.update} - if self.use_recurrent: - self.inference_dict['memory_out'] = self.model.memory_out - - self.evaluate_rate = 1.0 - self.update_rate = 0.5 - - def evaluate(self, brain_info): - """ - Evaluates policy for the agent experiences provided. - :param brain_info: BrainInfo input to network. - :return: Results of evaluation. - """ - feed_dict = {self.model.dropout_rate: self.evaluate_rate, - self.model.sequence_length: 1} - - feed_dict = self._fill_eval_dict(feed_dict, brain_info) - if self.use_recurrent: - if brain_info.memories.shape[1] == 0: - brain_info.memories = self.make_empty_memory(len(brain_info.agents)) - feed_dict[self.model.memory_in] = brain_info.memories - run_out = self._execute_model(feed_dict, self.inference_dict) - return run_out - - def update(self, mini_batch, num_sequences): - """ - Performs update on model. - :param mini_batch: Batch of experiences. - :param num_sequences: Number of sequences to process. - :return: Results of update. - """ - - feed_dict = {self.model.dropout_rate: self.update_rate, - self.model.batch_size: num_sequences, - self.model.sequence_length: self.sequence_length} - if self.use_continuous_act: - feed_dict[self.model.true_action] = mini_batch['actions']. \ - reshape([-1, self.brain.vector_action_space_size[0]]) - else: - feed_dict[self.model.true_action] = mini_batch['actions'].reshape( - [-1, len(self.brain.vector_action_space_size)]) - feed_dict[self.model.action_masks] = np.ones( - (num_sequences, sum(self.brain.vector_action_space_size))) - if self.use_vec_obs: - apparent_obs_size = self.brain.vector_observation_space_size * \ - self.brain.num_stacked_vector_observations - feed_dict[self.model.vector_in] = mini_batch['vector_obs'] \ - .reshape([-1,apparent_obs_size]) - for i, _ in enumerate(self.model.visual_in): - visual_obs = mini_batch['visual_obs%d' % i] - feed_dict[self.model.visual_in[i]] = visual_obs - if self.use_recurrent: - feed_dict[self.model.memory_in] = np.zeros([num_sequences, self.m_size]) - run_out = self._execute_model(feed_dict, self.update_dict) - return run_out diff --git a/ml-agents/mlagents/trainers/curriculum.py b/ml-agents/mlagents/trainers/curriculum.py deleted file mode 100644 index 3ec0859f62..0000000000 --- a/ml-agents/mlagents/trainers/curriculum.py +++ /dev/null @@ -1,112 +0,0 @@ -import os -import json -import math - -from .exception import CurriculumError - -import logging - -logger = logging.getLogger('mlagents.trainers') - - -class Curriculum(object): - def __init__(self, location, default_reset_parameters): - """ - Initializes a Curriculum object. - :param location: Path to JSON defining curriculum. - :param default_reset_parameters: Set of reset parameters for - environment. - """ - self.max_lesson_num = 0 - self.measure = None - self._lesson_num = 0 - # The name of the brain should be the basename of the file without the - # extension. - self._brain_name = os.path.basename(location).split('.')[0] - - try: - with open(location) as data_file: - self.data = json.load(data_file) - except IOError: - raise CurriculumError( - 'The file {0} could not be found.'.format(location)) - except UnicodeDecodeError: - raise CurriculumError('There was an error decoding {}' - .format(location)) - self.smoothing_value = 0 - for key in ['parameters', 'measure', 'thresholds', - 'min_lesson_length', 'signal_smoothing']: - if key not in self.data: - raise CurriculumError("{0} does not contain a " - "{1} field." - .format(location, key)) - self.smoothing_value = 0 - self.measure = self.data['measure'] - self.min_lesson_length = self.data['min_lesson_length'] - self.max_lesson_num = len(self.data['thresholds']) - - parameters = self.data['parameters'] - for key in parameters: - if key not in default_reset_parameters: - raise CurriculumError( - 'The parameter {0} in Curriculum {1} is not present in ' - 'the Environment'.format(key, location)) - if len(parameters[key]) != self.max_lesson_num + 1: - raise CurriculumError( - 'The parameter {0} in Curriculum {1} must have {2} values ' - 'but {3} were found'.format(key, location, - self.max_lesson_num + 1, - len(parameters[key]))) - - @property - def lesson_num(self): - return self._lesson_num - - @lesson_num.setter - def lesson_num(self, lesson_num): - self._lesson_num = max(0, min(lesson_num, self.max_lesson_num)) - - def increment_lesson(self, measure_val): - """ - Increments the lesson number depending on the progress given. - :param measure_val: Measure of progress (either reward or percentage - steps completed). - :return Whether the lesson was incremented. - """ - if not self.data or not measure_val or math.isnan(measure_val): - return False - if self.data['signal_smoothing']: - measure_val = self.smoothing_value * 0.25 + 0.75 * measure_val - self.smoothing_value = measure_val - if self.lesson_num < self.max_lesson_num: - if measure_val > self.data['thresholds'][self.lesson_num]: - self.lesson_num += 1 - config = {} - parameters = self.data['parameters'] - for key in parameters: - config[key] = parameters[key][self.lesson_num] - logger.info('{0} lesson changed. Now in lesson {1}: {2}' - .format(self._brain_name, - self.lesson_num, - ', '.join([str(x) + ' -> ' + str(config[x]) - for x in config]))) - return True - return False - - def get_config(self, lesson=None): - """ - Returns reset parameters which correspond to the lesson. - :param lesson: The lesson you want to get the config of. If None, the - current lesson is returned. - :return: The configuration of the reset parameters. - """ - if not self.data: - return {} - if lesson is None: - lesson = self.lesson_num - lesson = max(0, min(lesson, self.max_lesson_num)) - config = {} - parameters = self.data['parameters'] - for key in parameters: - config[key] = parameters[key][lesson] - return config diff --git a/ml-agents/mlagents/trainers/exception.py b/ml-agents/mlagents/trainers/exception.py deleted file mode 100644 index b2f0a0dbd1..0000000000 --- a/ml-agents/mlagents/trainers/exception.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Contains exceptions for the trainers package. -""" - -class TrainerError(Exception): - """ - Any error related to the trainers in the ML-Agents Toolkit. - """ - pass - -class CurriculumError(TrainerError): - """ - Any error related to training with a curriculum. - """ - pass - -class MetaCurriculumError(TrainerError): - """ - Any error related to the configuration of a metacurriculum. - """ diff --git a/ml-agents/mlagents/trainers/learn.py b/ml-agents/mlagents/trainers/learn.py deleted file mode 100644 index 10790e0059..0000000000 --- a/ml-agents/mlagents/trainers/learn.py +++ /dev/null @@ -1,110 +0,0 @@ -# # Unity ML-Agents Toolkit - -import logging - -import os -import multiprocessing -import numpy as np -from docopt import docopt - -from .trainer_controller import TrainerController -from .exception import TrainerError - - -def run_training(sub_id, run_seed, run_options): - """ - Launches training session. - :param sub_id: Unique id for training session. - :param run_seed: Random seed used for training. - :param run_options: Command line arguments for training. - """ - # Docker Parameters - docker_target_name = (run_options['--docker-target-name'] - if run_options['--docker-target-name'] != 'None' else None) - - # General parameters - env_path = (run_options['--env'] - if run_options['--env'] != 'None' else None) - run_id = run_options['--run-id'] - load_model = run_options['--load'] - train_model = run_options['--train'] - save_freq = int(run_options['--save-freq']) - keep_checkpoints = int(run_options['--keep-checkpoints']) - worker_id = int(run_options['--worker-id']) - curriculum_file = (run_options['--curriculum'] - if run_options['--curriculum'] != 'None' else None) - lesson = int(run_options['--lesson']) - fast_simulation = not bool(run_options['--slow']) - no_graphics = run_options['--no-graphics'] - trainer_config_path = run_options[''] - - # Create controller and begin training. - tc = TrainerController(env_path, run_id + '-' + str(sub_id), - save_freq, curriculum_file, fast_simulation, - load_model, train_model, worker_id + sub_id, - keep_checkpoints, lesson, run_seed, - docker_target_name, trainer_config_path, no_graphics) - tc.start_learning() - - -def main(): - try: - print(''' - - ▄▄▄▓▓▓▓ - ╓▓▓▓▓▓▓█▓▓▓▓▓ - ,▄▄▄m▀▀▀' ,▓▓▓▀▓▓▄ ▓▓▓ ▓▓▌ - ▄▓▓▓▀' ▄▓▓▀ ▓▓▓ ▄▄ ▄▄ ,▄▄ ▄▄▄▄ ,▄▄ ▄▓▓▌▄ ▄▄▄ ,▄▄ - ▄▓▓▓▀ ▄▓▓▀ ▐▓▓▌ ▓▓▌ ▐▓▓ ▐▓▓▓▀▀▀▓▓▌ ▓▓▓ ▀▓▓▌▀ ^▓▓▌ ╒▓▓▌ - ▄▓▓▓▓▓▄▄▄▄▄▄▄▄▓▓▓ ▓▀ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▄ ▓▓▌ - ▀▓▓▓▓▀▀▀▀▀▀▀▀▀▀▓▓▄ ▓▓ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▐▓▓ - ^█▓▓▓ ▀▓▓▄ ▐▓▓▌ ▓▓▓▓▄▓▓▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▓▄ ▓▓▓▓` - '▀▓▓▓▄ ^▓▓▓ ▓▓▓ └▀▀▀▀ ▀▀ ^▀▀ `▀▀ `▀▀ '▀▀ ▐▓▓▌ - ▀▀▀▀▓▄▄▄ ▓▓▓▓▓▓, ▓▓▓▓▀ - `▀█▓▓▓▓▓▓▓▓▓▌ - ¬`▀▀▀█▓ - - ''') - except: - print('\n\n\tUnity Technologies\n') - - logger = logging.getLogger('mlagents.trainers') - _USAGE = ''' - Usage: - mlagents-learn [options] - mlagents-learn --help - - Options: - --env= Name of the Unity executable [default: None]. - --curriculum= Curriculum json directory for environment [default: None]. - --keep-checkpoints= How many model checkpoints to keep [default: 5]. - --lesson= Start learning from this lesson [default: 0]. - --load Whether to load the model or randomly initialize [default: False]. - --run-id= The directory name for model and summary statistics [default: ppo]. - --num-runs= Number of concurrent training sessions [default: 1]. - --save-freq= Frequency at which to save model [default: 50000]. - --seed= Random seed used for training [default: -1]. - --slow Whether to run the game at training speed [default: False]. - --train Whether to train model, or only run inference [default: False]. - --worker-id= Number to add to communication port (5005) [default: 0]. - --docker-target-name=
Docker volume to store training-specific files [default: None]. - --no-graphics Whether to run the environment in no-graphics mode [default: False]. - ''' - - options = docopt(_USAGE) - logger.info(options) - num_runs = int(options['--num-runs']) - seed = int(options['--seed']) - - if options['--env'] == 'None' and num_runs > 1: - raise TrainerError('It is not possible to launch more than one concurrent training session ' - 'when training from the editor.') - - jobs = [] - run_seed = seed - for i in range(num_runs): - if seed == -1: - run_seed = np.random.randint(0, 10000) - p = multiprocessing.Process(target=run_training, args=(i, run_seed, options)) - jobs.append(p) - p.start() diff --git a/ml-agents/mlagents/trainers/meta_curriculum.py b/ml-agents/mlagents/trainers/meta_curriculum.py deleted file mode 100644 index fe5e149787..0000000000 --- a/ml-agents/mlagents/trainers/meta_curriculum.py +++ /dev/null @@ -1,147 +0,0 @@ -"""Contains the MetaCurriculum class.""" - -import os -from mlagents.trainers.curriculum import Curriculum -from mlagents.trainers.exception import MetaCurriculumError - -import logging - -logger = logging.getLogger('mlagents.trainers') - - -class MetaCurriculum(object): - """A MetaCurriculum holds curriculums. Each curriculum is associated to a - particular brain in the environment. - """ - - def __init__(self, curriculum_folder, default_reset_parameters): - """Initializes a MetaCurriculum object. - - Args: - curriculum_folder (str): The relative or absolute path of the - folder which holds the curriculums for this environment. - The folder should contain JSON files whose names are the - brains that the curriculums belong to. - default_reset_parameters (dict): The default reset parameters - of the environment. - """ - used_reset_parameters = set() - self._brains_to_curriculums = {} - - try: - for curriculum_filename in os.listdir(curriculum_folder): - brain_name = curriculum_filename.split('.')[0] - curriculum_filepath = \ - os.path.join(curriculum_folder, curriculum_filename) - curriculum = Curriculum(curriculum_filepath, - default_reset_parameters) - - # Check if any two curriculums use the same reset params. - if any([(parameter in curriculum.get_config().keys()) - for parameter in used_reset_parameters]): - logger.warning('Two or more curriculums will ' - 'attempt to change the same reset ' - 'parameter. The result will be ' - 'non-deterministic.') - - used_reset_parameters.update(curriculum.get_config().keys()) - self._brains_to_curriculums[brain_name] = curriculum - except NotADirectoryError: - raise MetaCurriculumError(curriculum_folder + ' is not a ' - 'directory. Refer to the ML-Agents ' - 'curriculum learning docs.') - - - @property - def brains_to_curriculums(self): - """A dict from brain_name to the brain's curriculum.""" - return self._brains_to_curriculums - - @property - def lesson_nums(self): - """A dict from brain name to the brain's curriculum's lesson number.""" - lesson_nums = {} - for brain_name, curriculum in self.brains_to_curriculums.items(): - lesson_nums[brain_name] = curriculum.lesson_num - - return lesson_nums - - @lesson_nums.setter - def lesson_nums(self, lesson_nums): - for brain_name, lesson in lesson_nums.items(): - self.brains_to_curriculums[brain_name].lesson_num = lesson - - def _lesson_ready_to_increment(self, brain_name, reward_buff_size): - """Determines whether the curriculum of a specified brain is ready - to attempt an increment. - - Args: - brain_name (str): The name of the brain whose curriculum will be - checked for readiness. - reward_buff_size (int): The size of the reward buffer of the trainer - that corresponds to the specified brain. - - Returns: - Whether the curriculum of the specified brain should attempt to - increment its lesson. - """ - return reward_buff_size >= (self.brains_to_curriculums[brain_name] - .min_lesson_length) - - def increment_lessons(self, measure_vals, reward_buff_sizes=None): - """Attempts to increments all the lessons of all the curriculums in this - MetaCurriculum. Note that calling this method does not guarantee the - lesson of a curriculum will increment. The lesson of a curriculum will - only increment if the specified measure threshold defined in the - curriculum has been reached and the minimum number of episodes in the - lesson have been completed. - - Args: - measure_vals (dict): A dict of brain name to measure value. - reward_buff_sizes (dict): A dict of brain names to the size of their - corresponding reward buffers. - - Returns: - A dict from brain name to whether that brain's lesson number was - incremented. - """ - ret = {} - if reward_buff_sizes: - for brain_name, buff_size in reward_buff_sizes.items(): - if self._lesson_ready_to_increment(brain_name, buff_size): - measure_val = measure_vals[brain_name] - ret[brain_name] = (self.brains_to_curriculums[brain_name] - .increment_lesson(measure_val)) - else: - for brain_name, measure_val in measure_vals.items(): - ret[brain_name] = (self.brains_to_curriculums[brain_name] - .increment_lesson(measure_val)) - return ret - - - def set_all_curriculums_to_lesson_num(self, lesson_num): - """Sets all the curriculums in this meta curriculum to a specified - lesson number. - - Args: - lesson_num (int): The lesson number which all the curriculums will - be set to. - """ - for _, curriculum in self.brains_to_curriculums.items(): - curriculum.lesson_num = lesson_num - - - def get_config(self): - """Get the combined configuration of all curriculums in this - MetaCurriculum. - - Returns: - A dict from parameter to value. - """ - config = {} - - for _, curriculum in self.brains_to_curriculums.items(): - curr_config = curriculum.get_config() - config.update(curr_config) - - return config diff --git a/ml-agents/mlagents/trainers/policy.py b/ml-agents/mlagents/trainers/policy.py deleted file mode 100644 index 3e8095e8b6..0000000000 --- a/ml-agents/mlagents/trainers/policy.py +++ /dev/null @@ -1,146 +0,0 @@ -import logging -import numpy as np - -from mlagents.trainers import UnityException -from mlagents.trainers.models import LearningModel - -logger = logging.getLogger("mlagents.trainers") - - -class UnityPolicyException(UnityException): - """ - Related to errors with the Trainer. - """ - pass - - -class Policy(object): - """ - Contains a learning model, and the necessary - functions to interact with it to perform evaluate and updating. - """ - - def __init__(self, seed, brain, trainer_parameters, sess): - """ - Initialized the policy. - :param seed: Random seed to use for TensorFlow. - :param brain: The corresponding Brain for this policy. - :param trainer_parameters: The trainer parameters. - :param sess: The current TensorFlow session. - """ - self.m_size = None - self.model = None - self.inference_dict = {} - self.update_dict = {} - self.sequence_length = 1 - self.seed = seed - self.brain = brain - self.variable_scope = trainer_parameters['graph_scope'] - self.use_recurrent = trainer_parameters["use_recurrent"] - self.use_continuous_act = (brain.vector_action_space_type == "continuous") - self.sess = sess - if self.use_recurrent: - self.m_size = trainer_parameters["memory_size"] - self.sequence_length = trainer_parameters["sequence_length"] - if self.m_size == 0: - raise UnityPolicyException("The memory size for brain {0} is 0 even " - "though the trainer uses recurrent." - .format(brain.brain_name)) - elif self.m_size % 4 != 0: - raise UnityPolicyException("The memory size for brain {0} is {1} " - "but it must be divisible by 4." - .format(brain.brain_name, self.m_size)) - - def evaluate(self, brain_info): - """ - Evaluates policy for the agent experiences provided. - :param brain_info: BrainInfo input to network. - :return: Output from policy based on self.inference_dict. - """ - raise UnityPolicyException("The evaluate function was not implemented.") - - def update(self, mini_batch, num_sequences): - """ - Performs update of the policy. - :param num_sequences: Number of experience trajectories in batch. - :param mini_batch: Batch of experiences. - :return: Results of update. - """ - raise UnityPolicyException("The update function was not implemented.") - - def _execute_model(self, feed_dict, out_dict): - """ - Executes model. - :param feed_dict: Input dictionary mapping nodes to input data. - :param out_dict: Output dictionary mapping names to nodes. - :return: Dictionary mapping names to input data. - """ - network_out = self.sess.run(list(out_dict.values()), feed_dict=feed_dict) - run_out = dict(zip(list(out_dict.keys()), network_out)) - return run_out - - def _fill_eval_dict(self, feed_dict, brain_info): - for i, _ in enumerate(brain_info.visual_observations): - feed_dict[self.model.visual_in[i]] = brain_info.visual_observations[i] - if self.use_vec_obs: - feed_dict[self.model.vector_in] = brain_info.vector_observations - if not self.use_continuous_act: - feed_dict[self.model.action_masks] = brain_info.action_masks - return feed_dict - - def make_empty_memory(self, num_agents): - """ - Creates empty memory for use with RNNs - :param num_agents: Number of agents. - :return: Numpy array of zeros. - """ - return np.zeros((num_agents, self.m_size)) - - @property - def graph_scope(self): - """ - Returns the graph scope of the trainer. - """ - return self.variable_scope - - def get_current_step(self): - """ - Gets current model step. - :return: current model step. - """ - step = self.sess.run(self.model.global_step) - return step - - def increment_step(self): - """ - Increments model step. - """ - self.sess.run(self.model.increment_step) - - def get_inference_vars(self): - """ - :return:list of inference var names - """ - return list(self.inference_dict.keys()) - - def get_update_vars(self): - """ - :return:list of update var names - """ - return list(self.update_dict.keys()) - - @property - def vis_obs_size(self): - return self.model.vis_obs_size - - @property - def vec_obs_size(self): - return self.model.vec_obs_size - - @property - def use_vis_obs(self): - return self.model.vis_obs_size > 0 - - @property - def use_vec_obs(self): - return self.model.vec_obs_size > 0 diff --git a/ml-agents/mlagents/trainers/ppo/policy.py b/ml-agents/mlagents/trainers/ppo/policy.py deleted file mode 100644 index d810e89eff..0000000000 --- a/ml-agents/mlagents/trainers/ppo/policy.py +++ /dev/null @@ -1,198 +0,0 @@ -import logging - -import numpy as np -from mlagents.trainers.ppo.models import PPOModel -from mlagents.trainers.policy import Policy - -logger = logging.getLogger("mlagents.trainers") - - -class PPOPolicy(Policy): - def __init__(self, seed, brain, trainer_params, sess, is_training): - """ - Policy for Proximal Policy Optimization Networks. - :param seed: Random seed. - :param brain: Assigned Brain object. - :param trainer_params: Defined training parameters. - :param sess: TensorFlow session. - :param is_training: Whether the model should be trained. - """ - super().__init__(seed, brain, trainer_params, sess) - self.has_updated = False - self.use_curiosity = bool(trainer_params['use_curiosity']) - self.model = PPOModel(brain, - lr=float(trainer_params['learning_rate']), - h_size=int(trainer_params['hidden_units']), - epsilon=float(trainer_params['epsilon']), - beta=float(trainer_params['beta']), - max_step=float(trainer_params['max_steps']), - normalize=trainer_params['normalize'], - use_recurrent=trainer_params['use_recurrent'], - num_layers=int(trainer_params['num_layers']), - m_size=self.m_size, - use_curiosity=bool(trainer_params['use_curiosity']), - curiosity_strength=float(trainer_params['curiosity_strength']), - curiosity_enc_size=float(trainer_params['curiosity_enc_size']), - scope=self.variable_scope, seed=seed) - - self.inference_dict = {'action': self.model.output, 'log_probs': self.model.all_log_probs, - 'value': self.model.value, 'entropy': self.model.entropy, - 'learning_rate': self.model.learning_rate} - if self.use_continuous_act: - self.inference_dict['pre_action'] = self.model.output_pre - if self.use_recurrent: - self.inference_dict['memory_out'] = self.model.memory_out - if is_training and self.use_vec_obs and trainer_params['normalize']: - self.inference_dict['update_mean'] = self.model.update_mean - self.inference_dict['update_variance'] = self.model.update_variance - - self.update_dict = {'value_loss': self.model.value_loss, - 'policy_loss': self.model.policy_loss, - 'update_batch': self.model.update_batch} - if self.use_curiosity: - self.update_dict['forward_loss'] = self.model.forward_loss - self.update_dict['inverse_loss'] = self.model.inverse_loss - - def evaluate(self, brain_info): - """ - Evaluates policy for the agent experiences provided. - :param brain_info: BrainInfo object containing inputs. - :return: Outputs from network as defined by self.inference_dict. - """ - feed_dict = {self.model.batch_size: len(brain_info.vector_observations), - self.model.sequence_length: 1} - if self.use_recurrent: - if not self.use_continuous_act: - feed_dict[self.model.prev_action] = brain_info.previous_vector_actions.reshape( - [-1, len(self.model.act_size)]) - if brain_info.memories.shape[1] == 0: - brain_info.memories = self.make_empty_memory(len(brain_info.agents)) - feed_dict[self.model.memory_in] = brain_info.memories - feed_dict = self._fill_eval_dict(feed_dict, brain_info) - run_out = self._execute_model(feed_dict, self.inference_dict) - return run_out - - def update(self, mini_batch, num_sequences): - """ - Updates model using buffer. - :param num_sequences: Number of trajectories in batch. - :param mini_batch: Experience batch. - :return: Output from update process. - """ - feed_dict = {self.model.batch_size: num_sequences, - self.model.sequence_length: self.sequence_length, - self.model.mask_input: mini_batch['masks'].flatten(), - self.model.returns_holder: mini_batch['discounted_returns'].flatten(), - self.model.old_value: mini_batch['value_estimates'].flatten(), - self.model.advantage: mini_batch['advantages'].reshape([-1, 1]), - self.model.all_old_log_probs: mini_batch['action_probs'].reshape( - [-1, sum(self.model.act_size)])} - if self.use_continuous_act: - feed_dict[self.model.output_pre] = mini_batch['actions_pre'].reshape( - [-1, self.model.act_size[0]]) - else: - feed_dict[self.model.action_holder] = mini_batch['actions'].reshape( - [-1, len(self.model.act_size)]) - if self.use_recurrent: - feed_dict[self.model.prev_action] = mini_batch['prev_action'].reshape( - [-1, len(self.model.act_size)]) - feed_dict[self.model.action_masks] = mini_batch['action_mask'].reshape( - [-1, sum(self.brain.vector_action_space_size)]) - if self.use_vec_obs: - feed_dict[self.model.vector_in] = mini_batch['vector_obs'].reshape( - [-1, self.vec_obs_size]) - if self.use_curiosity: - feed_dict[self.model.next_vector_in] = mini_batch['next_vector_in'].reshape( - [-1, self.vec_obs_size]) - if self.model.vis_obs_size > 0: - for i, _ in enumerate(self.model.visual_in): - _obs = mini_batch['visual_obs%d' % i] - if self.sequence_length > 1 and self.use_recurrent: - (_batch, _seq, _w, _h, _c) = _obs.shape - feed_dict[self.model.visual_in[i]] = _obs.reshape([-1, _w, _h, _c]) - else: - feed_dict[self.model.visual_in[i]] = _obs - if self.use_curiosity: - for i, _ in enumerate(self.model.visual_in): - _obs = mini_batch['next_visual_obs%d' % i] - if self.sequence_length > 1 and self.use_recurrent: - (_batch, _seq, _w, _h, _c) = _obs.shape - feed_dict[self.model.next_visual_in[i]] = _obs.reshape([-1, _w, _h, _c]) - else: - feed_dict[self.model.next_visual_in[i]] = _obs - if self.use_recurrent: - mem_in = mini_batch['memory'][:, 0, :] - feed_dict[self.model.memory_in] = mem_in - self.has_updated = True - run_out = self._execute_model(feed_dict, self.update_dict) - return run_out - - def get_intrinsic_rewards(self, curr_info, next_info): - """ - Generates intrinsic reward used for Curiosity-based training. - :BrainInfo curr_info: Current BrainInfo. - :BrainInfo next_info: Next BrainInfo. - :return: Intrinsic rewards for all agents. - """ - if self.use_curiosity: - if len(curr_info.agents) == 0: - return [] - - feed_dict = {self.model.batch_size: len(next_info.vector_observations), - self.model.sequence_length: 1} - if self.use_continuous_act: - feed_dict[self.model.output] = next_info.previous_vector_actions - else: - feed_dict[self.model.action_holder] = next_info.previous_vector_actions - for i in range(self.model.vis_obs_size): - feed_dict[self.model.visual_in[i]] = curr_info.visual_observations[i] - feed_dict[self.model.next_visual_in[i]] = next_info.visual_observations[i] - if self.use_vec_obs: - feed_dict[self.model.vector_in] = curr_info.vector_observations - feed_dict[self.model.next_vector_in] = next_info.vector_observations - if self.use_recurrent: - if curr_info.memories.shape[1] == 0: - curr_info.memories = self.make_empty_memory(len(curr_info.agents)) - feed_dict[self.model.memory_in] = curr_info.memories - intrinsic_rewards = self.sess.run(self.model.intrinsic_reward, - feed_dict=feed_dict) * float(self.has_updated) - return intrinsic_rewards - else: - return None - - def get_value_estimate(self, brain_info, idx): - """ - Generates value estimates for bootstrapping. - :param brain_info: BrainInfo to be used for bootstrapping. - :param idx: Index in BrainInfo of agent. - :return: Value estimate. - """ - feed_dict = {self.model.batch_size: 1, self.model.sequence_length: 1} - for i in range(len(brain_info.visual_observations)): - feed_dict[self.model.visual_in[i]] = [brain_info.visual_observations[i][idx]] - if self.use_vec_obs: - feed_dict[self.model.vector_in] = [brain_info.vector_observations[idx]] - if self.use_recurrent: - if brain_info.memories.shape[1] == 0: - brain_info.memories = self.make_empty_memory(len(brain_info.agents)) - feed_dict[self.model.memory_in] = [brain_info.memories[idx]] - if not self.use_continuous_act and self.use_recurrent: - feed_dict[self.model.prev_action] = brain_info.previous_vector_actions[idx].reshape( - [-1, len(self.model.act_size)]) - value_estimate = self.sess.run(self.model.value, feed_dict) - return value_estimate - - def get_last_reward(self): - """ - Returns the last reward the trainer has had - :return: the new last reward - """ - return self.sess.run(self.model.last_reward) - - def update_reward(self, new_reward): - """ - Updates reward value for policy. - :param new_reward: New reward to save. - """ - self.sess.run(self.model.update_reward, - feed_dict={self.model.new_reward: new_reward}) diff --git a/ml-agents/mlagents/trainers/trainer_controller.py b/ml-agents/mlagents/trainers/trainer_controller.py deleted file mode 100644 index b4d2e4f854..0000000000 --- a/ml-agents/mlagents/trainers/trainer_controller.py +++ /dev/null @@ -1,408 +0,0 @@ -# # Unity ML-Agents Toolkit -# ## ML-Agent Learning -"""Launches trainers for each External Brains in a Unity Environment.""" - -import os -import logging - -import yaml -import re -import numpy as np -import tensorflow as tf -from tensorflow.python.tools import freeze_graph -from mlagents.envs.environment import UnityEnvironment -from mlagents.envs.exception import UnityEnvironmentException - -from mlagents.trainers.ppo.trainer import PPOTrainer -from mlagents.trainers.bc.trainer import BehavioralCloningTrainer -from mlagents.trainers.meta_curriculum import MetaCurriculum -from mlagents.trainers.exception import MetaCurriculumError - - -class TrainerController(object): - def __init__(self, env_path, run_id, save_freq, curriculum_folder, - fast_simulation, load, train, worker_id, keep_checkpoints, - lesson, seed, docker_target_name, - trainer_config_path, no_graphics): - """ - :param env_path: Location to the environment executable to be loaded. - :param run_id: The sub-directory name for model and summary statistics - :param save_freq: Frequency at which to save model - :param curriculum_folder: Folder containing JSON curriculums for the - environment. - :param fast_simulation: Whether to run the game at training speed. - :param load: Whether to load the model or randomly initialize. - :param train: Whether to train model, or only run inference. - :param worker_id: Number to add to communication port (5005). - Used for multi-environment - :param keep_checkpoints: How many model checkpoints to keep. - :param lesson: Start learning from this lesson. - :param seed: Random seed used for training. - :param docker_target_name: Name of docker volume that will contain all - data. - :param trainer_config_path: Fully qualified path to location of trainer - configuration file. - :param no_graphics: Whether to run the Unity simulator in no-graphics - mode. - """ - if env_path is not None: - # Strip out executable extensions if passed - env_path = (env_path.strip() - .replace('.app', '') - .replace('.exe', '') - .replace('.x86_64', '') - .replace('.x86', '')) - - # Recognize and use docker volume if one is passed as an argument - if not docker_target_name: - self.docker_training = False - self.trainer_config_path = trainer_config_path - self.model_path = './models/{run_id}'.format(run_id=run_id) - self.curriculum_folder = curriculum_folder - self.summaries_dir = './summaries' - else: - self.docker_training = True - self.trainer_config_path = \ - '/{docker_target_name}/{trainer_config_path}'.format( - docker_target_name=docker_target_name, - trainer_config_path = trainer_config_path) - self.model_path = '/{docker_target_name}/models/{run_id}'.format( - docker_target_name=docker_target_name, - run_id=run_id) - if env_path is not None: - env_path = '/{docker_target_name}/{env_name}'.format( - docker_target_name=docker_target_name, env_name=env_path) - if curriculum_folder is not None: - self.curriculum_folder = \ - '/{docker_target_name}/{curriculum_folder}'.format( - docker_target_name=docker_target_name, - curriculum_folder=curriculum_folder) - - self.summaries_dir = '/{docker_target_name}/summaries'.format( - docker_target_name=docker_target_name) - - self.logger = logging.getLogger('mlagents.envs') - self.run_id = run_id - self.save_freq = save_freq - self.lesson = lesson - self.fast_simulation = fast_simulation - self.load_model = load - self.train_model = train - self.worker_id = worker_id - self.keep_checkpoints = keep_checkpoints - self.trainers = {} - self.seed = seed - np.random.seed(self.seed) - tf.set_random_seed(self.seed) - self.env = UnityEnvironment(file_name=env_path, - worker_id=self.worker_id, - seed=self.seed, - docker_training=self.docker_training, - no_graphics=no_graphics) - if env_path is None: - self.env_name = 'editor_' + self.env.academy_name - else: - # Extract out name of environment - self.env_name = os.path.basename(os.path.normpath(env_path)) - - if curriculum_folder is None: - self.meta_curriculum = None - else: - self.meta_curriculum = MetaCurriculum(self.curriculum_folder, - self.env._resetParameters) - - if self.meta_curriculum: - for brain_name in self.meta_curriculum.brains_to_curriculums.keys(): - if brain_name not in self.env.external_brain_names: - raise MetaCurriculumError('One of the curriculums ' - 'defined in ' + - self.curriculum_folder + ' ' - 'does not have a corresponding ' - 'Brain. Check that the ' - 'curriculum file has the same ' - 'name as the Brain ' - 'whose curriculum it defines.') - - def _get_measure_vals(self): - if self.meta_curriculum: - brain_names_to_measure_vals = {} - for brain_name, curriculum \ - in self.meta_curriculum.brains_to_curriculums.items(): - if curriculum.measure == 'progress': - measure_val = (self.trainers[brain_name].get_step / - self.trainers[brain_name].get_max_steps) - brain_names_to_measure_vals[brain_name] = measure_val - elif curriculum.measure == 'reward': - measure_val = np.mean(self.trainers[brain_name] - .reward_buffer) - brain_names_to_measure_vals[brain_name] = measure_val - return brain_names_to_measure_vals - else: - return None - - def _process_graph(self): - nodes = [] - scopes = [] - for brain_name in self.trainers.keys(): - if self.trainers[brain_name].policy.graph_scope is not None: - scope = self.trainers[brain_name].policy.graph_scope + '/' - if scope == '/': - scope = '' - scopes += [scope] - if self.trainers[brain_name].parameters['trainer'] \ - == 'imitation': - nodes += [scope + x for x in ['action']] - else: - nodes += [scope + x for x in ['action', 'value_estimate', - 'action_probs', - 'value_estimate']] - if self.trainers[brain_name].parameters['use_recurrent']: - nodes += [scope + x for x in ['recurrent_out', - 'memory_size']] - if len(scopes) > 1: - self.logger.info('List of available scopes :') - for scope in scopes: - self.logger.info('\t' + scope) - self.logger.info('List of nodes to export :') - for n in nodes: - self.logger.info('\t' + n) - return nodes - - def _save_model(self, sess, saver, steps=0): - """ - Saves current model to checkpoint folder. - :param sess: Current Tensorflow session. - :param steps: Current number of steps in training process. - :param saver: Tensorflow saver for session. - """ - last_checkpoint = self.model_path + '/model-' + str(steps) + '.cptk' - saver.save(sess, last_checkpoint) - tf.train.write_graph(sess.graph_def, self.model_path, - 'raw_graph_def.pb', as_text=False) - self.logger.info('Saved Model') - - def _export_graph(self): - """ - Exports latest saved model to .bytes format for Unity embedding. - """ - target_nodes = ','.join(self._process_graph()) - ckpt = tf.train.get_checkpoint_state(self.model_path) - freeze_graph.freeze_graph( - input_graph=self.model_path + '/raw_graph_def.pb', - input_binary=True, - input_checkpoint=ckpt.model_checkpoint_path, - output_node_names=target_nodes, - output_graph=(self.model_path + '/' + self.env_name + '_' - + self.run_id + '.bytes'), - clear_devices=True, initializer_nodes='', input_saver='', - restore_op_name='save/restore_all', - filename_tensor_name='save/Const:0') - - def _initialize_trainers(self, trainer_config, sess): - trainer_parameters_dict = {} - # TODO: This probably doesn't need to be reinitialized. - self.trainers = {} - for brain_name in self.env.external_brain_names: - trainer_parameters = trainer_config['default'].copy() - if len(self.env.external_brain_names) > 1: - graph_scope = re.sub('[^0-9a-zA-Z]+', '-', brain_name) - trainer_parameters['graph_scope'] = graph_scope - trainer_parameters['summary_path'] = '{basedir}/{name}'.format( - basedir=self.summaries_dir, - name=str(self.run_id) + '_' + graph_scope) - else: - trainer_parameters['graph_scope'] = '' - trainer_parameters['summary_path'] = '{basedir}/{name}'.format( - basedir=self.summaries_dir, - name=str(self.run_id)) - if brain_name in trainer_config: - _brain_key = brain_name - while not isinstance(trainer_config[_brain_key], dict): - _brain_key = trainer_config[_brain_key] - for k in trainer_config[_brain_key]: - trainer_parameters[k] = trainer_config[_brain_key][k] - trainer_parameters_dict[brain_name] = trainer_parameters.copy() - for brain_name in self.env.external_brain_names: - if trainer_parameters_dict[brain_name]['trainer'] == 'imitation': - self.trainers[brain_name] = BehavioralCloningTrainer( - sess, self.env.brains[brain_name], - trainer_parameters_dict[brain_name], self.train_model, - self.seed, self.run_id) - elif trainer_parameters_dict[brain_name]['trainer'] == 'ppo': - self.trainers[brain_name] = PPOTrainer( - sess, self.env.brains[brain_name], - self.meta_curriculum - .brains_to_curriculums[brain_name] - .min_lesson_length if self.meta_curriculum else 0, - trainer_parameters_dict[brain_name], - self.train_model, self.seed, self.run_id) - else: - raise UnityEnvironmentException('The trainer config contains ' - 'an unknown trainer type for ' - 'brain {}' - .format(brain_name)) - - def _load_config(self): - try: - with open(self.trainer_config_path) as data_file: - trainer_config = yaml.load(data_file) - return trainer_config - except IOError: - raise UnityEnvironmentException('Parameter file could not be found ' - 'at {}.' - .format(self.trainer_config_path)) - except UnicodeDecodeError: - raise UnityEnvironmentException('There was an error decoding ' - 'Trainer Config from this path : {}' - .format(self.trainer_config_path)) - - @staticmethod - def _create_model_path(model_path): - try: - if not os.path.exists(model_path): - os.makedirs(model_path) - except Exception: - raise UnityEnvironmentException('The folder {} containing the ' - 'generated model could not be ' - 'accessed. Please make sure the ' - 'permissions are set correctly.' - .format(model_path)) - - def _reset_env(self): - """Resets the environment. - - Returns: - A Data structure corresponding to the initial reset state of the - environment. - """ - if self.meta_curriculum is not None: - return self.env.reset(config=self.meta_curriculum.get_config(), - train_mode=self.fast_simulation) - else: - return self.env.reset(train_mode=self.fast_simulation) - - def start_learning(self): - # TODO: Should be able to start learning at different lesson numbers - # for each curriculum. - if self.meta_curriculum is not None: - self.meta_curriculum.set_all_curriculums_to_lesson_num(self.lesson) - trainer_config = self._load_config() - self._create_model_path(self.model_path) - - tf.reset_default_graph() - - # Prevent a single session from taking all GPU memory. - config = tf.ConfigProto() - config.gpu_options.allow_growth = True - with tf.Session(config=config) as sess: - self._initialize_trainers(trainer_config, sess) - for _, t in self.trainers.items(): - self.logger.info(t) - init = tf.global_variables_initializer() - saver = tf.train.Saver(max_to_keep=self.keep_checkpoints) - # Instantiate model parameters - if self.load_model: - self.logger.info('Loading Model...') - ckpt = tf.train.get_checkpoint_state(self.model_path) - if ckpt is None: - self.logger.info('The model {0} could not be found. Make ' - 'sure you specified the right ' - '--run-id' - .format(self.model_path)) - saver.restore(sess, ckpt.model_checkpoint_path) - else: - sess.run(init) - global_step = 0 # This is only for saving the model - curr_info = self._reset_env() - if self.train_model: - for brain_name, trainer in self.trainers.items(): - trainer.write_tensorboard_text('Hyperparameters', - trainer.parameters) - try: - while any([t.get_step <= t.get_max_steps \ - for k, t in self.trainers.items()]) \ - or not self.train_model: - if self.meta_curriculum: - # Get the sizes of the reward buffers. - reward_buff_sizes = {k:len(t.reward_buffer) \ - for (k,t) in self.trainers.items()} - # Attempt to increment the lessons of the brains who - # were ready. - lessons_incremented = \ - self.meta_curriculum.increment_lessons( - self._get_measure_vals(), - reward_buff_sizes=reward_buff_sizes) - - # If any lessons were incremented or the environment is - # ready to be reset - if (self.meta_curriculum - and any(lessons_incremented.values())): - curr_info = self._reset_env() - for brain_name, trainer in self.trainers.items(): - trainer.end_episode() - for brain_name, changed in lessons_incremented.items(): - if changed: - self.trainers[brain_name].reward_buffer.clear() - elif self.env.global_done: - curr_info = self._reset_env() - for brain_name, trainer in self.trainers.items(): - trainer.end_episode() - - # Decide and take an action - take_action_vector, \ - take_action_memories, \ - take_action_text, \ - take_action_value, \ - take_action_outputs \ - = {}, {}, {}, {}, {} - for brain_name, trainer in self.trainers.items(): - (take_action_vector[brain_name], - take_action_memories[brain_name], - take_action_text[brain_name], - take_action_value[brain_name], - take_action_outputs[brain_name]) = \ - trainer.take_action(curr_info) - new_info = self.env.step(vector_action=take_action_vector, - memory=take_action_memories, - text_action=take_action_text, - value=take_action_value) - for brain_name, trainer in self.trainers.items(): - trainer.add_experiences(curr_info, new_info, - take_action_outputs[brain_name]) - trainer.process_experiences(curr_info, new_info) - if trainer.is_ready_update() and self.train_model \ - and trainer.get_step <= trainer.get_max_steps: - # Perform gradient descent with experience buffer - trainer.update_policy() - # Write training statistics to Tensorboard. - if self.meta_curriculum is not None: - trainer.write_summary( - global_step, - lesson_num=self.meta_curriculum - .brains_to_curriculums[brain_name] - .lesson_num) - else: - trainer.write_summary(global_step) - if self.train_model \ - and trainer.get_step <= trainer.get_max_steps: - trainer.increment_step_and_update_last_reward() - global_step += 1 - if global_step % self.save_freq == 0 and global_step != 0 \ - and self.train_model: - # Save Tensorflow model - self._save_model(sess, steps=global_step, saver=saver) - curr_info = new_info - # Final save Tensorflow model - if global_step != 0 and self.train_model: - self._save_model(sess, steps=global_step, saver=saver) - except KeyboardInterrupt: - print('--------------------------Now saving model--------------' - '-----------') - if self.train_model: - self.logger.info('Learning was interrupted. Please wait ' - 'while the graph is generated.') - self._save_model(sess, steps=global_step, saver=saver) - pass - self.env.close() - if self.train_model: - self._export_graph() diff --git a/ml-agents/setup.py b/ml-agents/setup.py deleted file mode 100644 index 83852da686..0000000000 --- a/ml-agents/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -from setuptools import setup, find_packages -from os import path -from io import open - -here = path.abspath(path.dirname(__file__)) - -# Get the long description from the README file -with open(path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = f.read() - -setup( - name='mlagents', - version='0.5.0', - description='Unity Machine Learning Agents', - long_description=long_description, - long_description_content_type='text/markdown', - url='https://github.com/Unity-Technologies/ml-agents', - author='Unity Technologies', - author_email='ML-Agents@unity3d.com', - - classifiers=[ - 'Intended Audience :: Developers', - 'Topic :: Scientific/Engineering :: Artificial Intelligence', - 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python :: 3.6' - ], - - packages=find_packages(exclude=['tests', 'tests.*', '*.tests', '*.tests.*']), # Required - - install_requires=[ - 'tensorflow>=1.7,<1.8', - 'Pillow>=4.2.1', - 'matplotlib', - 'numpy>=1.13.3,<=1.14.5', - 'jupyter', - 'pytest>=3.2.2', - 'docopt', - 'pyyaml', - 'protobuf>=3.6,<3.7', - 'grpcio>=1.11.0,<1.12.0'], - - python_requires=">=3.6,<3.7", - - entry_points={ - 'console_scripts': [ - 'mlagents-learn=mlagents.trainers.learn:main', - ], - }, -) diff --git a/ml-agents/tests/__init__.py b/ml-agents/tests/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ml-agents/tests/envs/__init__.py b/ml-agents/tests/envs/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ml-agents/tests/envs/test_envs.py b/ml-agents/tests/envs/test_envs.py deleted file mode 100755 index 2acebd3a3c..0000000000 --- a/ml-agents/tests/envs/test_envs.py +++ /dev/null @@ -1,95 +0,0 @@ -import unittest.mock as mock -import pytest -import struct - -import numpy as np - -from mlagents.envs import UnityEnvironment, UnityEnvironmentException, UnityActionException, \ - BrainInfo -from tests.mock_communicator import MockCommunicator - - -def test_handles_bad_filename(): - with pytest.raises(UnityEnvironmentException): - UnityEnvironment(' ') - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_initialization(mock_communicator, mock_launcher): - mock_communicator.return_value = MockCommunicator( - discrete_action=False, visual_inputs=0) - env = UnityEnvironment(' ') - with pytest.raises(UnityActionException): - env.step([0]) - assert env.brain_names[0] == 'RealFakeBrain' - env.close() - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_reset(mock_communicator, mock_launcher): - mock_communicator.return_value = MockCommunicator( - discrete_action=False, visual_inputs=0) - env = UnityEnvironment(' ') - brain = env.brains['RealFakeBrain'] - brain_info = env.reset() - env.close() - assert not env.global_done - assert isinstance(brain_info, dict) - assert isinstance(brain_info['RealFakeBrain'], BrainInfo) - assert isinstance(brain_info['RealFakeBrain'].visual_observations, list) - assert isinstance(brain_info['RealFakeBrain'].vector_observations, np.ndarray) - assert len(brain_info['RealFakeBrain'].visual_observations) == brain.number_visual_observations - assert brain_info['RealFakeBrain'].vector_observations.shape[0] == \ - len(brain_info['RealFakeBrain'].agents) - assert brain_info['RealFakeBrain'].vector_observations.shape[1] == \ - brain.vector_observation_space_size * brain.num_stacked_vector_observations - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_step(mock_communicator, mock_launcher): - mock_communicator.return_value = MockCommunicator( - discrete_action=False, visual_inputs=0) - env = UnityEnvironment(' ') - brain = env.brains['RealFakeBrain'] - brain_info = env.reset() - brain_info = env.step([0] * brain.vector_action_space_size[0] * len(brain_info['RealFakeBrain'].agents)) - with pytest.raises(UnityActionException): - env.step([0]) - brain_info = env.step([-1] * brain.vector_action_space_size[0] * len(brain_info['RealFakeBrain'].agents)) - with pytest.raises(UnityActionException): - env.step([0] * brain.vector_action_space_size[0] * len(brain_info['RealFakeBrain'].agents)) - env.close() - assert env.global_done - assert isinstance(brain_info, dict) - assert isinstance(brain_info['RealFakeBrain'], BrainInfo) - assert isinstance(brain_info['RealFakeBrain'].visual_observations, list) - assert isinstance(brain_info['RealFakeBrain'].vector_observations, np.ndarray) - assert len(brain_info['RealFakeBrain'].visual_observations) == brain.number_visual_observations - assert brain_info['RealFakeBrain'].vector_observations.shape[0] == \ - len(brain_info['RealFakeBrain'].agents) - assert brain_info['RealFakeBrain'].vector_observations.shape[1] == \ - brain.vector_observation_space_size * brain.num_stacked_vector_observations - - print("\n\n\n\n\n\n\n" + str(brain_info['RealFakeBrain'].local_done)) - assert not brain_info['RealFakeBrain'].local_done[0] - assert brain_info['RealFakeBrain'].local_done[2] - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_close(mock_communicator, mock_launcher): - comm = MockCommunicator( - discrete_action=False, visual_inputs=0) - mock_communicator.return_value = comm - env = UnityEnvironment(' ') - assert env._loaded - env.close() - assert not env._loaded - assert comm.has_been_closed - - -if __name__ == '__main__': - pytest.main() diff --git a/ml-agents/tests/trainers/__init__.py b/ml-agents/tests/trainers/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ml-agents/tests/trainers/test_buffer.py b/ml-agents/tests/trainers/test_buffer.py deleted file mode 100644 index 280d67843a..0000000000 --- a/ml-agents/tests/trainers/test_buffer.py +++ /dev/null @@ -1,45 +0,0 @@ -import numpy as np -from mlagents.trainers.buffer import Buffer - - -def assert_array(a, b): - assert a.shape == b.shape - la = list(a.flatten()) - lb = list(b.flatten()) - for i in range(len(la)): - assert la[i] == lb[i] - - -def test_buffer(): - b = Buffer() - for fake_agent_id in range(4): - for step in range(9): - b[fake_agent_id]['vector_observation'].append( - [100 * fake_agent_id + 10 * step + 1, - 100 * fake_agent_id + 10 * step + 2, - 100 * fake_agent_id + 10 * step + 3] - ) - b[fake_agent_id]['action'].append([100 * fake_agent_id + 10 * step + 4, - 100 * fake_agent_id + 10 * step + 5]) - a = b[1]['vector_observation'].get_batch(batch_size=2, training_length=1, sequential=True) - assert_array(a, np.array([[171, 172, 173], [181, 182, 183]])) - a = b[2]['vector_observation'].get_batch(batch_size=2, training_length=3, sequential=True) - assert_array(a, np.array([ - [[231, 232, 233], [241, 242, 243], [251, 252, 253]], - [[261, 262, 263], [271, 272, 273], [281, 282, 283]] - ])) - a = b[2]['vector_observation'].get_batch(batch_size=2, training_length=3, sequential=False) - assert_array(a, np.array([ - [[251, 252, 253], [261, 262, 263], [271, 272, 273]], - [[261, 262, 263], [271, 272, 273], [281, 282, 283]] - ])) - b[4].reset_agent() - assert len(b[4]) == 0 - b.append_update_buffer(3, batch_size=None, training_length=2) - b.append_update_buffer(2, batch_size=None, training_length=2) - assert len(b.update_buffer['action']) == 10 - assert np.array(b.update_buffer['action']).shape == (10, 2, 2) - - c = b.update_buffer.make_mini_batch(start=0, end=1) - assert c.keys() == b.update_buffer.keys() - assert c['action'].shape == (1, 2, 2) diff --git a/ml-agents/tests/trainers/test_curriculum.py b/ml-agents/tests/trainers/test_curriculum.py deleted file mode 100644 index 3900085892..0000000000 --- a/ml-agents/tests/trainers/test_curriculum.py +++ /dev/null @@ -1,93 +0,0 @@ -import pytest -import json -from unittest.mock import patch, mock_open - -from mlagents.trainers.exception import CurriculumError -from mlagents.trainers import Curriculum - - -dummy_curriculum_json_str = ''' - { - "measure" : "reward", - "thresholds" : [10, 20, 50], - "min_lesson_length" : 3, - "signal_smoothing" : true, - "parameters" : - { - "param1" : [0.7, 0.5, 0.3, 0.1], - "param2" : [100, 50, 20, 15], - "param3" : [0.2, 0.3, 0.7, 0.9] - } - } - ''' - - -bad_curriculum_json_str = ''' - { - "measure" : "reward", - "thresholds" : [10, 20, 50], - "min_lesson_length" : 3, - "signal_smoothing" : false, - "parameters" : - { - "param1" : [0.7, 0.5, 0.3, 0.1], - "param2" : [100, 50, 20], - "param3" : [0.2, 0.3, 0.7, 0.9] - } - } - ''' - -@pytest.fixture -def location(): - return 'TestBrain.json' - - -@pytest.fixture -def default_reset_parameters(): - return {"param1": 1, "param2": 1, "param3": 1} - - -@patch('builtins.open', new_callable=mock_open, read_data=dummy_curriculum_json_str) -def test_init_curriculum_happy_path(mock_file, location, default_reset_parameters): - curriculum = Curriculum(location, default_reset_parameters) - - assert curriculum._brain_name == 'TestBrain' - assert curriculum.lesson_num == 0 - assert curriculum.measure == 'reward' - - -@patch('builtins.open', new_callable=mock_open, read_data=bad_curriculum_json_str) -def test_init_curriculum_bad_curriculum_raises_error(mock_file, location, default_reset_parameters): - with pytest.raises(CurriculumError): - Curriculum(location, default_reset_parameters) - - -@patch('builtins.open', new_callable=mock_open, read_data=dummy_curriculum_json_str) -def test_increment_lesson(mock_file, location, default_reset_parameters): - curriculum = Curriculum(location, default_reset_parameters) - assert curriculum.lesson_num == 0 - - curriculum.lesson_num = 1 - assert curriculum.lesson_num == 1 - - assert not curriculum.increment_lesson(10) - assert curriculum.lesson_num == 1 - - assert curriculum.increment_lesson(30) - assert curriculum.lesson_num == 2 - - assert not curriculum.increment_lesson(30) - assert curriculum.lesson_num == 2 - - assert curriculum.increment_lesson(10000) - assert curriculum.lesson_num == 3 - - -@patch('builtins.open', new_callable=mock_open, read_data=dummy_curriculum_json_str) -def test_get_config(mock_file): - curriculum = Curriculum('TestBrain.json', {"param1": 1, "param2": 1, "param3": 1}) - assert curriculum.get_config() == {"param1": 0.7, "param2": 100, "param3": 0.2} - - curriculum.lesson_num = 2 - assert curriculum.get_config() == {'param1': 0.3, 'param2': 20, 'param3': 0.7} - assert curriculum.get_config(0) == {"param1": 0.7, "param2": 100, "param3": 0.2} diff --git a/ml-agents/tests/trainers/test_meta_curriculum.py b/ml-agents/tests/trainers/test_meta_curriculum.py deleted file mode 100644 index 40a4730d93..0000000000 --- a/ml-agents/tests/trainers/test_meta_curriculum.py +++ /dev/null @@ -1,131 +0,0 @@ -import pytest -from unittest.mock import patch, call, Mock - -from mlagents.trainers.meta_curriculum import MetaCurriculum -from mlagents.trainers.exception import MetaCurriculumError - - -class MetaCurriculumTest(MetaCurriculum): - """This class allows us to test MetaCurriculum objects without calling - MetaCurriculum's __init__ function. - """ - def __init__(self, brains_to_curriculums): - self._brains_to_curriculums = brains_to_curriculums - - -@pytest.fixture -def default_reset_parameters(): - return {'param1' : 1, 'param2' : 2, 'param3' : 3} - - -@pytest.fixture -def more_reset_parameters(): - return {'param4' : 4, 'param5' : 5, 'param6' : 6} - - -@pytest.fixture -def measure_vals(): - return {'Brain1' : 0.2, 'Brain2' : 0.3} - - -@pytest.fixture -def reward_buff_sizes(): - return {'Brain1' : 7, 'Brain2' : 8} - - -@patch('mlagents.trainers.Curriculum.get_config', return_value={}) -@patch('mlagents.trainers.Curriculum.__init__', return_value=None) -@patch('os.listdir', return_value=['Brain1.json', 'Brain2.json']) -def test_init_meta_curriculum_happy_path(listdir, mock_curriculum_init, - mock_curriculum_get_config, - default_reset_parameters): - meta_curriculum = MetaCurriculum('test/', default_reset_parameters) - - assert len(meta_curriculum.brains_to_curriculums) == 2 - - assert 'Brain1' in meta_curriculum.brains_to_curriculums - assert 'Brain2' in meta_curriculum.brains_to_curriculums - - calls = [call('test/Brain1.json', default_reset_parameters), - call('test/Brain2.json', default_reset_parameters)] - - mock_curriculum_init.assert_has_calls(calls) - - -@patch('os.listdir', side_effect=NotADirectoryError()) -def test_init_meta_curriculum_bad_curriculum_folder_raises_error(listdir): - with pytest.raises(MetaCurriculumError): - MetaCurriculum('test/', default_reset_parameters) - - -@patch('mlagents.trainers.Curriculum') -@patch('mlagents.trainers.Curriculum') -def test_set_lesson_nums(curriculum_a, curriculum_b): - meta_curriculum = MetaCurriculumTest({'Brain1' : curriculum_a, - 'Brain2' : curriculum_b}) - - meta_curriculum.lesson_nums = {'Brain1' : 1, 'Brain2' : 3} - - assert curriculum_a.lesson_num == 1 - assert curriculum_b.lesson_num == 3 - - - -@patch('mlagents.trainers.Curriculum') -@patch('mlagents.trainers.Curriculum') -def test_increment_lessons(curriculum_a, curriculum_b, measure_vals): - meta_curriculum = MetaCurriculumTest({'Brain1' : curriculum_a, - 'Brain2' : curriculum_b}) - - meta_curriculum.increment_lessons(measure_vals) - - curriculum_a.increment_lesson.assert_called_with(0.2) - curriculum_b.increment_lesson.assert_called_with(0.3) - - -@patch('mlagents.trainers.Curriculum') -@patch('mlagents.trainers.Curriculum') -def test_increment_lessons_with_reward_buff_sizes(curriculum_a, curriculum_b, - measure_vals, - reward_buff_sizes): - curriculum_a.min_lesson_length = 5 - curriculum_b.min_lesson_length = 10 - meta_curriculum = MetaCurriculumTest({'Brain1' : curriculum_a, - 'Brain2' : curriculum_b}) - - meta_curriculum.increment_lessons(measure_vals, - reward_buff_sizes=reward_buff_sizes) - - curriculum_a.increment_lesson.assert_called_with(0.2) - curriculum_b.increment_lesson.assert_not_called() - - -@patch('mlagents.trainers.Curriculum') -@patch('mlagents.trainers.Curriculum') -def test_set_all_curriculums_to_lesson_num(curriculum_a, curriculum_b): - meta_curriculum = MetaCurriculumTest({'Brain1' : curriculum_a, - 'Brain2' : curriculum_b}) - - meta_curriculum.set_all_curriculums_to_lesson_num(2) - - assert curriculum_a.lesson_num == 2 - assert curriculum_b.lesson_num == 2 - - -@patch('mlagents.trainers.Curriculum') -@patch('mlagents.trainers.Curriculum') -def test_get_config(curriculum_a, curriculum_b, default_reset_parameters, - more_reset_parameters): - curriculum_a.get_config.return_value = default_reset_parameters - curriculum_b.get_config.return_value = default_reset_parameters - meta_curriculum = MetaCurriculumTest({'Brain1' : curriculum_a, - 'Brain2' : curriculum_b}) - - assert meta_curriculum.get_config() == default_reset_parameters - - curriculum_b.get_config.return_value = more_reset_parameters - - new_reset_parameters = dict(default_reset_parameters) - new_reset_parameters.update(more_reset_parameters) - - assert meta_curriculum.get_config() == new_reset_parameters diff --git a/ml-agents/tests/trainers/test_trainer_controller.py b/ml-agents/tests/trainers/test_trainer_controller.py deleted file mode 100644 index d7e870b71f..0000000000 --- a/ml-agents/tests/trainers/test_trainer_controller.py +++ /dev/null @@ -1,188 +0,0 @@ -import json -import unittest.mock as mock - -import yaml -import pytest -import tensorflow as tf - -from mlagents.trainers.trainer_controller import TrainerController -from mlagents.trainers.buffer import Buffer -from mlagents.trainers.ppo.trainer import PPOTrainer -from mlagents.trainers.bc.trainer import BehavioralCloningTrainer -from mlagents.trainers.curriculum import Curriculum -from mlagents.trainers.exception import CurriculumError -from mlagents.envs.exception import UnityEnvironmentException -from tests.mock_communicator import MockCommunicator - - -@pytest.fixture -def dummy_start(): - return '''{ "AcademyName": "RealFakeAcademy", - "resetParameters": {}, - "brainNames": ["RealFakeBrain"], - "externalBrainNames": ["RealFakeBrain"], - "logPath":"RealFakePath", - "apiNumber":"API-5", - "brainParameters": [{ - "vectorObservationSize": 3, - "numStackedVectorObservations" : 2, - "vectorActionSize": 2, - "memorySize": 0, - "cameraResolutions": [], - "vectorActionDescriptions": ["",""], - "vectorActionSpaceType": 1 - }] - }'''.encode() - - -@pytest.fixture -def dummy_config(): - return yaml.load( - ''' - default: - trainer: ppo - batch_size: 32 - beta: 5.0e-3 - buffer_size: 512 - epsilon: 0.2 - gamma: 0.99 - hidden_units: 128 - lambd: 0.95 - learning_rate: 3.0e-4 - max_steps: 5.0e4 - normalize: true - num_epoch: 5 - num_layers: 2 - time_horizon: 64 - sequence_length: 64 - summary_freq: 1000 - use_recurrent: false - memory_size: 8 - use_curiosity: false - curiosity_strength: 0.0 - curiosity_enc_size: 1 - ''') - - -@pytest.fixture -def dummy_bc_config(): - return yaml.load( - ''' - default: - trainer: imitation - brain_to_imitate: ExpertBrain - batches_per_epoch: 16 - batch_size: 32 - beta: 5.0e-3 - buffer_size: 512 - epsilon: 0.2 - gamma: 0.99 - hidden_units: 128 - lambd: 0.95 - learning_rate: 3.0e-4 - max_steps: 5.0e4 - normalize: true - num_epoch: 5 - num_layers: 2 - time_horizon: 64 - sequence_length: 64 - summary_freq: 1000 - use_recurrent: false - memory_size: 8 - use_curiosity: false - curiosity_strength: 0.0 - curiosity_enc_size: 1 - ''') - -@pytest.fixture -def dummy_bad_config(): - return yaml.load( - ''' - default: - trainer: incorrect_trainer - brain_to_imitate: ExpertBrain - batches_per_epoch: 16 - batch_size: 32 - beta: 5.0e-3 - buffer_size: 512 - epsilon: 0.2 - gamma: 0.99 - hidden_units: 128 - lambd: 0.95 - learning_rate: 3.0e-4 - max_steps: 5.0e4 - normalize: true - num_epoch: 5 - num_layers: 2 - time_horizon: 64 - sequence_length: 64 - summary_freq: 1000 - use_recurrent: false - memory_size: 8 - ''') - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_initialization(mock_communicator, mock_launcher): - mock_communicator.return_value = MockCommunicator( - discrete_action=True, visual_inputs=1) - tc = TrainerController(' ', ' ', 1, None, True, True, False, 1, - 1, 1, 1, '', "tests/test_mlagents.trainers.py", False) - assert(tc.env.brain_names[0] == 'RealFakeBrain') - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_load_config(mock_communicator, mock_launcher, dummy_config): - open_name = 'mlagents.trainers.trainer_controller' + '.open' - with mock.patch('yaml.load') as mock_load: - with mock.patch(open_name, create=True) as _: - mock_load.return_value = dummy_config - mock_communicator.return_value = MockCommunicator( - discrete_action=True, visual_inputs=1) - mock_load.return_value = dummy_config - tc = TrainerController(' ', ' ', 1, None, True, True, False, 1, - 1, 1, 1, '','', False) - config = tc._load_config() - assert(len(config) == 1) - assert(config['default']['trainer'] == "ppo") - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_initialize_trainers(mock_communicator, mock_launcher, dummy_config, - dummy_bc_config, dummy_bad_config): - open_name = 'mlagents.trainers.trainer_controller' + '.open' - with mock.patch('yaml.load') as mock_load: - with mock.patch(open_name, create=True) as _: - mock_communicator.return_value = MockCommunicator( - discrete_action=True, visual_inputs=1) - tc = TrainerController(' ', ' ', 1, None, True, True, False, 1, 1, - 1, 1, '', "tests/test_mlagents.trainers.py", - False) - - # Test for PPO trainer - mock_load.return_value = dummy_config - config = tc._load_config() - tf.reset_default_graph() - with tf.Session() as sess: - tc._initialize_trainers(config, sess) - assert(len(tc.trainers) == 1) - assert(isinstance(tc.trainers['RealFakeBrain'], PPOTrainer)) - - # Test for Behavior Cloning Trainer - mock_load.return_value = dummy_bc_config - config = tc._load_config() - tf.reset_default_graph() - with tf.Session() as sess: - tc._initialize_trainers(config, sess) - assert(isinstance(tc.trainers['RealFakeBrain'], BehavioralCloningTrainer)) - - # Test for proper exception when trainer name is incorrect - mock_load.return_value = dummy_bad_config - config = tc._load_config() - tf.reset_default_graph() - with tf.Session() as sess: - with pytest.raises(UnityEnvironmentException): - tc._initialize_trainers(config, sess) diff --git a/notebooks/getting-started-gym.ipynb b/notebooks/getting-started-gym.ipynb deleted file mode 100644 index e6e80960c8..0000000000 --- a/notebooks/getting-started-gym.ipynb +++ /dev/null @@ -1,270 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Unity ML-Agents Toolkit\n", - "## Gym Wrapper Basics\n", - "This notebook contains a walkthrough of the basic functions of the Python Gym Wrapper for the Unity ML-Agents toolkit. For instructions on building a Unity environment, see [here](https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Getting-Started-with-Balance-Ball.md)." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Single-Agent Environments\n", - "\n", - "The first five steps show how to use the `UnityEnv` wrapper with single-agent environments. See below step five for how to use with multi-agent environments." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 1. Load dependencies\n", - "\n", - "The following loads the necessary dependencies and checks the Python version (at runtime). ML-Agents Toolkit (v0.3 onwards) requires Python 3." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import matplotlib.pyplot as plt\n", - "import numpy as np\n", - "import sys\n", - "\n", - "from gym_unity.envs import UnityEnv\n", - "\n", - "%matplotlib inline\n", - "\n", - "print(\"Python version:\")\n", - "print(sys.version)\n", - "\n", - "# check Python version\n", - "if (sys.version_info[0] < 3):\n", - " raise Exception(\"ERROR: ML-Agents Toolkit (v0.3 onwards) requires Python 3\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 2. Start the environment\n", - "`UnityEnv` launches and begins communication with the environment when instantiated. We will be using the `GridWorld` environment. You will need to create an `envs` directory within the `/python` subfolder of the repository, and build the GridWorld environment to that directory. For more information on building Unity environments, see [here](../docs/Learning-Environment-Executable.md)." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "env_name = \"../envs/GridWorld\" # Name of the Unity environment binary to launch\n", - "env = UnityEnv(env_name, worker_id=0, use_visual=True)\n", - "\n", - "# Examine environment parameters\n", - "print(str(env))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 3. Examine the observation and state spaces\n", - "We can reset the environment to be provided with an initial observation of the environment." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Reset the environment\n", - "initial_observation = env.reset()\n", - "\n", - "if len(env.observation_space.shape) == 1:\n", - " # Examine the initial vector observation\n", - " print(\"Agent state looks like: \\n{}\".format(initial_observation))\n", - "else:\n", - " # Examine the initial visual observation\n", - " print(\"Agent observations look like:\")\n", - " if env.observation_space.shape[2] == 3:\n", - " plt.imshow(initial_observation[:,:,:])\n", - " else:\n", - " plt.imshow(initial_observation[:,:,0])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 4. Take random actions in the environment\n", - "Once we restart an environment, we can step the environment forward and provide actions to all of the agents within the environment. Here we simply choose random actions using the `env.action_space.sample()` function.\n", - "\n", - "Once this cell is executed, 10 messages will be printed that detail how much reward will be accumulated for the next 10 episodes. The Unity environment will then pause, waiting for further signals telling it what to do next. Thus, not seeing any animation is expected when running this cell." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "for episode in range(10):\n", - " initial_observation = env.reset()\n", - " done = False\n", - " episode_rewards = 0\n", - " while not done:\n", - " observation, reward, done, info = env.step(env.action_space.sample())\n", - " episode_rewards += reward\n", - " print(\"Total reward this episode: {}\".format(episode_rewards))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 5. Close the environment when finished\n", - "When we are finished using an environment, we can close it with the function below." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "env.close()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Multi-Agent Environments\n", - "\n", - "It is also possible to use the gym wrapper with multi-agent environments. For these environments, observations, rewards, and done flags will be provided in a list. Likewise, the environment will expect a list of actions when calling `step(action)`." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 1. Start the environment\n", - "\n", - "We will use the `3DBall` environment for this walkthrough. For more information on building Unity environments, see [here](../docs/Learning-Environment-Executable.md). We will launch it from the `python/envs` sub-directory of the repo. Please create an `envs` folder if one does not already exist." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Name of the Unity environment binary to launch\n", - "multi_env_name = \"../envs/3DBall\" \n", - "multi_env = UnityEnv(multi_env_name, worker_id=1, \n", - " use_visual=False, multiagent=True)\n", - "\n", - "# Examine environment parameters\n", - "print(str(multi_env))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 2. Examine the observation space " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Reset the environment\n", - "initial_observations = multi_env.reset()\n", - "\n", - "if len(multi_env.observation_space.shape) == 1:\n", - " # Examine the initial vector observation\n", - " print(\"Agent observations look like: \\n{}\".format(initial_observations[0]))\n", - "else:\n", - " # Examine the initial visual observation\n", - " print(\"Agent observations look like:\")\n", - " if multi_env.observation_space.shape[2] == 3:\n", - " plt.imshow(initial_observations[0][:,:,:])\n", - " else:\n", - " plt.imshow(initial_observations[0][:,:,0])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 3. Take random steps in the environment" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "for episode in range(10):\n", - " initial_observation = multi_env.reset()\n", - " done = False\n", - " episode_rewards = 0\n", - " while not done:\n", - " actions = [multi_env.action_space.sample() for agent in range(multi_env.number_agents)]\n", - " observations, rewards, dones, info = multi_env.step(actions)\n", - " episode_rewards += np.mean(rewards)\n", - " done = dones[0]\n", - " print(\"Total reward this episode: {}\".format(episode_rewards))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 4. Close the environment" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "multi_env.close()" - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/protobuf-definitions/README.md b/protobuf-definitions/README.md deleted file mode 100644 index 5141828f42..0000000000 --- a/protobuf-definitions/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Unity ML-Agents Protobuf Definitions - -Contains relevant definitions needed to generate probobuf files used in [ML-Agents Toolkit](https://github.com/Unity-Technologies/ml-agents). - -## Requirements - -* grpc 1.10.1 -* protobuf 3.6.0 - -## Set-up & Installation - -`pip install protobuf==3.6.0 --force` - -`pip install grpcio-tools` - -`nuget install Grpc.Tools` into known directory. - -### Installing Protobuf Compiler - -On Mac: `brew install protobuf` - -On Windows & Linux: [See here](https://github.com/google/protobuf/blob/master/src/README.md). - -## Running - -1. Install pre-requisites. -2. Un-comment line 4 in `make.bat`, and set to correct Grpc.Tools sub-directory. -3. Run `make.bat` diff --git a/protobuf-definitions/make.bat b/protobuf-definitions/make.bat deleted file mode 100755 index 391fceae2d..0000000000 --- a/protobuf-definitions/make.bat +++ /dev/null @@ -1,43 +0,0 @@ -# variables - -# GRPC-TOOLS required. Install with `nuget install Grpc.Tools`. -# Then un-comment and replace [DIRECTORY] with location of files. -# For example, on macOS, you might have something like: -# COMPILER=Grpc.Tools.1.14.1/tools/macosx_x64 -# COMPILER=[DIRECTORY] - -SRC_DIR=proto/mlagents/envs/communicator_objects -DST_DIR_C=../UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects -DST_DIR_P=../ml-agents -PROTO_PATH=proto - -PYTHON_PACKAGE=mlagents/envs/communicator_objects - -# clean -rm -rf $DST_DIR_C -rm -rf $DST_DIR_P/$PYTHON_PACKAGE -mkdir -p $DST_DIR_C -mkdir -p $DST_DIR_P/$PYTHON_PACKAGE - -# generate proto objects in python and C# - -protoc --proto_path=proto --csharp_out=$DST_DIR_C $SRC_DIR/*.proto -protoc --proto_path=proto --python_out=$DST_DIR_P $SRC_DIR/*.proto - -# grpc - -GRPC=unity_to_external.proto - -$COMPILER/protoc --proto_path=proto --csharp_out $DST_DIR_C --grpc_out $DST_DIR_C $SRC_DIR/$GRPC --plugin=protoc-gen-grpc=$COMPILER/grpc_csharp_plugin -python3 -m grpc_tools.protoc --proto_path=proto --python_out=$DST_DIR_P --grpc_python_out=$DST_DIR_P $SRC_DIR/$GRPC - - -# Generate the init file for the python module -# rm -f $DST_DIR_P/$PYTHON_PACKAGE/__init__.py -for FILE in $DST_DIR_P/$PYTHON_PACKAGE/*.py -do -FILE=${FILE##*/} -# echo from .$(basename $FILE) import \* >> $DST_DIR_P/$PYTHON_PACKAGE/__init__.py -echo from .${FILE%.py} import \* >> $DST_DIR_P/$PYTHON_PACKAGE/__init__.py -done - diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/agent_action_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/agent_action_proto.proto deleted file mode 100644 index 5199483a5f..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/agent_action_proto.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message AgentActionProto { - repeated float vector_actions = 1; - string text_actions = 2; - repeated float memories = 3; - float value = 4; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/agent_info_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/agent_info_proto.proto deleted file mode 100644 index f8316980eb..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/agent_info_proto.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message AgentInfoProto { - repeated float stacked_vector_observation = 1; - repeated bytes visual_observations = 2; - string text_observation = 3; - repeated float stored_vector_actions = 4; - string stored_text_actions = 5; - repeated float memories = 6; - float reward = 7; - bool done = 8; - bool max_step_reached = 9; - int32 id = 10; - repeated bool action_mask = 11; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/brain_parameters_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/brain_parameters_proto.proto deleted file mode 100644 index d4596c507b..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/brain_parameters_proto.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/resolution_proto.proto"; -import "mlagents/envs/communicator_objects/brain_type_proto.proto"; -import "mlagents/envs/communicator_objects/space_type_proto.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message BrainParametersProto { - int32 vector_observation_size = 1; - int32 num_stacked_vector_observations = 2; - repeated int32 vector_action_size = 3; - repeated ResolutionProto camera_resolutions = 4; - repeated string vector_action_descriptions = 5; - SpaceTypeProto vector_action_space_type = 6; - string brain_name = 7; - BrainTypeProto brain_type = 8; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/brain_type_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/brain_type_proto.proto deleted file mode 100644 index 05ab294872..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/brain_type_proto.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/resolution_proto.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -enum BrainTypeProto { - Player = 0; - Heuristic = 1; - External = 2; - Internal = 3; -} - diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/command_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/command_proto.proto deleted file mode 100644 index 49f6f2af37..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/command_proto.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -enum CommandProto { - STEP = 0; - RESET = 1; - QUIT = 2; - } diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/engine_configuration_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/engine_configuration_proto.proto deleted file mode 100644 index 0a0e90dc73..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/engine_configuration_proto.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message EngineConfigurationProto { - int32 width = 1; - int32 height = 2; - int32 quality_level = 3; - float time_scale = 4; - int32 target_frame_rate = 5; - bool show_monitor = 6; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/environment_parameters_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/environment_parameters_proto.proto deleted file mode 100644 index c6a391be37..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/environment_parameters_proto.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message EnvironmentParametersProto { - map float_parameters = 1; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/header.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/header.proto deleted file mode 100644 index 7fd3711678..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/header.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message Header { - int32 status = 1; - string message = 2; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/resolution_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/resolution_proto.proto deleted file mode 100644 index f17ba352b9..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/resolution_proto.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message ResolutionProto { - int32 width = 1; - int32 height = 2; - bool gray_scale = 3; -} - diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/space_type_proto.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/space_type_proto.proto deleted file mode 100644 index d4b6822dec..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/space_type_proto.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/resolution_proto.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -enum SpaceTypeProto { - discrete = 0; - continuous = 1; -} - diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_input.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_input.proto deleted file mode 100644 index 25acc91518..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_input.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/unity_rl_input.proto"; -import "mlagents/envs/communicator_objects/unity_rl_initialization_input.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message UnityInput { - UnityRLInput rl_input = 1; - UnityRLInitializationInput rl_initialization_input = 2; - - //More messages can be added here -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_message.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_message.proto deleted file mode 100644 index f1a14f5568..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_message.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/unity_output.proto"; -import "mlagents/envs/communicator_objects/unity_input.proto"; -import "mlagents/envs/communicator_objects/header.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message UnityMessage { - Header header = 1; - UnityOutput unity_output = 2; - UnityInput unity_input = 3; -} - diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_output.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_output.proto deleted file mode 100644 index edbd70f802..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_output.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/unity_rl_output.proto"; -import "mlagents/envs/communicator_objects/unity_rl_initialization_output.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message UnityOutput { - UnityRLOutput rl_output = 1; - UnityRLInitializationOutput rl_initialization_output = 2; - - //More messages can be added here -} - diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_initialization_input.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_initialization_input.proto deleted file mode 100644 index d1d9e334e7..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_initialization_input.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - - -message UnityRLInitializationInput { - int32 seed = 1; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_initialization_output.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_initialization_output.proto deleted file mode 100644 index 68819d0d65..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_initialization_output.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/brain_parameters_proto.proto"; -import "mlagents/envs/communicator_objects/environment_parameters_proto.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -// The request message containing the academy's parameters. -message UnityRLInitializationOutput { - string name = 1; - string version = 2; - string log_path = 3; - repeated BrainParametersProto brain_parameters = 5; - EnvironmentParametersProto environment_parameters = 6; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_input.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_input.proto deleted file mode 100644 index e32f3d1abf..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_input.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/agent_action_proto.proto"; -import "mlagents/envs/communicator_objects/environment_parameters_proto.proto"; -import "mlagents/envs/communicator_objects/command_proto.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message UnityRLInput { - message ListAgentActionProto { - repeated AgentActionProto value = 1; - } - map agent_actions = 1; - EnvironmentParametersProto environment_parameters = 2; - bool is_training = 3; - CommandProto command = 4; -} diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_output.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_output.proto deleted file mode 100644 index 4ae56bb820..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_rl_output.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/agent_info_proto.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -message UnityRLOutput { - message ListAgentInfoProto { - repeated AgentInfoProto value = 1; - } - bool global_done = 1; - map agentInfos = 2; -} - diff --git a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_to_external.proto b/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_to_external.proto deleted file mode 100644 index f323788b6d..0000000000 --- a/protobuf-definitions/proto/mlagents/envs/communicator_objects/unity_to_external.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -import "mlagents/envs/communicator_objects/unity_message.proto"; - -option csharp_namespace = "MLAgents.CommunicatorObjects"; -package communicator_objects; - -service UnityToExternal { - // Sends the academy parameters - rpc Exchange(UnityMessage) returns (UnityMessage) {} -} - diff --git a/notebooks/getting-started.ipynb b/python/Basics.ipynb similarity index 87% rename from notebooks/getting-started.ipynb rename to python/Basics.ipynb index 9eb400620f..dbae6a3a8d 100755 --- a/notebooks/getting-started.ipynb +++ b/python/Basics.ipynb @@ -15,16 +15,18 @@ "source": [ "### 1. Set environment parameters\n", "\n", - "Be sure to set `env_name` to the name of the Unity environment file you want to launch. Ensure that the environment build is in `../envs`." + "Be sure to set `env_name` to the name of the Unity environment file you want to launch. Ensure that the environment build is in the `python/` directory." ] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ - "env_name = \"../envs/3DBall\" # Name of the Unity environment binary to launch\n", + "env_name = \"3DBall\" # Name of the Unity environment binary to launch\n", "train_mode = True # Whether to run the environment in training or inference mode" ] }, @@ -40,14 +42,16 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import sys\n", "\n", - "from mlagents.envs import UnityEnvironment\n", + "from unityagents import UnityEnvironment\n", "\n", "%matplotlib inline\n", "\n", @@ -72,11 +76,16 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "env = UnityEnvironment(file_name=env_name)\n", "\n", + "# Examine environment parameters\n", + "print(str(env))\n", + "\n", "# Set the default brain to work with\n", "default_brain = env.brain_names[0]\n", "brain = env.brains[default_brain]" @@ -93,7 +102,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Reset the environment\n", @@ -124,7 +135,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "for episode in range(10):\n", @@ -132,13 +145,12 @@ " done = False\n", " episode_rewards = 0\n", " while not done:\n", - " action_size = brain.vector_action_space_size\n", " if brain.vector_action_space_type == 'continuous':\n", " env_info = env.step(np.random.randn(len(env_info.agents), \n", - " action_size[0]))[default_brain]\n", + " brain.vector_action_space_size))[default_brain]\n", " else:\n", - " action = np.column_stack([np.random.randint(0, action_size[i], size=(len(env_info.agents))) for i in range(len(action_size))])\n", - " env_info = env.step(action)[default_brain]\n", + " env_info = env.step(np.random.randint(0, brain.vector_action_space_size, \n", + " size=(len(env_info.agents))))[default_brain]\n", " episode_rewards += env_info.rewards[0]\n", " done = env_info.local_done[0]\n", " print(\"Total reward this episode: {}\".format(episode_rewards))" @@ -155,7 +167,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "env.close()" @@ -179,7 +193,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.6.3" } }, "nbformat": 4, diff --git a/ml-agents/mlagents/envs/communicator_objects/__init__.py b/python/communicator_objects/__init__.py similarity index 100% rename from ml-agents/mlagents/envs/communicator_objects/__init__.py rename to python/communicator_objects/__init__.py diff --git a/ml-agents/mlagents/envs/communicator_objects/agent_action_proto_pb2.py b/python/communicator_objects/agent_action_proto_pb2.py similarity index 64% rename from ml-agents/mlagents/envs/communicator_objects/agent_action_proto_pb2.py rename to python/communicator_objects/agent_action_proto_pb2.py index 311ce5bbe7..2bb928b6ac 100644 --- a/ml-agents/mlagents/envs/communicator_objects/agent_action_proto_pb2.py +++ b/python/communicator_objects/agent_action_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/agent_action_proto.proto +# source: communicator_objects/agent_action_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,6 +7,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,11 +16,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/agent_action_proto.proto', + name='communicator_objects/agent_action_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n;mlagents/envs/communicator_objects/agent_action_proto.proto\x12\x14\x63ommunicator_objects\"a\n\x10\x41gentActionProto\x12\x16\n\x0evector_actions\x18\x01 \x03(\x02\x12\x14\n\x0ctext_actions\x18\x02 \x01(\t\x12\x10\n\x08memories\x18\x03 \x03(\x02\x12\r\n\x05value\x18\x04 \x01(\x02\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n-communicator_objects/agent_action_proto.proto\x12\x14\x63ommunicator_objects\"R\n\x10\x41gentActionProto\x12\x16\n\x0evector_actions\x18\x01 \x03(\x02\x12\x14\n\x0ctext_actions\x18\x02 \x01(\t\x12\x10\n\x08memories\x18\x03 \x03(\x02\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') ) @@ -38,42 +38,35 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='text_actions', full_name='communicator_objects.AgentActionProto.text_actions', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='memories', full_name='communicator_objects.AgentActionProto.memories', index=2, number=3, type=2, cpp_type=6, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='communicator_objects.AgentActionProto.value', index=3, - number=4, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=85, - serialized_end=182, + serialized_start=71, + serialized_end=153, ) DESCRIPTOR.message_types_by_name['AgentActionProto'] = _AGENTACTIONPROTO @@ -81,11 +74,12 @@ AgentActionProto = _reflection.GeneratedProtocolMessageType('AgentActionProto', (_message.Message,), dict( DESCRIPTOR = _AGENTACTIONPROTO, - __module__ = 'mlagents.envs.communicator_objects.agent_action_proto_pb2' + __module__ = 'communicator_objects.agent_action_proto_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.AgentActionProto) )) _sym_db.RegisterMessage(AgentActionProto) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/agent_info_proto_pb2.py b/python/communicator_objects/agent_info_proto_pb2.py similarity index 70% rename from ml-agents/mlagents/envs/communicator_objects/agent_info_proto_pb2.py rename to python/communicator_objects/agent_info_proto_pb2.py index 141e9e2a4d..944f5b381a 100644 --- a/ml-agents/mlagents/envs/communicator_objects/agent_info_proto_pb2.py +++ b/python/communicator_objects/agent_info_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/agent_info_proto.proto +# source: communicator_objects/agent_info_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,6 +7,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,11 +16,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/agent_info_proto.proto', + name='communicator_objects/agent_info_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n9mlagents/envs/communicator_objects/agent_info_proto.proto\x12\x14\x63ommunicator_objects\"\x92\x02\n\x0e\x41gentInfoProto\x12\"\n\x1astacked_vector_observation\x18\x01 \x03(\x02\x12\x1b\n\x13visual_observations\x18\x02 \x03(\x0c\x12\x18\n\x10text_observation\x18\x03 \x01(\t\x12\x1d\n\x15stored_vector_actions\x18\x04 \x03(\x02\x12\x1b\n\x13stored_text_actions\x18\x05 \x01(\t\x12\x10\n\x08memories\x18\x06 \x03(\x02\x12\x0e\n\x06reward\x18\x07 \x01(\x02\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\x18\n\x10max_step_reached\x18\t \x01(\x08\x12\n\n\x02id\x18\n \x01(\x05\x12\x13\n\x0b\x61\x63tion_mask\x18\x0b \x03(\x08\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n+communicator_objects/agent_info_proto.proto\x12\x14\x63ommunicator_objects\"\xfd\x01\n\x0e\x41gentInfoProto\x12\"\n\x1astacked_vector_observation\x18\x01 \x03(\x02\x12\x1b\n\x13visual_observations\x18\x02 \x03(\x0c\x12\x18\n\x10text_observation\x18\x03 \x01(\t\x12\x1d\n\x15stored_vector_actions\x18\x04 \x03(\x02\x12\x1b\n\x13stored_text_actions\x18\x05 \x01(\t\x12\x10\n\x08memories\x18\x06 \x03(\x02\x12\x0e\n\x06reward\x18\x07 \x01(\x02\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\x18\n\x10max_step_reached\x18\t \x01(\x08\x12\n\n\x02id\x18\n \x01(\x05\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') ) @@ -38,91 +38,84 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='visual_observations', full_name='communicator_objects.AgentInfoProto.visual_observations', index=1, number=2, type=12, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='text_observation', full_name='communicator_objects.AgentInfoProto.text_observation', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='stored_vector_actions', full_name='communicator_objects.AgentInfoProto.stored_vector_actions', index=3, number=4, type=2, cpp_type=6, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='stored_text_actions', full_name='communicator_objects.AgentInfoProto.stored_text_actions', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='memories', full_name='communicator_objects.AgentInfoProto.memories', index=5, number=6, type=2, cpp_type=6, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='reward', full_name='communicator_objects.AgentInfoProto.reward', index=6, number=7, type=2, cpp_type=6, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='done', full_name='communicator_objects.AgentInfoProto.done', index=7, number=8, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_step_reached', full_name='communicator_objects.AgentInfoProto.max_step_reached', index=8, number=9, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='id', full_name='communicator_objects.AgentInfoProto.id', index=9, number=10, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='action_mask', full_name='communicator_objects.AgentInfoProto.action_mask', index=10, - number=11, type=8, cpp_type=7, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=84, - serialized_end=358, + serialized_start=70, + serialized_end=323, ) DESCRIPTOR.message_types_by_name['AgentInfoProto'] = _AGENTINFOPROTO @@ -130,11 +123,12 @@ AgentInfoProto = _reflection.GeneratedProtocolMessageType('AgentInfoProto', (_message.Message,), dict( DESCRIPTOR = _AGENTINFOPROTO, - __module__ = 'mlagents.envs.communicator_objects.agent_info_proto_pb2' + __module__ = 'communicator_objects.agent_info_proto_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.AgentInfoProto) )) _sym_db.RegisterMessage(AgentInfoProto) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/brain_parameters_proto_pb2.py b/python/communicator_objects/brain_parameters_proto_pb2.py similarity index 55% rename from ml-agents/mlagents/envs/communicator_objects/brain_parameters_proto_pb2.py rename to python/communicator_objects/brain_parameters_proto_pb2.py index 7431569f91..8fee109a2b 100644 --- a/ml-agents/mlagents/envs/communicator_objects/brain_parameters_proto_pb2.py +++ b/python/communicator_objects/brain_parameters_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/brain_parameters_proto.proto +# source: communicator_objects/brain_parameters_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,24 +7,24 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import resolution_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_resolution__proto__pb2 -from mlagents.envs.communicator_objects import brain_type_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_brain__type__proto__pb2 -from mlagents.envs.communicator_objects import space_type_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_space__type__proto__pb2 +from communicator_objects import resolution_proto_pb2 as communicator__objects_dot_resolution__proto__pb2 +from communicator_objects import brain_type_proto_pb2 as communicator__objects_dot_brain__type__proto__pb2 +from communicator_objects import space_type_proto_pb2 as communicator__objects_dot_space__type__proto__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/brain_parameters_proto.proto', + name='communicator_objects/brain_parameters_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n?mlagents/envs/communicator_objects/brain_parameters_proto.proto\x12\x14\x63ommunicator_objects\x1a\x39mlagents/envs/communicator_objects/resolution_proto.proto\x1a\x39mlagents/envs/communicator_objects/brain_type_proto.proto\x1a\x39mlagents/envs/communicator_objects/space_type_proto.proto\"\xf9\x02\n\x14\x42rainParametersProto\x12\x1f\n\x17vector_observation_size\x18\x01 \x01(\x05\x12\'\n\x1fnum_stacked_vector_observations\x18\x02 \x01(\x05\x12\x1a\n\x12vector_action_size\x18\x03 \x03(\x05\x12\x41\n\x12\x63\x61mera_resolutions\x18\x04 \x03(\x0b\x32%.communicator_objects.ResolutionProto\x12\"\n\x1avector_action_descriptions\x18\x05 \x03(\t\x12\x46\n\x18vector_action_space_type\x18\x06 \x01(\x0e\x32$.communicator_objects.SpaceTypeProto\x12\x12\n\nbrain_name\x18\x07 \x01(\t\x12\x38\n\nbrain_type\x18\x08 \x01(\x0e\x32$.communicator_objects.BrainTypeProtoB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n1communicator_objects/brain_parameters_proto.proto\x12\x14\x63ommunicator_objects\x1a+communicator_objects/resolution_proto.proto\x1a+communicator_objects/brain_type_proto.proto\x1a+communicator_objects/space_type_proto.proto\"\xc6\x03\n\x14\x42rainParametersProto\x12\x1f\n\x17vector_observation_size\x18\x01 \x01(\x05\x12\'\n\x1fnum_stacked_vector_observations\x18\x02 \x01(\x05\x12\x1a\n\x12vector_action_size\x18\x03 \x01(\x05\x12\x41\n\x12\x63\x61mera_resolutions\x18\x04 \x03(\x0b\x32%.communicator_objects.ResolutionProto\x12\"\n\x1avector_action_descriptions\x18\x05 \x03(\t\x12\x46\n\x18vector_action_space_type\x18\x06 \x01(\x0e\x32$.communicator_objects.SpaceTypeProto\x12K\n\x1dvector_observation_space_type\x18\x07 \x01(\x0e\x32$.communicator_objects.SpaceTypeProto\x12\x12\n\nbrain_name\x18\x08 \x01(\t\x12\x38\n\nbrain_type\x18\t \x01(\x0e\x32$.communicator_objects.BrainTypeProtoB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_brain__type__proto__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_space__type__proto__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,communicator__objects_dot_brain__type__proto__pb2.DESCRIPTOR,communicator__objects_dot_space__type__proto__pb2.DESCRIPTOR,]) @@ -42,85 +42,94 @@ has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='num_stacked_vector_observations', full_name='communicator_objects.BrainParametersProto.num_stacked_vector_observations', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='vector_action_size', full_name='communicator_objects.BrainParametersProto.vector_action_size', index=2, - number=3, type=5, cpp_type=1, label=3, - has_default_value=False, default_value=[], + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='camera_resolutions', full_name='communicator_objects.BrainParametersProto.camera_resolutions', index=3, number=4, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='vector_action_descriptions', full_name='communicator_objects.BrainParametersProto.vector_action_descriptions', index=4, number=5, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='vector_action_space_type', full_name='communicator_objects.BrainParametersProto.vector_action_space_type', index=5, number=6, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='vector_observation_space_type', full_name='communicator_objects.BrainParametersProto.vector_observation_space_type', index=6, + number=7, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='brain_name', full_name='communicator_objects.BrainParametersProto.brain_name', index=6, - number=7, type=9, cpp_type=9, label=1, + name='brain_name', full_name='communicator_objects.BrainParametersProto.brain_name', index=7, + number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='brain_type', full_name='communicator_objects.BrainParametersProto.brain_type', index=7, - number=8, type=14, cpp_type=8, label=1, + name='brain_type', full_name='communicator_objects.BrainParametersProto.brain_type', index=8, + number=9, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=267, - serialized_end=644, + serialized_start=211, + serialized_end=665, ) -_BRAINPARAMETERSPROTO.fields_by_name['camera_resolutions'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_resolution__proto__pb2._RESOLUTIONPROTO -_BRAINPARAMETERSPROTO.fields_by_name['vector_action_space_type'].enum_type = mlagents_dot_envs_dot_communicator__objects_dot_space__type__proto__pb2._SPACETYPEPROTO -_BRAINPARAMETERSPROTO.fields_by_name['brain_type'].enum_type = mlagents_dot_envs_dot_communicator__objects_dot_brain__type__proto__pb2._BRAINTYPEPROTO +_BRAINPARAMETERSPROTO.fields_by_name['camera_resolutions'].message_type = communicator__objects_dot_resolution__proto__pb2._RESOLUTIONPROTO +_BRAINPARAMETERSPROTO.fields_by_name['vector_action_space_type'].enum_type = communicator__objects_dot_space__type__proto__pb2._SPACETYPEPROTO +_BRAINPARAMETERSPROTO.fields_by_name['vector_observation_space_type'].enum_type = communicator__objects_dot_space__type__proto__pb2._SPACETYPEPROTO +_BRAINPARAMETERSPROTO.fields_by_name['brain_type'].enum_type = communicator__objects_dot_brain__type__proto__pb2._BRAINTYPEPROTO DESCRIPTOR.message_types_by_name['BrainParametersProto'] = _BRAINPARAMETERSPROTO _sym_db.RegisterFileDescriptor(DESCRIPTOR) BrainParametersProto = _reflection.GeneratedProtocolMessageType('BrainParametersProto', (_message.Message,), dict( DESCRIPTOR = _BRAINPARAMETERSPROTO, - __module__ = 'mlagents.envs.communicator_objects.brain_parameters_proto_pb2' + __module__ = 'communicator_objects.brain_parameters_proto_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.BrainParametersProto) )) _sym_db.RegisterMessage(BrainParametersProto) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/brain_type_proto_pb2.py b/python/communicator_objects/brain_type_proto_pb2.py similarity index 58% rename from ml-agents/mlagents/envs/communicator_objects/brain_type_proto_pb2.py rename to python/communicator_objects/brain_type_proto_pb2.py index 2adfbf60a8..8ac6022aab 100644 --- a/ml-agents/mlagents/envs/communicator_objects/brain_type_proto_pb2.py +++ b/python/communicator_objects/brain_type_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/brain_type_proto.proto +# source: communicator_objects/brain_type_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -8,22 +8,22 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import resolution_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_resolution__proto__pb2 +from communicator_objects import resolution_proto_pb2 as communicator__objects_dot_resolution__proto__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/brain_type_proto.proto', + name='communicator_objects/brain_type_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n9mlagents/envs/communicator_objects/brain_type_proto.proto\x12\x14\x63ommunicator_objects\x1a\x39mlagents/envs/communicator_objects/resolution_proto.proto*G\n\x0e\x42rainTypeProto\x12\n\n\x06Player\x10\x00\x12\r\n\tHeuristic\x10\x01\x12\x0c\n\x08\x45xternal\x10\x02\x12\x0c\n\x08Internal\x10\x03\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n+communicator_objects/brain_type_proto.proto\x12\x14\x63ommunicator_objects\x1a+communicator_objects/resolution_proto.proto*G\n\x0e\x42rainTypeProto\x12\n\n\x06Player\x10\x00\x12\r\n\tHeuristic\x10\x01\x12\x0c\n\x08\x45xternal\x10\x02\x12\x0c\n\x08Internal\x10\x03\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,]) _BRAINTYPEPROTO = _descriptor.EnumDescriptor( name='BrainTypeProto', @@ -33,25 +33,25 @@ values=[ _descriptor.EnumValueDescriptor( name='Player', index=0, number=0, - serialized_options=None, + options=None, type=None), _descriptor.EnumValueDescriptor( name='Heuristic', index=1, number=1, - serialized_options=None, + options=None, type=None), _descriptor.EnumValueDescriptor( name='External', index=2, number=2, - serialized_options=None, + options=None, type=None), _descriptor.EnumValueDescriptor( name='Internal', index=3, number=3, - serialized_options=None, + options=None, type=None), ], containing_type=None, - serialized_options=None, - serialized_start=142, - serialized_end=213, + options=None, + serialized_start=114, + serialized_end=185, ) _sym_db.RegisterEnumDescriptor(_BRAINTYPEPROTO) @@ -66,5 +66,6 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/command_proto_pb2.py b/python/communicator_objects/command_proto_pb2.py similarity index 66% rename from ml-agents/mlagents/envs/communicator_objects/command_proto_pb2.py rename to python/communicator_objects/command_proto_pb2.py index a5c4876d35..bdc97c1d25 100644 --- a/ml-agents/mlagents/envs/communicator_objects/command_proto_pb2.py +++ b/python/communicator_objects/command_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/command_proto.proto +# source: communicator_objects/command_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -8,6 +8,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,11 +17,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/command_proto.proto', + name='communicator_objects/command_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n6mlagents/envs/communicator_objects/command_proto.proto\x12\x14\x63ommunicator_objects*-\n\x0c\x43ommandProto\x12\x08\n\x04STEP\x10\x00\x12\t\n\x05RESET\x10\x01\x12\x08\n\x04QUIT\x10\x02\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n(communicator_objects/command_proto.proto\x12\x14\x63ommunicator_objects*-\n\x0c\x43ommandProto\x12\x08\n\x04STEP\x10\x00\x12\t\n\x05RESET\x10\x01\x12\x08\n\x04QUIT\x10\x02\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') ) _COMMANDPROTO = _descriptor.EnumDescriptor( @@ -31,21 +31,21 @@ values=[ _descriptor.EnumValueDescriptor( name='STEP', index=0, number=0, - serialized_options=None, + options=None, type=None), _descriptor.EnumValueDescriptor( name='RESET', index=1, number=1, - serialized_options=None, + options=None, type=None), _descriptor.EnumValueDescriptor( name='QUIT', index=2, number=2, - serialized_options=None, + options=None, type=None), ], containing_type=None, - serialized_options=None, - serialized_start=80, - serialized_end=125, + options=None, + serialized_start=66, + serialized_end=111, ) _sym_db.RegisterEnumDescriptor(_COMMANDPROTO) @@ -59,5 +59,6 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/engine_configuration_proto_pb2.py b/python/communicator_objects/engine_configuration_proto_pb2.py similarity index 74% rename from ml-agents/mlagents/envs/communicator_objects/engine_configuration_proto_pb2.py rename to python/communicator_objects/engine_configuration_proto_pb2.py index 55dd2ed3f0..cf5ee46878 100644 --- a/ml-agents/mlagents/envs/communicator_objects/engine_configuration_proto_pb2.py +++ b/python/communicator_objects/engine_configuration_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/engine_configuration_proto.proto +# source: communicator_objects/engine_configuration_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,6 +7,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,11 +16,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/engine_configuration_proto.proto', + name='communicator_objects/engine_configuration_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\nCmlagents/envs/communicator_objects/engine_configuration_proto.proto\x12\x14\x63ommunicator_objects\"\x95\x01\n\x18\x45ngineConfigurationProto\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\x15\n\rquality_level\x18\x03 \x01(\x05\x12\x12\n\ntime_scale\x18\x04 \x01(\x02\x12\x19\n\x11target_frame_rate\x18\x05 \x01(\x05\x12\x14\n\x0cshow_monitor\x18\x06 \x01(\x08\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n5communicator_objects/engine_configuration_proto.proto\x12\x14\x63ommunicator_objects\"\x95\x01\n\x18\x45ngineConfigurationProto\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\x15\n\rquality_level\x18\x03 \x01(\x05\x12\x12\n\ntime_scale\x18\x04 \x01(\x02\x12\x19\n\x11target_frame_rate\x18\x05 \x01(\x05\x12\x14\n\x0cshow_monitor\x18\x06 \x01(\x08\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') ) @@ -38,56 +38,56 @@ has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='height', full_name='communicator_objects.EngineConfigurationProto.height', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='quality_level', full_name='communicator_objects.EngineConfigurationProto.quality_level', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_scale', full_name='communicator_objects.EngineConfigurationProto.time_scale', index=3, number=4, type=2, cpp_type=6, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='target_frame_rate', full_name='communicator_objects.EngineConfigurationProto.target_frame_rate', index=4, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='show_monitor', full_name='communicator_objects.EngineConfigurationProto.show_monitor', index=5, number=6, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=94, - serialized_end=243, + serialized_start=80, + serialized_end=229, ) DESCRIPTOR.message_types_by_name['EngineConfigurationProto'] = _ENGINECONFIGURATIONPROTO @@ -95,11 +95,12 @@ EngineConfigurationProto = _reflection.GeneratedProtocolMessageType('EngineConfigurationProto', (_message.Message,), dict( DESCRIPTOR = _ENGINECONFIGURATIONPROTO, - __module__ = 'mlagents.envs.communicator_objects.engine_configuration_proto_pb2' + __module__ = 'communicator_objects.engine_configuration_proto_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.EngineConfigurationProto) )) _sym_db.RegisterMessage(EngineConfigurationProto) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/environment_parameters_proto_pb2.py b/python/communicator_objects/environment_parameters_proto_pb2.py similarity index 71% rename from ml-agents/mlagents/envs/communicator_objects/environment_parameters_proto_pb2.py rename to python/communicator_objects/environment_parameters_proto_pb2.py index 3dddd8c7cc..1732614a64 100644 --- a/ml-agents/mlagents/envs/communicator_objects/environment_parameters_proto_pb2.py +++ b/python/communicator_objects/environment_parameters_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/environment_parameters_proto.proto +# source: communicator_objects/environment_parameters_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,6 +7,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,11 +16,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/environment_parameters_proto.proto', + name='communicator_objects/environment_parameters_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\nEmlagents/envs/communicator_objects/environment_parameters_proto.proto\x12\x14\x63ommunicator_objects\"\xb5\x01\n\x1a\x45nvironmentParametersProto\x12_\n\x10\x66loat_parameters\x18\x01 \x03(\x0b\x32\x45.communicator_objects.EnvironmentParametersProto.FloatParametersEntry\x1a\x36\n\x14\x46loatParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n7communicator_objects/environment_parameters_proto.proto\x12\x14\x63ommunicator_objects\"\xb5\x01\n\x1a\x45nvironmentParametersProto\x12_\n\x10\x66loat_parameters\x18\x01 \x03(\x0b\x32\x45.communicator_objects.EnvironmentParametersProto.FloatParametersEntry\x1a\x36\n\x14\x46loatParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') ) @@ -38,28 +38,28 @@ has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='communicator_objects.EnvironmentParametersProto.FloatParametersEntry.value', index=1, number=2, type=2, cpp_type=6, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=_b('8\001'), + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=223, - serialized_end=277, + serialized_start=209, + serialized_end=263, ) _ENVIRONMENTPARAMETERSPROTO = _descriptor.Descriptor( @@ -75,21 +75,21 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY, ], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=96, - serialized_end=277, + serialized_start=82, + serialized_end=263, ) _ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY.containing_type = _ENVIRONMENTPARAMETERSPROTO @@ -101,18 +101,20 @@ FloatParametersEntry = _reflection.GeneratedProtocolMessageType('FloatParametersEntry', (_message.Message,), dict( DESCRIPTOR = _ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY, - __module__ = 'mlagents.envs.communicator_objects.environment_parameters_proto_pb2' + __module__ = 'communicator_objects.environment_parameters_proto_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.EnvironmentParametersProto.FloatParametersEntry) )) , DESCRIPTOR = _ENVIRONMENTPARAMETERSPROTO, - __module__ = 'mlagents.envs.communicator_objects.environment_parameters_proto_pb2' + __module__ = 'communicator_objects.environment_parameters_proto_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.EnvironmentParametersProto) )) _sym_db.RegisterMessage(EnvironmentParametersProto) _sym_db.RegisterMessage(EnvironmentParametersProto.FloatParametersEntry) -DESCRIPTOR._options = None -_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) +_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY.has_options = True +_ENVIRONMENTPARAMETERSPROTO_FLOATPARAMETERSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/header_pb2.py b/python/communicator_objects/header_pb2.py similarity index 72% rename from ml-agents/mlagents/envs/communicator_objects/header_pb2.py rename to python/communicator_objects/header_pb2.py index ed9ccec72a..1a8566dd2e 100644 --- a/ml-agents/mlagents/envs/communicator_objects/header_pb2.py +++ b/python/communicator_objects/header_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/header.proto +# source: communicator_objects/header.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,6 +7,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,11 +16,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/header.proto', + name='communicator_objects/header.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n/mlagents/envs/communicator_objects/header.proto\x12\x14\x63ommunicator_objects\")\n\x06Header\x12\x0e\n\x06status\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\tB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n!communicator_objects/header.proto\x12\x14\x63ommunicator_objects\")\n\x06Header\x12\x0e\n\x06status\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\tB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') ) @@ -38,28 +38,28 @@ has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='message', full_name='communicator_objects.Header.message', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=73, - serialized_end=114, + serialized_start=59, + serialized_end=100, ) DESCRIPTOR.message_types_by_name['Header'] = _HEADER @@ -67,11 +67,12 @@ Header = _reflection.GeneratedProtocolMessageType('Header', (_message.Message,), dict( DESCRIPTOR = _HEADER, - __module__ = 'mlagents.envs.communicator_objects.header_pb2' + __module__ = 'communicator_objects.header_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.Header) )) _sym_db.RegisterMessage(Header) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/resolution_proto_pb2.py b/python/communicator_objects/resolution_proto_pb2.py similarity index 73% rename from ml-agents/mlagents/envs/communicator_objects/resolution_proto_pb2.py rename to python/communicator_objects/resolution_proto_pb2.py index 4082f8a0b1..e468530486 100644 --- a/ml-agents/mlagents/envs/communicator_objects/resolution_proto_pb2.py +++ b/python/communicator_objects/resolution_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/resolution_proto.proto +# source: communicator_objects/resolution_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,6 +7,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,11 +16,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/resolution_proto.proto', + name='communicator_objects/resolution_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n9mlagents/envs/communicator_objects/resolution_proto.proto\x12\x14\x63ommunicator_objects\"D\n\x0fResolutionProto\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\x12\n\ngray_scale\x18\x03 \x01(\x08\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n+communicator_objects/resolution_proto.proto\x12\x14\x63ommunicator_objects\"D\n\x0fResolutionProto\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\x12\n\ngray_scale\x18\x03 \x01(\x08\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') ) @@ -38,35 +38,35 @@ has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='height', full_name='communicator_objects.ResolutionProto.height', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='gray_scale', full_name='communicator_objects.ResolutionProto.gray_scale', index=2, number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=83, - serialized_end=151, + serialized_start=69, + serialized_end=137, ) DESCRIPTOR.message_types_by_name['ResolutionProto'] = _RESOLUTIONPROTO @@ -74,11 +74,12 @@ ResolutionProto = _reflection.GeneratedProtocolMessageType('ResolutionProto', (_message.Message,), dict( DESCRIPTOR = _RESOLUTIONPROTO, - __module__ = 'mlagents.envs.communicator_objects.resolution_proto_pb2' + __module__ = 'communicator_objects.resolution_proto_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.ResolutionProto) )) _sym_db.RegisterMessage(ResolutionProto) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/space_type_proto_pb2.py b/python/communicator_objects/space_type_proto_pb2.py similarity index 58% rename from ml-agents/mlagents/envs/communicator_objects/space_type_proto_pb2.py rename to python/communicator_objects/space_type_proto_pb2.py index 57baf9ba62..ab58acbf17 100644 --- a/ml-agents/mlagents/envs/communicator_objects/space_type_proto_pb2.py +++ b/python/communicator_objects/space_type_proto_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/space_type_proto.proto +# source: communicator_objects/space_type_proto.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -8,22 +8,22 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import resolution_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_resolution__proto__pb2 +from communicator_objects import resolution_proto_pb2 as communicator__objects_dot_resolution__proto__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/space_type_proto.proto', + name='communicator_objects/space_type_proto.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n9mlagents/envs/communicator_objects/space_type_proto.proto\x12\x14\x63ommunicator_objects\x1a\x39mlagents/envs/communicator_objects/resolution_proto.proto*.\n\x0eSpaceTypeProto\x12\x0c\n\x08\x64iscrete\x10\x00\x12\x0e\n\ncontinuous\x10\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n+communicator_objects/space_type_proto.proto\x12\x14\x63ommunicator_objects\x1a+communicator_objects/resolution_proto.proto*.\n\x0eSpaceTypeProto\x12\x0c\n\x08\x64iscrete\x10\x00\x12\x0e\n\ncontinuous\x10\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_resolution__proto__pb2.DESCRIPTOR,]) _SPACETYPEPROTO = _descriptor.EnumDescriptor( name='SpaceTypeProto', @@ -33,17 +33,17 @@ values=[ _descriptor.EnumValueDescriptor( name='discrete', index=0, number=0, - serialized_options=None, + options=None, type=None), _descriptor.EnumValueDescriptor( name='continuous', index=1, number=1, - serialized_options=None, + options=None, type=None), ], containing_type=None, - serialized_options=None, - serialized_start=142, - serialized_end=188, + options=None, + serialized_start=114, + serialized_end=160, ) _sym_db.RegisterEnumDescriptor(_SPACETYPEPROTO) @@ -56,5 +56,6 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_input_pb2.py b/python/communicator_objects/unity_input_pb2.py similarity index 50% rename from ml-agents/mlagents/envs/communicator_objects/unity_input_pb2.py rename to python/communicator_objects/unity_input_pb2.py index e3aeed5792..d22921c758 100644 --- a/ml-agents/mlagents/envs/communicator_objects/unity_input_pb2.py +++ b/python/communicator_objects/unity_input_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/unity_input.proto +# source: communicator_objects/unity_input.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,23 +7,23 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import unity_rl_input_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__input__pb2 -from mlagents.envs.communicator_objects import unity_rl_initialization_input_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__initialization__input__pb2 +from communicator_objects import unity_rl_input_pb2 as communicator__objects_dot_unity__rl__input__pb2 +from communicator_objects import unity_rl_initialization_input_pb2 as communicator__objects_dot_unity__rl__initialization__input__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/unity_input.proto', + name='communicator_objects/unity_input.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n4mlagents/envs/communicator_objects/unity_input.proto\x12\x14\x63ommunicator_objects\x1a\x37mlagents/envs/communicator_objects/unity_rl_input.proto\x1a\x46mlagents/envs/communicator_objects/unity_rl_initialization_input.proto\"\x95\x01\n\nUnityInput\x12\x34\n\x08rl_input\x18\x01 \x01(\x0b\x32\".communicator_objects.UnityRLInput\x12Q\n\x17rl_initialization_input\x18\x02 \x01(\x0b\x32\x30.communicator_objects.UnityRLInitializationInputB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n&communicator_objects/unity_input.proto\x12\x14\x63ommunicator_objects\x1a)communicator_objects/unity_rl_input.proto\x1a\x38\x63ommunicator_objects/unity_rl_initialization_input.proto\"\xb0\x01\n\nUnityInput\x12\x34\n\x08rl_input\x18\x01 \x01(\x0b\x32\".communicator_objects.UnityRLInput\x12Q\n\x17rl_initialization_input\x18\x02 \x01(\x0b\x32\x30.communicator_objects.UnityRLInitializationInput\x12\x19\n\x11\x63ustom_data_input\x18\x03 \x01(\x05\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__input__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__initialization__input__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_unity__rl__input__pb2.DESCRIPTOR,communicator__objects_dot_unity__rl__initialization__input__pb2.DESCRIPTOR,]) @@ -41,42 +41,50 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rl_initialization_input', full_name='communicator_objects.UnityInput.rl_initialization_input', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='custom_data_input', full_name='communicator_objects.UnityInput.custom_data_input', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=208, - serialized_end=357, + serialized_start=166, + serialized_end=342, ) -_UNITYINPUT.fields_by_name['rl_input'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__input__pb2._UNITYRLINPUT -_UNITYINPUT.fields_by_name['rl_initialization_input'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_unity__rl__initialization__input__pb2._UNITYRLINITIALIZATIONINPUT +_UNITYINPUT.fields_by_name['rl_input'].message_type = communicator__objects_dot_unity__rl__input__pb2._UNITYRLINPUT +_UNITYINPUT.fields_by_name['rl_initialization_input'].message_type = communicator__objects_dot_unity__rl__initialization__input__pb2._UNITYRLINITIALIZATIONINPUT DESCRIPTOR.message_types_by_name['UnityInput'] = _UNITYINPUT _sym_db.RegisterFileDescriptor(DESCRIPTOR) UnityInput = _reflection.GeneratedProtocolMessageType('UnityInput', (_message.Message,), dict( DESCRIPTOR = _UNITYINPUT, - __module__ = 'mlagents.envs.communicator_objects.unity_input_pb2' + __module__ = 'communicator_objects.unity_input_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityInput) )) _sym_db.RegisterMessage(UnityInput) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_message_pb2.py b/python/communicator_objects/unity_message_pb2.py similarity index 51% rename from ml-agents/mlagents/envs/communicator_objects/unity_message_pb2.py rename to python/communicator_objects/unity_message_pb2.py index 1cf286a10f..5288a492e8 100644 --- a/ml-agents/mlagents/envs/communicator_objects/unity_message_pb2.py +++ b/python/communicator_objects/unity_message_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/unity_message.proto +# source: communicator_objects/unity_message.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,24 +7,24 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import unity_output_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_unity__output__pb2 -from mlagents.envs.communicator_objects import unity_input_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_unity__input__pb2 -from mlagents.envs.communicator_objects import header_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_header__pb2 +from communicator_objects import unity_output_pb2 as communicator__objects_dot_unity__output__pb2 +from communicator_objects import unity_input_pb2 as communicator__objects_dot_unity__input__pb2 +from communicator_objects import header_pb2 as communicator__objects_dot_header__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/unity_message.proto', + name='communicator_objects/unity_message.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n6mlagents/envs/communicator_objects/unity_message.proto\x12\x14\x63ommunicator_objects\x1a\x35mlagents/envs/communicator_objects/unity_output.proto\x1a\x34mlagents/envs/communicator_objects/unity_input.proto\x1a/mlagents/envs/communicator_objects/header.proto\"\xac\x01\n\x0cUnityMessage\x12,\n\x06header\x18\x01 \x01(\x0b\x32\x1c.communicator_objects.Header\x12\x37\n\x0cunity_output\x18\x02 \x01(\x0b\x32!.communicator_objects.UnityOutput\x12\x35\n\x0bunity_input\x18\x03 \x01(\x0b\x32 .communicator_objects.UnityInputB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n(communicator_objects/unity_message.proto\x12\x14\x63ommunicator_objects\x1a\'communicator_objects/unity_output.proto\x1a&communicator_objects/unity_input.proto\x1a!communicator_objects/header.proto\"\xac\x01\n\x0cUnityMessage\x12,\n\x06header\x18\x01 \x01(\x0b\x32\x1c.communicator_objects.Header\x12\x37\n\x0cunity_output\x18\x02 \x01(\x0b\x32!.communicator_objects.UnityOutput\x12\x35\n\x0bunity_input\x18\x03 \x01(\x0b\x32 .communicator_objects.UnityInputB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_unity__output__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_unity__input__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_header__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_unity__output__pb2.DESCRIPTOR,communicator__objects_dot_unity__input__pb2.DESCRIPTOR,communicator__objects_dot_header__pb2.DESCRIPTOR,]) @@ -42,50 +42,51 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='unity_output', full_name='communicator_objects.UnityMessage.unity_output', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='unity_input', full_name='communicator_objects.UnityMessage.unity_input', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=239, - serialized_end=411, + serialized_start=183, + serialized_end=355, ) -_UNITYMESSAGE.fields_by_name['header'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_header__pb2._HEADER -_UNITYMESSAGE.fields_by_name['unity_output'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_unity__output__pb2._UNITYOUTPUT -_UNITYMESSAGE.fields_by_name['unity_input'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_unity__input__pb2._UNITYINPUT +_UNITYMESSAGE.fields_by_name['header'].message_type = communicator__objects_dot_header__pb2._HEADER +_UNITYMESSAGE.fields_by_name['unity_output'].message_type = communicator__objects_dot_unity__output__pb2._UNITYOUTPUT +_UNITYMESSAGE.fields_by_name['unity_input'].message_type = communicator__objects_dot_unity__input__pb2._UNITYINPUT DESCRIPTOR.message_types_by_name['UnityMessage'] = _UNITYMESSAGE _sym_db.RegisterFileDescriptor(DESCRIPTOR) UnityMessage = _reflection.GeneratedProtocolMessageType('UnityMessage', (_message.Message,), dict( DESCRIPTOR = _UNITYMESSAGE, - __module__ = 'mlagents.envs.communicator_objects.unity_message_pb2' + __module__ = 'communicator_objects.unity_message_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityMessage) )) _sym_db.RegisterMessage(UnityMessage) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/python/communicator_objects/unity_output_pb2.py b/python/communicator_objects/unity_output_pb2.py new file mode 100644 index 0000000000..8700e72ad0 --- /dev/null +++ b/python/communicator_objects/unity_output_pb2.py @@ -0,0 +1,90 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: communicator_objects/unity_output.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from communicator_objects import unity_rl_output_pb2 as communicator__objects_dot_unity__rl__output__pb2 +from communicator_objects import unity_rl_initialization_output_pb2 as communicator__objects_dot_unity__rl__initialization__output__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='communicator_objects/unity_output.proto', + package='communicator_objects', + syntax='proto3', + serialized_pb=_b('\n\'communicator_objects/unity_output.proto\x12\x14\x63ommunicator_objects\x1a*communicator_objects/unity_rl_output.proto\x1a\x39\x63ommunicator_objects/unity_rl_initialization_output.proto\"\xb6\x01\n\x0bUnityOutput\x12\x36\n\trl_output\x18\x01 \x01(\x0b\x32#.communicator_objects.UnityRLOutput\x12S\n\x18rl_initialization_output\x18\x02 \x01(\x0b\x32\x31.communicator_objects.UnityRLInitializationOutput\x12\x1a\n\x12\x63ustom_data_output\x18\x03 \x01(\tB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + , + dependencies=[communicator__objects_dot_unity__rl__output__pb2.DESCRIPTOR,communicator__objects_dot_unity__rl__initialization__output__pb2.DESCRIPTOR,]) + + + + +_UNITYOUTPUT = _descriptor.Descriptor( + name='UnityOutput', + full_name='communicator_objects.UnityOutput', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='rl_output', full_name='communicator_objects.UnityOutput.rl_output', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='rl_initialization_output', full_name='communicator_objects.UnityOutput.rl_initialization_output', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='custom_data_output', full_name='communicator_objects.UnityOutput.custom_data_output', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=169, + serialized_end=351, +) + +_UNITYOUTPUT.fields_by_name['rl_output'].message_type = communicator__objects_dot_unity__rl__output__pb2._UNITYRLOUTPUT +_UNITYOUTPUT.fields_by_name['rl_initialization_output'].message_type = communicator__objects_dot_unity__rl__initialization__output__pb2._UNITYRLINITIALIZATIONOUTPUT +DESCRIPTOR.message_types_by_name['UnityOutput'] = _UNITYOUTPUT +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +UnityOutput = _reflection.GeneratedProtocolMessageType('UnityOutput', (_message.Message,), dict( + DESCRIPTOR = _UNITYOUTPUT, + __module__ = 'communicator_objects.unity_output_pb2' + # @@protoc_insertion_point(class_scope:communicator_objects.UnityOutput) + )) +_sym_db.RegisterMessage(UnityOutput) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) +# @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py b/python/communicator_objects/unity_rl_initialization_input_pb2.py similarity index 70% rename from ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py rename to python/communicator_objects/unity_rl_initialization_input_pb2.py index f01d1c397d..9110cd1873 100644 --- a/ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py +++ b/python/communicator_objects/unity_rl_initialization_input_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/unity_rl_initialization_input.proto +# source: communicator_objects/unity_rl_initialization_input.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,6 +7,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,11 +16,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/unity_rl_initialization_input.proto', + name='communicator_objects/unity_rl_initialization_input.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\nFmlagents/envs/communicator_objects/unity_rl_initialization_input.proto\x12\x14\x63ommunicator_objects\"*\n\x1aUnityRLInitializationInput\x12\x0c\n\x04seed\x18\x01 \x01(\x05\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n8communicator_objects/unity_rl_initialization_input.proto\x12\x14\x63ommunicator_objects\"*\n\x1aUnityRLInitializationInput\x12\x0c\n\x04seed\x18\x01 \x01(\x05\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') ) @@ -38,21 +38,21 @@ has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=96, - serialized_end=138, + serialized_start=82, + serialized_end=124, ) DESCRIPTOR.message_types_by_name['UnityRLInitializationInput'] = _UNITYRLINITIALIZATIONINPUT @@ -60,11 +60,12 @@ UnityRLInitializationInput = _reflection.GeneratedProtocolMessageType('UnityRLInitializationInput', (_message.Message,), dict( DESCRIPTOR = _UNITYRLINITIALIZATIONINPUT, - __module__ = 'mlagents.envs.communicator_objects.unity_rl_initialization_input_pb2' + __module__ = 'communicator_objects.unity_rl_initialization_input_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInitializationInput) )) _sym_db.RegisterMessage(UnityRLInitializationInput) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_output_pb2.py b/python/communicator_objects/unity_rl_initialization_output_pb2.py similarity index 61% rename from ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_output_pb2.py rename to python/communicator_objects/unity_rl_initialization_output_pb2.py index 1774fb13f2..835c15242a 100644 --- a/ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_output_pb2.py +++ b/python/communicator_objects/unity_rl_initialization_output_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/unity_rl_initialization_output.proto +# source: communicator_objects/unity_rl_initialization_output.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,23 +7,23 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import brain_parameters_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_brain__parameters__proto__pb2 -from mlagents.envs.communicator_objects import environment_parameters_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_environment__parameters__proto__pb2 +from communicator_objects import brain_parameters_proto_pb2 as communicator__objects_dot_brain__parameters__proto__pb2 +from communicator_objects import environment_parameters_proto_pb2 as communicator__objects_dot_environment__parameters__proto__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/unity_rl_initialization_output.proto', + name='communicator_objects/unity_rl_initialization_output.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\nGmlagents/envs/communicator_objects/unity_rl_initialization_output.proto\x12\x14\x63ommunicator_objects\x1a?mlagents/envs/communicator_objects/brain_parameters_proto.proto\x1a\x45mlagents/envs/communicator_objects/environment_parameters_proto.proto\"\xe6\x01\n\x1bUnityRLInitializationOutput\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08log_path\x18\x03 \x01(\t\x12\x44\n\x10\x62rain_parameters\x18\x05 \x03(\x0b\x32*.communicator_objects.BrainParametersProto\x12P\n\x16\x65nvironment_parameters\x18\x06 \x01(\x0b\x32\x30.communicator_objects.EnvironmentParametersProtoB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n9communicator_objects/unity_rl_initialization_output.proto\x12\x14\x63ommunicator_objects\x1a\x31\x63ommunicator_objects/brain_parameters_proto.proto\x1a\x37\x63ommunicator_objects/environment_parameters_proto.proto\"\xe6\x01\n\x1bUnityRLInitializationOutput\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08log_path\x18\x03 \x01(\t\x12\x44\n\x10\x62rain_parameters\x18\x05 \x03(\x0b\x32*.communicator_objects.BrainParametersProto\x12P\n\x16\x65nvironment_parameters\x18\x06 \x01(\x0b\x32\x30.communicator_objects.EnvironmentParametersProtoB\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_brain__parameters__proto__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_environment__parameters__proto__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_brain__parameters__proto__pb2.DESCRIPTOR,communicator__objects_dot_environment__parameters__proto__pb2.DESCRIPTOR,]) @@ -41,63 +41,64 @@ has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='version', full_name='communicator_objects.UnityRLInitializationOutput.version', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='log_path', full_name='communicator_objects.UnityRLInitializationOutput.log_path', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='brain_parameters', full_name='communicator_objects.UnityRLInitializationOutput.brain_parameters', index=3, number=5, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='environment_parameters', full_name='communicator_objects.UnityRLInitializationOutput.environment_parameters', index=4, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=234, - serialized_end=464, + serialized_start=192, + serialized_end=422, ) -_UNITYRLINITIALIZATIONOUTPUT.fields_by_name['brain_parameters'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_brain__parameters__proto__pb2._BRAINPARAMETERSPROTO -_UNITYRLINITIALIZATIONOUTPUT.fields_by_name['environment_parameters'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_environment__parameters__proto__pb2._ENVIRONMENTPARAMETERSPROTO +_UNITYRLINITIALIZATIONOUTPUT.fields_by_name['brain_parameters'].message_type = communicator__objects_dot_brain__parameters__proto__pb2._BRAINPARAMETERSPROTO +_UNITYRLINITIALIZATIONOUTPUT.fields_by_name['environment_parameters'].message_type = communicator__objects_dot_environment__parameters__proto__pb2._ENVIRONMENTPARAMETERSPROTO DESCRIPTOR.message_types_by_name['UnityRLInitializationOutput'] = _UNITYRLINITIALIZATIONOUTPUT _sym_db.RegisterFileDescriptor(DESCRIPTOR) UnityRLInitializationOutput = _reflection.GeneratedProtocolMessageType('UnityRLInitializationOutput', (_message.Message,), dict( DESCRIPTOR = _UNITYRLINITIALIZATIONOUTPUT, - __module__ = 'mlagents.envs.communicator_objects.unity_rl_initialization_output_pb2' + __module__ = 'communicator_objects.unity_rl_initialization_output_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInitializationOutput) )) _sym_db.RegisterMessage(UnityRLInitializationOutput) -DESCRIPTOR._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_rl_input_pb2.py b/python/communicator_objects/unity_rl_input_pb2.py similarity index 63% rename from ml-agents/mlagents/envs/communicator_objects/unity_rl_input_pb2.py rename to python/communicator_objects/unity_rl_input_pb2.py index 66a10a3947..819046d89a 100644 --- a/ml-agents/mlagents/envs/communicator_objects/unity_rl_input_pb2.py +++ b/python/communicator_objects/unity_rl_input_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/unity_rl_input.proto +# source: communicator_objects/unity_rl_input.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,24 +7,24 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import agent_action_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_agent__action__proto__pb2 -from mlagents.envs.communicator_objects import environment_parameters_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_environment__parameters__proto__pb2 -from mlagents.envs.communicator_objects import command_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_command__proto__pb2 +from communicator_objects import agent_action_proto_pb2 as communicator__objects_dot_agent__action__proto__pb2 +from communicator_objects import environment_parameters_proto_pb2 as communicator__objects_dot_environment__parameters__proto__pb2 +from communicator_objects import command_proto_pb2 as communicator__objects_dot_command__proto__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/unity_rl_input.proto', + name='communicator_objects/unity_rl_input.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n7mlagents/envs/communicator_objects/unity_rl_input.proto\x12\x14\x63ommunicator_objects\x1a;mlagents/envs/communicator_objects/agent_action_proto.proto\x1a\x45mlagents/envs/communicator_objects/environment_parameters_proto.proto\x1a\x36mlagents/envs/communicator_objects/command_proto.proto\"\xb4\x03\n\x0cUnityRLInput\x12K\n\ragent_actions\x18\x01 \x03(\x0b\x32\x34.communicator_objects.UnityRLInput.AgentActionsEntry\x12P\n\x16\x65nvironment_parameters\x18\x02 \x01(\x0b\x32\x30.communicator_objects.EnvironmentParametersProto\x12\x13\n\x0bis_training\x18\x03 \x01(\x08\x12\x33\n\x07\x63ommand\x18\x04 \x01(\x0e\x32\".communicator_objects.CommandProto\x1aM\n\x14ListAgentActionProto\x12\x35\n\x05value\x18\x01 \x03(\x0b\x32&.communicator_objects.AgentActionProto\x1al\n\x11\x41gentActionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.communicator_objects.UnityRLInput.ListAgentActionProto:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n)communicator_objects/unity_rl_input.proto\x12\x14\x63ommunicator_objects\x1a-communicator_objects/agent_action_proto.proto\x1a\x37\x63ommunicator_objects/environment_parameters_proto.proto\x1a(communicator_objects/command_proto.proto\"\xb4\x03\n\x0cUnityRLInput\x12K\n\ragent_actions\x18\x01 \x03(\x0b\x32\x34.communicator_objects.UnityRLInput.AgentActionsEntry\x12P\n\x16\x65nvironment_parameters\x18\x02 \x01(\x0b\x32\x30.communicator_objects.EnvironmentParametersProto\x12\x13\n\x0bis_training\x18\x03 \x01(\x08\x12\x33\n\x07\x63ommand\x18\x04 \x01(\x0e\x32\".communicator_objects.CommandProto\x1aM\n\x14ListAgentActionProto\x12\x35\n\x05value\x18\x01 \x03(\x0b\x32&.communicator_objects.AgentActionProto\x1al\n\x11\x41gentActionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.communicator_objects.UnityRLInput.ListAgentActionProto:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_agent__action__proto__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_environment__parameters__proto__pb2.DESCRIPTOR,mlagents_dot_envs_dot_communicator__objects_dot_command__proto__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_agent__action__proto__pb2.DESCRIPTOR,communicator__objects_dot_environment__parameters__proto__pb2.DESCRIPTOR,communicator__objects_dot_command__proto__pb2.DESCRIPTOR,]) @@ -42,21 +42,21 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=519, - serialized_end=596, + serialized_start=463, + serialized_end=540, ) _UNITYRLINPUT_AGENTACTIONSENTRY = _descriptor.Descriptor( @@ -72,28 +72,28 @@ has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='communicator_objects.UnityRLInput.AgentActionsEntry.value', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=_b('8\001'), + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=598, - serialized_end=706, + serialized_start=542, + serialized_end=650, ) _UNITYRLINPUT = _descriptor.Descriptor( @@ -109,51 +109,51 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='environment_parameters', full_name='communicator_objects.UnityRLInput.environment_parameters', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_training', full_name='communicator_objects.UnityRLInput.is_training', index=2, number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='command', full_name='communicator_objects.UnityRLInput.command', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_UNITYRLINPUT_LISTAGENTACTIONPROTO, _UNITYRLINPUT_AGENTACTIONSENTRY, ], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=270, - serialized_end=706, + serialized_start=214, + serialized_end=650, ) -_UNITYRLINPUT_LISTAGENTACTIONPROTO.fields_by_name['value'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_agent__action__proto__pb2._AGENTACTIONPROTO +_UNITYRLINPUT_LISTAGENTACTIONPROTO.fields_by_name['value'].message_type = communicator__objects_dot_agent__action__proto__pb2._AGENTACTIONPROTO _UNITYRLINPUT_LISTAGENTACTIONPROTO.containing_type = _UNITYRLINPUT _UNITYRLINPUT_AGENTACTIONSENTRY.fields_by_name['value'].message_type = _UNITYRLINPUT_LISTAGENTACTIONPROTO _UNITYRLINPUT_AGENTACTIONSENTRY.containing_type = _UNITYRLINPUT _UNITYRLINPUT.fields_by_name['agent_actions'].message_type = _UNITYRLINPUT_AGENTACTIONSENTRY -_UNITYRLINPUT.fields_by_name['environment_parameters'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_environment__parameters__proto__pb2._ENVIRONMENTPARAMETERSPROTO -_UNITYRLINPUT.fields_by_name['command'].enum_type = mlagents_dot_envs_dot_communicator__objects_dot_command__proto__pb2._COMMANDPROTO +_UNITYRLINPUT.fields_by_name['environment_parameters'].message_type = communicator__objects_dot_environment__parameters__proto__pb2._ENVIRONMENTPARAMETERSPROTO +_UNITYRLINPUT.fields_by_name['command'].enum_type = communicator__objects_dot_command__proto__pb2._COMMANDPROTO DESCRIPTOR.message_types_by_name['UnityRLInput'] = _UNITYRLINPUT _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -161,19 +161,19 @@ ListAgentActionProto = _reflection.GeneratedProtocolMessageType('ListAgentActionProto', (_message.Message,), dict( DESCRIPTOR = _UNITYRLINPUT_LISTAGENTACTIONPROTO, - __module__ = 'mlagents.envs.communicator_objects.unity_rl_input_pb2' + __module__ = 'communicator_objects.unity_rl_input_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInput.ListAgentActionProto) )) , AgentActionsEntry = _reflection.GeneratedProtocolMessageType('AgentActionsEntry', (_message.Message,), dict( DESCRIPTOR = _UNITYRLINPUT_AGENTACTIONSENTRY, - __module__ = 'mlagents.envs.communicator_objects.unity_rl_input_pb2' + __module__ = 'communicator_objects.unity_rl_input_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInput.AgentActionsEntry) )) , DESCRIPTOR = _UNITYRLINPUT, - __module__ = 'mlagents.envs.communicator_objects.unity_rl_input_pb2' + __module__ = 'communicator_objects.unity_rl_input_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityRLInput) )) _sym_db.RegisterMessage(UnityRLInput) @@ -181,6 +181,8 @@ _sym_db.RegisterMessage(UnityRLInput.AgentActionsEntry) -DESCRIPTOR._options = None -_UNITYRLINPUT_AGENTACTIONSENTRY._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) +_UNITYRLINPUT_AGENTACTIONSENTRY.has_options = True +_UNITYRLINPUT_AGENTACTIONSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_rl_output_pb2.py b/python/communicator_objects/unity_rl_output_pb2.py similarity index 70% rename from ml-agents/mlagents/envs/communicator_objects/unity_rl_output_pb2.py rename to python/communicator_objects/unity_rl_output_pb2.py index a3c2910e0e..4f1763d558 100644 --- a/ml-agents/mlagents/envs/communicator_objects/unity_rl_output_pb2.py +++ b/python/communicator_objects/unity_rl_output_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/unity_rl_output.proto +# source: communicator_objects/unity_rl_output.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -7,22 +7,22 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import agent_info_proto_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_agent__info__proto__pb2 +from communicator_objects import agent_info_proto_pb2 as communicator__objects_dot_agent__info__proto__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/unity_rl_output.proto', + name='communicator_objects/unity_rl_output.proto', package='communicator_objects', syntax='proto3', - serialized_options=_b('\252\002\034MLAgents.CommunicatorObjects'), - serialized_pb=_b('\n8mlagents/envs/communicator_objects/unity_rl_output.proto\x12\x14\x63ommunicator_objects\x1a\x39mlagents/envs/communicator_objects/agent_info_proto.proto\"\xa3\x02\n\rUnityRLOutput\x12\x13\n\x0bglobal_done\x18\x01 \x01(\x08\x12G\n\nagentInfos\x18\x02 \x03(\x0b\x32\x33.communicator_objects.UnityRLOutput.AgentInfosEntry\x1aI\n\x12ListAgentInfoProto\x12\x33\n\x05value\x18\x01 \x03(\x0b\x32$.communicator_objects.AgentInfoProto\x1ai\n\x0f\x41gentInfosEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.communicator_objects.UnityRLOutput.ListAgentInfoProto:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n*communicator_objects/unity_rl_output.proto\x12\x14\x63ommunicator_objects\x1a+communicator_objects/agent_info_proto.proto\"\xa3\x02\n\rUnityRLOutput\x12\x13\n\x0bglobal_done\x18\x01 \x01(\x08\x12G\n\nagentInfos\x18\x02 \x03(\x0b\x32\x33.communicator_objects.UnityRLOutput.AgentInfosEntry\x1aI\n\x12ListAgentInfoProto\x12\x33\n\x05value\x18\x01 \x03(\x0b\x32$.communicator_objects.AgentInfoProto\x1ai\n\x0f\x41gentInfosEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.communicator_objects.UnityRLOutput.ListAgentInfoProto:\x02\x38\x01\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_agent__info__proto__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_agent__info__proto__pb2.DESCRIPTOR,]) @@ -40,21 +40,21 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=253, - serialized_end=326, + serialized_start=225, + serialized_end=298, ) _UNITYRLOUTPUT_AGENTINFOSENTRY = _descriptor.Descriptor( @@ -70,28 +70,28 @@ has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='communicator_objects.UnityRLOutput.AgentInfosEntry.value', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], - serialized_options=_b('8\001'), + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=328, - serialized_end=433, + serialized_start=300, + serialized_end=405, ) _UNITYRLOUTPUT = _descriptor.Descriptor( @@ -107,31 +107,31 @@ has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='agentInfos', full_name='communicator_objects.UnityRLOutput.agentInfos', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), + options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_UNITYRLOUTPUT_LISTAGENTINFOPROTO, _UNITYRLOUTPUT_AGENTINFOSENTRY, ], enum_types=[ ], - serialized_options=None, + options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=142, - serialized_end=433, + serialized_start=114, + serialized_end=405, ) -_UNITYRLOUTPUT_LISTAGENTINFOPROTO.fields_by_name['value'].message_type = mlagents_dot_envs_dot_communicator__objects_dot_agent__info__proto__pb2._AGENTINFOPROTO +_UNITYRLOUTPUT_LISTAGENTINFOPROTO.fields_by_name['value'].message_type = communicator__objects_dot_agent__info__proto__pb2._AGENTINFOPROTO _UNITYRLOUTPUT_LISTAGENTINFOPROTO.containing_type = _UNITYRLOUTPUT _UNITYRLOUTPUT_AGENTINFOSENTRY.fields_by_name['value'].message_type = _UNITYRLOUTPUT_LISTAGENTINFOPROTO _UNITYRLOUTPUT_AGENTINFOSENTRY.containing_type = _UNITYRLOUTPUT @@ -143,19 +143,19 @@ ListAgentInfoProto = _reflection.GeneratedProtocolMessageType('ListAgentInfoProto', (_message.Message,), dict( DESCRIPTOR = _UNITYRLOUTPUT_LISTAGENTINFOPROTO, - __module__ = 'mlagents.envs.communicator_objects.unity_rl_output_pb2' + __module__ = 'communicator_objects.unity_rl_output_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityRLOutput.ListAgentInfoProto) )) , AgentInfosEntry = _reflection.GeneratedProtocolMessageType('AgentInfosEntry', (_message.Message,), dict( DESCRIPTOR = _UNITYRLOUTPUT_AGENTINFOSENTRY, - __module__ = 'mlagents.envs.communicator_objects.unity_rl_output_pb2' + __module__ = 'communicator_objects.unity_rl_output_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityRLOutput.AgentInfosEntry) )) , DESCRIPTOR = _UNITYRLOUTPUT, - __module__ = 'mlagents.envs.communicator_objects.unity_rl_output_pb2' + __module__ = 'communicator_objects.unity_rl_output_pb2' # @@protoc_insertion_point(class_scope:communicator_objects.UnityRLOutput) )) _sym_db.RegisterMessage(UnityRLOutput) @@ -163,6 +163,8 @@ _sym_db.RegisterMessage(UnityRLOutput.AgentInfosEntry) -DESCRIPTOR._options = None -_UNITYRLOUTPUT_AGENTINFOSENTRY._options = None +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\252\002\034MLAgents.CommunicatorObjects')) +_UNITYRLOUTPUT_AGENTINFOSENTRY.has_options = True +_UNITYRLOUTPUT_AGENTINFOSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) # @@protoc_insertion_point(module_scope) diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_to_external_pb2.py b/python/communicator_objects/unity_to_external_pb2.py similarity index 57% rename from ml-agents/mlagents/envs/communicator_objects/unity_to_external_pb2.py rename to python/communicator_objects/unity_to_external_pb2.py index abac14cb9e..f9e61b3442 100644 --- a/ml-agents/mlagents/envs/communicator_objects/unity_to_external_pb2.py +++ b/python/communicator_objects/unity_to_external_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mlagents/envs/communicator_objects/unity_to_external.proto +# source: communicator_objects/unity_to_external.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -13,16 +13,16 @@ _sym_db = _symbol_database.Default() -from mlagents.envs.communicator_objects import unity_message_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2 +from communicator_objects import unity_message_pb2 as communicator__objects_dot_unity__message__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='mlagents/envs/communicator_objects/unity_to_external.proto', + name='communicator_objects/unity_to_external.proto', package='communicator_objects', syntax='proto3', - serialized_pb=_b('\n:mlagents/envs/communicator_objects/unity_to_external.proto\x12\x14\x63ommunicator_objects\x1a\x36mlagents/envs/communicator_objects/unity_message.proto2g\n\x0fUnityToExternal\x12T\n\x08\x45xchange\x12\".communicator_objects.UnityMessage\x1a\".communicator_objects.UnityMessage\"\x00\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') + serialized_pb=_b('\n,communicator_objects/unity_to_external.proto\x12\x14\x63ommunicator_objects\x1a(communicator_objects/unity_message.proto2g\n\x0fUnityToExternal\x12T\n\x08\x45xchange\x12\".communicator_objects.UnityMessage\x1a\".communicator_objects.UnityMessage\"\x00\x42\x1f\xaa\x02\x1cMLAgents.CommunicatorObjectsb\x06proto3') , - dependencies=[mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2.DESCRIPTOR,]) + dependencies=[communicator__objects_dot_unity__message__pb2.DESCRIPTOR,]) @@ -38,16 +38,16 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=140, - serialized_end=243, + serialized_start=112, + serialized_end=215, methods=[ _descriptor.MethodDescriptor( name='Exchange', full_name='communicator_objects.UnityToExternal.Exchange', index=0, containing_service=None, - input_type=mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2._UNITYMESSAGE, - output_type=mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2._UNITYMESSAGE, + input_type=communicator__objects_dot_unity__message__pb2._UNITYMESSAGE, + output_type=communicator__objects_dot_unity__message__pb2._UNITYMESSAGE, options=None, ), ]) diff --git a/ml-agents/mlagents/envs/communicator_objects/unity_to_external_pb2_grpc.py b/python/communicator_objects/unity_to_external_pb2_grpc.py similarity index 63% rename from ml-agents/mlagents/envs/communicator_objects/unity_to_external_pb2_grpc.py rename to python/communicator_objects/unity_to_external_pb2_grpc.py index bacf5928a5..52c2d67bd5 100644 --- a/ml-agents/mlagents/envs/communicator_objects/unity_to_external_pb2_grpc.py +++ b/python/communicator_objects/unity_to_external_pb2_grpc.py @@ -1,7 +1,7 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from mlagents.envs.communicator_objects import unity_message_pb2 as mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2 +from communicator_objects import unity_message_pb2 as communicator__objects_dot_unity__message__pb2 class UnityToExternalStub(object): @@ -16,8 +16,8 @@ def __init__(self, channel): """ self.Exchange = channel.unary_unary( '/communicator_objects.UnityToExternal/Exchange', - request_serializer=mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2.UnityMessage.SerializeToString, - response_deserializer=mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2.UnityMessage.FromString, + request_serializer=communicator__objects_dot_unity__message__pb2.UnityMessage.SerializeToString, + response_deserializer=communicator__objects_dot_unity__message__pb2.UnityMessage.FromString, ) @@ -37,8 +37,8 @@ def add_UnityToExternalServicer_to_server(servicer, server): rpc_method_handlers = { 'Exchange': grpc.unary_unary_rpc_method_handler( servicer.Exchange, - request_deserializer=mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2.UnityMessage.FromString, - response_serializer=mlagents_dot_envs_dot_communicator__objects_dot_unity__message__pb2.UnityMessage.SerializeToString, + request_deserializer=communicator__objects_dot_unity__message__pb2.UnityMessage.FromString, + response_serializer=communicator__objects_dot_unity__message__pb2.UnityMessage.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( diff --git a/config/curricula/push-block/PushBlockBrain.json b/python/curricula/push.json similarity index 94% rename from config/curricula/push-block/PushBlockBrain.json rename to python/curricula/push.json index cc0b372092..6eb4a08a65 100644 --- a/config/curricula/push-block/PushBlockBrain.json +++ b/python/curricula/push.json @@ -1,7 +1,7 @@ { "measure" : "reward", "thresholds" : [0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75], - "min_lesson_length" : 100, + "min_lesson_length" : 2, "signal_smoothing" : true, "parameters" : { diff --git a/config/curricula/test/TestBrain.json b/python/curricula/test.json similarity index 88% rename from config/curricula/test/TestBrain.json rename to python/curricula/test.json index 9a314c99c2..c6a95884f9 100644 --- a/config/curricula/test/TestBrain.json +++ b/python/curricula/test.json @@ -1,7 +1,7 @@ { "measure" : "reward", "thresholds" : [10, 20, 50], - "min_lesson_length" : 100, + "min_lesson_length" : 3, "signal_smoothing" : true, "parameters" : { diff --git a/config/curricula/wall-jump/BigWallBrain.json b/python/curricula/wall.json similarity index 58% rename from config/curricula/wall-jump/BigWallBrain.json rename to python/curricula/wall.json index 3563b3e41b..4ab2a70b6f 100644 --- a/config/curricula/wall-jump/BigWallBrain.json +++ b/python/curricula/wall.json @@ -1,11 +1,12 @@ { "measure" : "progress", "thresholds" : [0.1, 0.3, 0.5], - "min_lesson_length": 100, + "min_lesson_length" : 2, "signal_smoothing" : true, "parameters" : { "big_wall_min_height" : [0.0, 4.0, 6.0, 8.0], - "big_wall_max_height" : [4.0, 7.0, 8.0, 8.0] + "big_wall_max_height" : [4.0, 7.0, 8.0, 8.0], + "small_wall_height" : [1.5, 2.0, 2.5, 4.0] } } diff --git a/python/learn.py b/python/learn.py new file mode 100755 index 0000000000..36036fcfd3 --- /dev/null +++ b/python/learn.py @@ -0,0 +1,84 @@ +# # Unity ML-Agents Toolkit +# ## ML-Agent Learning + +import logging + +import os +from docopt import docopt + +from unitytrainers.trainer_controller import TrainerController + + +if __name__ == '__main__': + print(''' + + ▄▄▄▓▓▓▓ + ╓▓▓▓▓▓▓█▓▓▓▓▓ + ,▄▄▄m▀▀▀' ,▓▓▓▀▓▓▄ ▓▓▓ ▓▓▌ + ▄▓▓▓▀' ▄▓▓▀ ▓▓▓ ▄▄ ▄▄ ,▄▄ ▄▄▄▄ ,▄▄ ▄▓▓▌▄ ▄▄▄ ,▄▄ + ▄▓▓▓▀ ▄▓▓▀ ▐▓▓▌ ▓▓▌ ▐▓▓ ▐▓▓▓▀▀▀▓▓▌ ▓▓▓ ▀▓▓▌▀ ^▓▓▌ ╒▓▓▌ + ▄▓▓▓▓▓▄▄▄▄▄▄▄▄▓▓▓ ▓▀ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▄ ▓▓▌ + ▀▓▓▓▓▀▀▀▀▀▀▀▀▀▀▓▓▄ ▓▓ ▓▓▌ ▐▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▌ ▐▓▓▐▓▓ + ^█▓▓▓ ▀▓▓▄ ▐▓▓▌ ▓▓▓▓▄▓▓▓▓ ▐▓▓ ▓▓▓ ▓▓▓ ▓▓▓▄ ▓▓▓▓` + '▀▓▓▓▄ ^▓▓▓ ▓▓▓ └▀▀▀▀ ▀▀ ^▀▀ `▀▀ `▀▀ '▀▀ ▐▓▓▌ + ▀▀▀▀▓▄▄▄ ▓▓▓▓▓▓, ▓▓▓▓▀ + `▀█▓▓▓▓▓▓▓▓▓▌ + ¬`▀▀▀█▓ + +''') + + logger = logging.getLogger("unityagents") + _USAGE = ''' + Usage: + learn () [options] + learn [options] + learn --help + + Options: + --curriculum= Curriculum json file for environment [default: None]. + --keep-checkpoints= How many model checkpoints to keep [default: 5]. + --lesson= Start learning from this lesson [default: 0]. + --load Whether to load the model or randomly initialize [default: False]. + --run-id= The sub-directory name for model and summary statistics [default: ppo]. + --save-freq= Frequency at which to save model [default: 50000]. + --seed= Random seed used for training [default: -1]. + --slow Whether to run the game at training speed [default: False]. + --train Whether to train model, or only run inference [default: False]. + --worker-id= Number to add to communication port (5005). Used for multi-environment [default: 0]. + --docker-target-name=
Docker Volume to store curriculum, executable and model files [default: Empty]. + --no-graphics Whether to run the Unity simulator in no-graphics mode [default: False]. + ''' + + options = docopt(_USAGE) + logger.info(options) + # Docker Parameters + if options['--docker-target-name'] == 'Empty': + docker_target_name = '' + else: + docker_target_name = options['--docker-target-name'] + + # General parameters + run_id = options['--run-id'] + seed = int(options['--seed']) + load_model = options['--load'] + train_model = options['--train'] + save_freq = int(options['--save-freq']) + env_path = options[''] + keep_checkpoints = int(options['--keep-checkpoints']) + worker_id = int(options['--worker-id']) + curriculum_file = str(options['--curriculum']) + if curriculum_file == "None": + curriculum_file = None + lesson = int(options['--lesson']) + fast_simulation = not bool(options['--slow']) + no_graphics = options['--no-graphics'] + + # Constants + # Assumption that this yaml is present in same dir as this file + base_path = os.path.dirname(__file__) + TRAINER_CONFIG_PATH = os.path.abspath(os.path.join(base_path, "trainer_config.yaml")) + + tc = TrainerController(env_path, run_id, save_freq, curriculum_file, fast_simulation, load_model, train_model, + worker_id, keep_checkpoints, lesson, seed, docker_target_name, TRAINER_CONFIG_PATH, + no_graphics) + tc.start_learning() diff --git a/ml-agents/requirements.txt b/python/requirements.txt similarity index 87% rename from ml-agents/requirements.txt rename to python/requirements.txt index c885393d7f..ed3ebf84d0 100644 --- a/ml-agents/requirements.txt +++ b/python/requirements.txt @@ -6,5 +6,5 @@ jupyter pytest>=3.2.2 docopt pyyaml -protobuf==3.6.0 +protobuf==3.5.2 grpcio==1.11.0 diff --git a/python/setup.py b/python/setup.py new file mode 100755 index 0000000000..c69444fbd4 --- /dev/null +++ b/python/setup.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +from setuptools import setup, Command, find_packages + + +with open('requirements.txt') as f: + required = f.read().splitlines() + +setup(name='unityagents', + version='0.4.0', + description='Unity Machine Learning Agents', + license='Apache License 2.0', + author='Unity Technologies', + author_email='ML-Agents@unity3d.com', + url='https://github.com/Unity-Technologies/ml-agents', + packages=find_packages(), + install_requires = required, + long_description= ("Unity Machine Learning Agents allows researchers and developers " + "to transform games and simulations created using the Unity Editor into environments " + "where intelligent agents can be trained using reinforcement learning, evolutionary " + "strategies, or other machine learning methods through a simple to use Python API.") + ) diff --git a/python/tests/__init__.py b/python/tests/__init__.py new file mode 100644 index 0000000000..853be765f8 --- /dev/null +++ b/python/tests/__init__.py @@ -0,0 +1,2 @@ +from unityagents import * +from unitytrainers import * diff --git a/ml-agents/tests/mock_communicator.py b/python/tests/mock_communicator.py similarity index 78% rename from ml-agents/tests/mock_communicator.py rename to python/tests/mock_communicator.py index 43365d77c0..529622e6cc 100755 --- a/ml-agents/tests/mock_communicator.py +++ b/python/tests/mock_communicator.py @@ -1,11 +1,12 @@ -from mlagents.envs.communicator import Communicator -from mlagents.envs.communicator_objects import UnityMessage, UnityOutput, UnityInput,\ + +from unityagents.communicator import Communicator +from communicator_objects import UnityMessage, UnityOutput, UnityInput,\ ResolutionProto, BrainParametersProto, UnityRLInitializationOutput,\ AgentInfoProto, UnityRLOutput class MockCommunicator(Communicator): - def __init__(self, discrete_action=False, visual_inputs=0, stack=True, num_agents=3): + def __init__(self, discrete_action=False, visual_inputs=0): """ Python side of the grpc communication. Python is the client and Unity the server @@ -16,11 +17,6 @@ def __init__(self, discrete_action=False, visual_inputs=0, stack=True, num_agent self.steps = 0 self.visual_inputs = visual_inputs self.has_been_closed = False - self.num_agents = num_agents - if stack: - self.num_stacks = 2 - else: - self.num_stacks = 1 def initialize(self, inputs: UnityInput) -> UnityOutput: resolutions = [ResolutionProto( @@ -29,17 +25,18 @@ def initialize(self, inputs: UnityInput) -> UnityOutput: gray_scale=False) for i in range(self.visual_inputs)] bp = BrainParametersProto( vector_observation_size=3, - num_stacked_vector_observations=self.num_stacks, - vector_action_size=[2], + num_stacked_vector_observations=2, + vector_action_size=2, camera_resolutions=resolutions, vector_action_descriptions=["", ""], vector_action_space_type=int(not self.is_discrete), + vector_observation_space_type=1, brain_name="RealFakeBrain", brain_type=2 ) rl_init = UnityRLInitializationOutput( name="RealFakeAcademy", - version="API-5", + version="API-4", log_path="", brain_parameters=[bp] ) @@ -54,15 +51,10 @@ def exchange(self, inputs: UnityInput) -> UnityOutput: else: vector_action = [1, 2] list_agent_info = [] - if self.num_stacks == 1: - observation = [1, 2, 3] - else: - observation = [1, 2, 3, 1, 2, 3] - - for i in range(self.num_agents): + for i in range(3): list_agent_info.append( AgentInfoProto( - stacked_vector_observation=observation, + stacked_vector_observation=[1, 2, 3, 1, 2, 3], reward=1, stored_vector_actions=vector_action, stored_text_actions="", diff --git a/ml-agents/tests/trainers/test_bc.py b/python/tests/test_bc.py similarity index 58% rename from ml-agents/tests/trainers/test_bc.py rename to python/tests/test_bc.py index ede499aeaa..aea406a85c 100644 --- a/ml-agents/tests/trainers/test_bc.py +++ b/python/tests/test_bc.py @@ -3,52 +3,14 @@ import numpy as np import tensorflow as tf -import yaml - -from mlagents.trainers.bc.models import BehavioralCloningModel -from mlagents.trainers.bc.policy import BCPolicy -from mlagents.envs import UnityEnvironment -from tests.mock_communicator import MockCommunicator - - -@pytest.fixture -def dummy_config(): - return yaml.load( - ''' - hidden_units: 128 - learning_rate: 3.0e-4 - num_layers: 2 - use_recurrent: false - sequence_length: 32 - memory_size: 32 - ''') - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_bc_policy_evaluate(mock_communicator, mock_launcher): - tf.reset_default_graph() - with tf.Session() as sess: - mock_communicator.return_value = MockCommunicator( - discrete_action=False, visual_inputs=0) - env = UnityEnvironment(' ') - brain_infos = env.reset() - brain_info = brain_infos[env.brain_names[0]] - - trainer_parameters = dummy_config() - graph_scope = env.brain_names[0] - trainer_parameters['graph_scope'] = graph_scope - policy = BCPolicy(0, env.brains[env.brain_names[0]], trainer_parameters, sess) - init = tf.global_variables_initializer() - sess.run(init) - run_out = policy.evaluate(brain_info) - assert run_out['action'].shape == (3, 2) - - env.close() - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') + +from unitytrainers.bc.models import BehavioralCloningModel +from unityagents import UnityEnvironment +from .mock_communicator import MockCommunicator + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_cc_bc_model(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -64,13 +26,13 @@ def test_cc_bc_model(mock_communicator, mock_launcher): feed_dict = {model.batch_size: 2, model.sequence_length: 1, model.vector_in: np.array([[1, 2, 3, 1, 2, 3], - [3, 4, 5, 3, 4, 5]])} + [3, 4, 5, 3, 4, 5]])} sess.run(run_list, feed_dict=feed_dict) env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_dc_bc_model(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -82,19 +44,18 @@ def test_dc_bc_model(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.sample_action, model.action_probs] + run_list = [model.sample_action, model.policy] feed_dict = {model.batch_size: 2, model.dropout_rate: 1.0, model.sequence_length: 1, model.vector_in: np.array([[1, 2, 3, 1, 2, 3], - [3, 4, 5, 3, 4, 5]]), - model.action_masks: np.ones([2, 2])} + [3, 4, 5, 3, 4, 5]])} sess.run(run_list, feed_dict=feed_dict) env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_visual_dc_bc_model(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -106,21 +67,20 @@ def test_visual_dc_bc_model(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.sample_action, model.action_probs] + run_list = [model.sample_action, model.policy] feed_dict = {model.batch_size: 2, model.dropout_rate: 1.0, model.sequence_length: 1, model.vector_in: np.array([[1, 2, 3, 1, 2, 3], - [3, 4, 5, 3, 4, 5]]), + [3, 4, 5, 3, 4, 5]]), model.visual_in[0]: np.ones([2, 40, 30, 3]), - model.visual_in[1]: np.ones([2, 40, 30, 3]), - model.action_masks: np.ones([2, 2])} + model.visual_in[1]: np.ones([2, 40, 30, 3])} sess.run(run_list, feed_dict=feed_dict) env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_visual_cc_bc_model(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -136,7 +96,7 @@ def test_visual_cc_bc_model(mock_communicator, mock_launcher): feed_dict = {model.batch_size: 2, model.sequence_length: 1, model.vector_in: np.array([[1, 2, 3, 1, 2, 3], - [3, 4, 5, 3, 4, 5]]), + [3, 4, 5, 3, 4, 5]]), model.visual_in[0]: np.ones([2, 40, 30, 3]), model.visual_in[1]: np.ones([2, 40, 30, 3])} sess.run(run_list, feed_dict=feed_dict) diff --git a/ml-agents/tests/trainers/test_ppo.py b/python/tests/test_ppo.py similarity index 71% rename from ml-agents/tests/trainers/test_ppo.py rename to python/tests/test_ppo.py index d13d8a38db..8de54b17d5 100644 --- a/ml-agents/tests/trainers/test_ppo.py +++ b/python/tests/test_ppo.py @@ -3,67 +3,15 @@ import numpy as np import tensorflow as tf -import yaml - -from mlagents.trainers.ppo.models import PPOModel -from mlagents.trainers.ppo.trainer import discount_rewards -from mlagents.trainers.ppo.policy import PPOPolicy -from mlagents.envs import UnityEnvironment -from tests.mock_communicator import MockCommunicator - - -@pytest.fixture -def dummy_config(): - return yaml.load( - ''' - trainer: ppo - batch_size: 32 - beta: 5.0e-3 - buffer_size: 512 - epsilon: 0.2 - gamma: 0.99 - hidden_units: 128 - lambd: 0.95 - learning_rate: 3.0e-4 - max_steps: 5.0e4 - normalize: true - num_epoch: 5 - num_layers: 2 - time_horizon: 64 - sequence_length: 64 - summary_freq: 1000 - use_recurrent: false - memory_size: 8 - use_curiosity: false - curiosity_strength: 0.0 - curiosity_enc_size: 1 - ''') - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') -def test_ppo_policy_evaluate(mock_communicator, mock_launcher): - tf.reset_default_graph() - with tf.Session() as sess: - mock_communicator.return_value = MockCommunicator( - discrete_action=False, visual_inputs=0) - env = UnityEnvironment(' ') - brain_infos = env.reset() - brain_info = brain_infos[env.brain_names[0]] - - trainer_parameters = dummy_config() - graph_scope = env.brain_names[0] - trainer_parameters['graph_scope'] = graph_scope - policy = PPOPolicy(0, env.brains[env.brain_names[0]], trainer_parameters, sess, False) - init = tf.global_variables_initializer() - sess.run(init) - run_out = policy.evaluate(brain_info) - assert run_out['action'].shape == (3, 2) - env.close() - - -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') + +from unitytrainers.ppo.models import PPOModel +from unitytrainers.ppo.trainer import discount_rewards +from unityagents import UnityEnvironment +from .mock_communicator import MockCommunicator + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_cc_vector(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -76,7 +24,7 @@ def test_ppo_model_cc_vector(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.log_probs, model.value, model.entropy, + run_list = [model.output, model.probs, model.value, model.entropy, model.learning_rate] feed_dict = {model.batch_size: 2, model.sequence_length: 1, @@ -86,8 +34,8 @@ def test_ppo_model_cc_vector(mock_communicator, mock_launcher): env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_cc_visual(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -100,7 +48,7 @@ def test_ppo_model_cc_visual(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.log_probs, model.value, model.entropy, + run_list = [model.output, model.probs, model.value, model.entropy, model.learning_rate] feed_dict = {model.batch_size: 2, model.sequence_length: 1, @@ -112,8 +60,8 @@ def test_ppo_model_cc_visual(mock_communicator, mock_launcher): env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_dc_visual(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -125,22 +73,21 @@ def test_ppo_model_dc_visual(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.all_log_probs, model.value, model.entropy, + run_list = [model.output, model.all_probs, model.value, model.entropy, model.learning_rate] feed_dict = {model.batch_size: 2, model.sequence_length: 1, model.vector_in: np.array([[1, 2, 3, 1, 2, 3], [3, 4, 5, 3, 4, 5]]), model.visual_in[0]: np.ones([2, 40, 30, 3]), - model.visual_in[1]: np.ones([2, 40, 30, 3]), - model.action_masks: np.ones([2,2]) + model.visual_in[1]: np.ones([2, 40, 30, 3]) } sess.run(run_list, feed_dict=feed_dict) env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_dc_vector(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -152,19 +99,18 @@ def test_ppo_model_dc_vector(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.all_log_probs, model.value, model.entropy, + run_list = [model.output, model.all_probs, model.value, model.entropy, model.learning_rate] feed_dict = {model.batch_size: 2, model.sequence_length: 1, model.vector_in: np.array([[1, 2, 3, 1, 2, 3], - [3, 4, 5, 3, 4, 5]]), - model.action_masks: np.ones([2,2])} + [3, 4, 5, 3, 4, 5]])} sess.run(run_list, feed_dict=feed_dict) env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_dc_vector_rnn(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -177,21 +123,20 @@ def test_ppo_model_dc_vector_rnn(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.all_log_probs, model.value, model.entropy, + run_list = [model.output, model.all_probs, model.value, model.entropy, model.learning_rate, model.memory_out] feed_dict = {model.batch_size: 1, model.sequence_length: 2, - model.prev_action: [[0], [0]], + model.prev_action: [0, 0], model.memory_in: np.zeros((1, memory_size)), model.vector_in: np.array([[1, 2, 3, 1, 2, 3], - [3, 4, 5, 3, 4, 5]]), - model.action_masks: np.ones([1,2])} + [3, 4, 5, 3, 4, 5]])} sess.run(run_list, feed_dict=feed_dict) env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_cc_vector_rnn(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -204,7 +149,7 @@ def test_ppo_model_cc_vector_rnn(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.all_log_probs, model.value, model.entropy, + run_list = [model.output, model.all_probs, model.value, model.entropy, model.learning_rate, model.memory_out] feed_dict = {model.batch_size: 1, model.sequence_length: 2, @@ -215,8 +160,8 @@ def test_ppo_model_cc_vector_rnn(mock_communicator, mock_launcher): env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_dc_vector_curio(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -228,7 +173,7 @@ def test_ppo_model_dc_vector_curio(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.all_log_probs, model.value, model.entropy, + run_list = [model.output, model.all_probs, model.value, model.entropy, model.learning_rate, model.intrinsic_reward] feed_dict = {model.batch_size: 2, model.sequence_length: 1, @@ -236,14 +181,13 @@ def test_ppo_model_dc_vector_curio(mock_communicator, mock_launcher): [3, 4, 5, 3, 4, 5]]), model.next_vector_in: np.array([[1, 2, 3, 1, 2, 3], [3, 4, 5, 3, 4, 5]]), - model.action_holder: [[0], [0]], - model.action_masks: np.ones([2,2])} + model.action_holder: [0, 0]} sess.run(run_list, feed_dict=feed_dict) env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_cc_vector_curio(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -255,7 +199,7 @@ def test_ppo_model_cc_vector_curio(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.all_log_probs, model.value, model.entropy, + run_list = [model.output, model.all_probs, model.value, model.entropy, model.learning_rate, model.intrinsic_reward] feed_dict = {model.batch_size: 2, model.sequence_length: 1, @@ -268,8 +212,8 @@ def test_ppo_model_cc_vector_curio(mock_communicator, mock_launcher): env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_dc_visual_curio(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -281,7 +225,7 @@ def test_ppo_model_dc_visual_curio(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.all_log_probs, model.value, model.entropy, + run_list = [model.output, model.all_probs, model.value, model.entropy, model.learning_rate, model.intrinsic_reward] feed_dict = {model.batch_size: 2, model.sequence_length: 1, @@ -289,19 +233,18 @@ def test_ppo_model_dc_visual_curio(mock_communicator, mock_launcher): [3, 4, 5, 3, 4, 5]]), model.next_vector_in: np.array([[1, 2, 3, 1, 2, 3], [3, 4, 5, 3, 4, 5]]), - model.action_holder: [[0], [0]], + model.action_holder: [0, 0], model.visual_in[0]: np.ones([2, 40, 30, 3]), model.visual_in[1]: np.ones([2, 40, 30, 3]), model.next_visual_in[0]: np.ones([2, 40, 30, 3]), - model.next_visual_in[1]: np.ones([2, 40, 30, 3]), - model.action_masks: np.ones([2,2]) + model.next_visual_in[1]: np.ones([2, 40, 30, 3]) } sess.run(run_list, feed_dict=feed_dict) env.close() -@mock.patch('mlagents.envs.UnityEnvironment.executable_launcher') -@mock.patch('mlagents.envs.UnityEnvironment.get_communicator') +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') def test_ppo_model_cc_visual_curio(mock_communicator, mock_launcher): tf.reset_default_graph() with tf.Session() as sess: @@ -313,7 +256,7 @@ def test_ppo_model_cc_visual_curio(mock_communicator, mock_launcher): init = tf.global_variables_initializer() sess.run(init) - run_list = [model.output, model.all_log_probs, model.value, model.entropy, + run_list = [model.output, model.all_probs, model.value, model.entropy, model.learning_rate, model.intrinsic_reward] feed_dict = {model.batch_size: 2, model.sequence_length: 1, diff --git a/python/tests/test_unityagents.py b/python/tests/test_unityagents.py new file mode 100755 index 0000000000..20f41b3f46 --- /dev/null +++ b/python/tests/test_unityagents.py @@ -0,0 +1,150 @@ +import json +import unittest.mock as mock +import pytest +import struct + +import numpy as np + +from unityagents import UnityEnvironment, UnityEnvironmentException, UnityActionException, \ + BrainInfo, Curriculum +from .mock_communicator import MockCommunicator + + +dummy_curriculum = json.loads('''{ + "measure" : "reward", + "thresholds" : [10, 20, 50], + "min_lesson_length" : 3, + "signal_smoothing" : true, + "parameters" : + { + "param1" : [0.7, 0.5, 0.3, 0.1], + "param2" : [100, 50, 20, 15], + "param3" : [0.2, 0.3, 0.7, 0.9] + } +}''') +bad_curriculum = json.loads('''{ + "measure" : "reward", + "thresholds" : [10, 20, 50], + "min_lesson_length" : 3, + "signal_smoothing" : false, + "parameters" : + { + "param1" : [0.7, 0.5, 0.3, 0.1], + "param2" : [100, 50, 20], + "param3" : [0.2, 0.3, 0.7, 0.9] + } +}''') + + +def test_handles_bad_filename(): + with pytest.raises(UnityEnvironmentException): + UnityEnvironment(' ') + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') +def test_initialization(mock_communicator, mock_launcher): + mock_communicator.return_value = MockCommunicator( + discrete_action=False, visual_inputs=0) + env = UnityEnvironment(' ') + with pytest.raises(UnityActionException): + env.step([0]) + assert env.brain_names[0] == 'RealFakeBrain' + env.close() + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') +def test_reset(mock_communicator, mock_launcher): + mock_communicator.return_value = MockCommunicator( + discrete_action=False, visual_inputs=0) + env = UnityEnvironment(' ') + brain = env.brains['RealFakeBrain'] + brain_info = env.reset() + env.close() + assert not env.global_done + assert isinstance(brain_info, dict) + assert isinstance(brain_info['RealFakeBrain'], BrainInfo) + assert isinstance(brain_info['RealFakeBrain'].visual_observations, list) + assert isinstance(brain_info['RealFakeBrain'].vector_observations, np.ndarray) + assert len(brain_info['RealFakeBrain'].visual_observations) == brain.number_visual_observations + assert brain_info['RealFakeBrain'].vector_observations.shape[0] == \ + len(brain_info['RealFakeBrain'].agents) + assert brain_info['RealFakeBrain'].vector_observations.shape[1] == \ + brain.vector_observation_space_size * brain.num_stacked_vector_observations + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') +def test_step(mock_communicator, mock_launcher): + mock_communicator.return_value = MockCommunicator( + discrete_action=False, visual_inputs=0) + env = UnityEnvironment(' ') + brain = env.brains['RealFakeBrain'] + brain_info = env.reset() + brain_info = env.step([0] * brain.vector_action_space_size * len(brain_info['RealFakeBrain'].agents)) + with pytest.raises(UnityActionException): + env.step([0]) + brain_info = env.step([-1] * brain.vector_action_space_size * len(brain_info['RealFakeBrain'].agents)) + with pytest.raises(UnityActionException): + env.step([0] * brain.vector_action_space_size * len(brain_info['RealFakeBrain'].agents)) + env.close() + assert env.global_done + assert isinstance(brain_info, dict) + assert isinstance(brain_info['RealFakeBrain'], BrainInfo) + assert isinstance(brain_info['RealFakeBrain'].visual_observations, list) + assert isinstance(brain_info['RealFakeBrain'].vector_observations, np.ndarray) + assert len(brain_info['RealFakeBrain'].visual_observations) == brain.number_visual_observations + assert brain_info['RealFakeBrain'].vector_observations.shape[0] == \ + len(brain_info['RealFakeBrain'].agents) + assert brain_info['RealFakeBrain'].vector_observations.shape[1] == \ + brain.vector_observation_space_size * brain.num_stacked_vector_observations + + print("\n\n\n\n\n\n\n" + str(brain_info['RealFakeBrain'].local_done)) + assert not brain_info['RealFakeBrain'].local_done[0] + assert brain_info['RealFakeBrain'].local_done[2] + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') +def test_close(mock_communicator, mock_launcher): + comm = MockCommunicator( + discrete_action=False, visual_inputs=0) + mock_communicator.return_value = comm + env = UnityEnvironment(' ') + assert env._loaded + env.close() + assert not env._loaded + assert comm.has_been_closed + + +def test_curriculum(): + open_name = '%s.open' % __name__ + with mock.patch('json.load') as mock_load: + with mock.patch(open_name, create=True) as mock_open: + mock_open.return_value = 0 + mock_load.return_value = bad_curriculum + with pytest.raises(UnityEnvironmentException): + Curriculum('tests/test_unityagents.py', {"param1": 1, "param2": 1, "param3": 1}) + mock_load.return_value = dummy_curriculum + with pytest.raises(UnityEnvironmentException): + Curriculum('tests/test_unityagents.py', {"param1": 1, "param2": 1}) + curriculum = Curriculum('tests/test_unityagents.py', {"param1": 1, "param2": 1, "param3": 1}) + assert curriculum.get_lesson_number == 0 + curriculum.set_lesson_number(1) + assert curriculum.get_lesson_number == 1 + curriculum.increment_lesson(10) + assert curriculum.get_lesson_number == 1 + curriculum.increment_lesson(30) + curriculum.increment_lesson(30) + assert curriculum.get_lesson_number == 1 + assert curriculum.lesson_length == 3 + curriculum.increment_lesson(30) + assert curriculum.get_config() == {'param1': 0.3, 'param2': 20, 'param3': 0.7} + assert curriculum.get_config(0) == {"param1": 0.7, "param2": 100, "param3": 0.2} + assert curriculum.lesson_length == 0 + assert curriculum.get_lesson_number == 2 + + +if __name__ == '__main__': + pytest.main() diff --git a/python/tests/test_unitytrainers.py b/python/tests/test_unitytrainers.py new file mode 100644 index 0000000000..a97cc935f3 --- /dev/null +++ b/python/tests/test_unitytrainers.py @@ -0,0 +1,216 @@ +import yaml +import unittest.mock as mock +import pytest + +from unitytrainers.trainer_controller import TrainerController +from unitytrainers.buffer import Buffer +from unitytrainers.models import * +from unitytrainers.ppo.trainer import PPOTrainer +from unitytrainers.bc.trainer import BehavioralCloningTrainer +from unityagents import UnityEnvironmentException +from .mock_communicator import MockCommunicator + +dummy_start = '''{ + "AcademyName": "RealFakeAcademy", + "resetParameters": {}, + "brainNames": ["RealFakeBrain"], + "externalBrainNames": ["RealFakeBrain"], + "logPath":"RealFakePath", + "apiNumber":"API-3", + "brainParameters": [{ + "vectorObservationSize": 3, + "numStackedVectorObservations" : 2, + "vectorActionSize": 2, + "memorySize": 0, + "cameraResolutions": [], + "vectorActionDescriptions": ["",""], + "vectorActionSpaceType": 1, + "vectorObservationSpaceType": 1 + }] +}'''.encode() + + +dummy_config = yaml.load(''' +default: + trainer: ppo + batch_size: 32 + beta: 5.0e-3 + buffer_size: 512 + epsilon: 0.2 + gamma: 0.99 + hidden_units: 128 + lambd: 0.95 + learning_rate: 3.0e-4 + max_steps: 5.0e4 + normalize: true + num_epoch: 5 + num_layers: 2 + time_horizon: 64 + sequence_length: 64 + summary_freq: 1000 + use_recurrent: false + memory_size: 8 + use_curiosity: false + curiosity_strength: 0.0 + curiosity_enc_size: 1 +''') + +dummy_bc_config = yaml.load(''' +default: + trainer: imitation + brain_to_imitate: ExpertBrain + batches_per_epoch: 16 + batch_size: 32 + beta: 5.0e-3 + buffer_size: 512 + epsilon: 0.2 + gamma: 0.99 + hidden_units: 128 + lambd: 0.95 + learning_rate: 3.0e-4 + max_steps: 5.0e4 + normalize: true + num_epoch: 5 + num_layers: 2 + time_horizon: 64 + sequence_length: 64 + summary_freq: 1000 + use_recurrent: false + memory_size: 8 + use_curiosity: false + curiosity_strength: 0.0 + curiosity_enc_size: 1 +''') + +dummy_bad_config = yaml.load(''' +default: + trainer: incorrect_trainer + brain_to_imitate: ExpertBrain + batches_per_epoch: 16 + batch_size: 32 + beta: 5.0e-3 + buffer_size: 512 + epsilon: 0.2 + gamma: 0.99 + hidden_units: 128 + lambd: 0.95 + learning_rate: 3.0e-4 + max_steps: 5.0e4 + normalize: true + num_epoch: 5 + num_layers: 2 + time_horizon: 64 + sequence_length: 64 + summary_freq: 1000 + use_recurrent: false + memory_size: 8 +''') + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') +def test_initialization(mock_communicator, mock_launcher): + mock_communicator.return_value = MockCommunicator( + discrete_action=True, visual_inputs=1) + tc = TrainerController(' ', ' ', 1, None, True, True, False, 1, + 1, 1, 1, '', "tests/test_unitytrainers.py", False) + assert(tc.env.brain_names[0] == 'RealFakeBrain') + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') +def test_load_config(mock_communicator, mock_launcher): + open_name = 'unitytrainers.trainer_controller' + '.open' + with mock.patch('yaml.load') as mock_load: + with mock.patch(open_name, create=True) as _: + mock_load.return_value = dummy_config + mock_communicator.return_value = MockCommunicator( + discrete_action=True, visual_inputs=1) + mock_load.return_value = dummy_config + tc = TrainerController(' ', ' ', 1, None, True, True, False, 1, + 1, 1, 1, '','', False) + config = tc._load_config() + assert(len(config) == 1) + assert(config['default']['trainer'] == "ppo") + + +@mock.patch('unityagents.UnityEnvironment.executable_launcher') +@mock.patch('unityagents.UnityEnvironment.get_communicator') +def test_initialize_trainers(mock_communicator, mock_launcher): + open_name = 'unitytrainers.trainer_controller' + '.open' + with mock.patch('yaml.load') as mock_load: + with mock.patch(open_name, create=True) as _: + mock_communicator.return_value = MockCommunicator( + discrete_action=True, visual_inputs=1) + tc = TrainerController(' ', ' ', 1, None, True, True, False, 1, + 1, 1, 1, '', "tests/test_unitytrainers.py", False) + + # Test for PPO trainer + mock_load.return_value = dummy_config + config = tc._load_config() + tf.reset_default_graph() + with tf.Session() as sess: + tc._initialize_trainers(config, sess) + assert(len(tc.trainers) == 1) + assert(isinstance(tc.trainers['RealFakeBrain'], PPOTrainer)) + + # Test for Behavior Cloning Trainer + mock_load.return_value = dummy_bc_config + config = tc._load_config() + tf.reset_default_graph() + with tf.Session() as sess: + tc._initialize_trainers(config, sess) + assert(isinstance(tc.trainers['RealFakeBrain'], BehavioralCloningTrainer)) + + # Test for proper exception when trainer name is incorrect + mock_load.return_value = dummy_bad_config + config = tc._load_config() + tf.reset_default_graph() + with tf.Session() as sess: + with pytest.raises(UnityEnvironmentException): + tc._initialize_trainers(config, sess) + + +def assert_array(a, b): + assert a.shape == b.shape + la = list(a.flatten()) + lb = list(b.flatten()) + for i in range(len(la)): + assert la[i] == lb[i] + + +def test_buffer(): + b = Buffer() + for fake_agent_id in range(4): + for step in range(9): + b[fake_agent_id]['vector_observation'].append( + [100 * fake_agent_id + 10 * step + 1, + 100 * fake_agent_id + 10 * step + 2, + 100 * fake_agent_id + 10 * step + 3] + ) + b[fake_agent_id]['action'].append([100 * fake_agent_id + 10 * step + 4, + 100 * fake_agent_id + 10 * step + 5]) + a = b[1]['vector_observation'].get_batch(batch_size=2, training_length=1, sequential=True) + assert_array(a, np.array([[171, 172, 173], [181, 182, 183]])) + a = b[2]['vector_observation'].get_batch(batch_size=2, training_length=3, sequential=True) + assert_array(a, np.array([ + [[231, 232, 233], [241, 242, 243], [251, 252, 253]], + [[261, 262, 263], [271, 272, 273], [281, 282, 283]] + ])) + a = b[2]['vector_observation'].get_batch(batch_size=2, training_length=3, sequential=False) + assert_array(a, np.array([ + [[251, 252, 253], [261, 262, 263], [271, 272, 273]], + [[261, 262, 263], [271, 272, 273], [281, 282, 283]] + ])) + b[4].reset_agent() + assert len(b[4]) == 0 + b.append_update_buffer(3, + batch_size=None, training_length=2) + b.append_update_buffer(2, + batch_size=None, training_length=2) + assert len(b.update_buffer['action']) == 10 + assert np.array(b.update_buffer['action']).shape == (10, 2, 2) + + +if __name__ == '__main__': + pytest.main() diff --git a/config/trainer_config.yaml b/python/trainer_config.yaml similarity index 81% rename from config/trainer_config.yaml rename to python/trainer_config.yaml index 7296cc1622..9f750e755f 100644 --- a/config/trainer_config.yaml +++ b/python/trainer_config.yaml @@ -26,7 +26,6 @@ BananaBrain: batch_size: 1024 beta: 5.0e-3 buffer_size: 10240 - max_steps: 1.0e5 BouncerBrain: normalize: true @@ -45,7 +44,7 @@ PushBlockBrain: num_layers: 2 SmallWallBrain: - max_steps: 1.0e6 + max_steps: 2.0e5 batch_size: 128 buffer_size: 2048 beta: 5.0e-3 @@ -56,7 +55,7 @@ SmallWallBrain: normalize: false BigWallBrain: - max_steps: 1.0e6 + max_steps: 2.0e5 batch_size: 128 buffer_size: 2048 beta: 5.0e-3 @@ -67,12 +66,10 @@ BigWallBrain: normalize: false StrikerBrain: - max_steps: 5.0e5 - learning_rate: 1e-3 + max_steps: 1.0e5 batch_size: 128 - num_epoch: 3 - buffer_size: 2000 - beta: 1.0e-2 + buffer_size: 2048 + beta: 5.0e-3 hidden_units: 256 summary_freq: 2000 time_horizon: 128 @@ -80,12 +77,10 @@ StrikerBrain: normalize: false GoalieBrain: - max_steps: 5.0e5 - learning_rate: 1e-3 - batch_size: 320 - num_epoch: 3 - buffer_size: 2000 - beta: 1.0e-2 + max_steps: 1.0e5 + batch_size: 128 + buffer_size: 2048 + beta: 5.0e-3 hidden_units: 256 summary_freq: 2000 time_horizon: 128 @@ -103,18 +98,16 @@ PyramidBrain: hidden_units: 512 num_layers: 2 beta: 1.0e-2 - max_steps: 5.0e5 + max_steps: 2.0e5 num_epoch: 3 VisualPyramidBrain: use_curiosity: true - curiosity_strength: 0.01 - curiosity_enc_size: 256 time_horizon: 128 - batch_size: 64 - buffer_size: 2024 + batch_size: 32 + buffer_size: 1024 hidden_units: 256 - num_layers: 1 + num_layers: 2 beta: 1.0e-2 max_steps: 5.0e5 num_epoch: 3 @@ -190,36 +183,6 @@ HallwayBrain: summary_freq: 1000 time_horizon: 64 -VisualHallwayBrain: - use_recurrent: true - sequence_length: 64 - num_layers: 1 - hidden_units: 128 - memory_size: 256 - beta: 1.0e-2 - gamma: 0.99 - num_epoch: 3 - buffer_size: 1024 - batch_size: 64 - max_steps: 5.0e5 - summary_freq: 1000 - time_horizon: 64 - -VisualPushBlockBrain: - use_recurrent: true - sequence_length: 32 - num_layers: 1 - hidden_units: 128 - memory_size: 256 - beta: 1.0e-2 - gamma: 0.99 - num_epoch: 3 - buffer_size: 1024 - batch_size: 64 - max_steps: 5.0e5 - summary_freq: 1000 - time_horizon: 64 - GridWorldBrain: batch_size: 32 normalize: false diff --git a/ml-agents/mlagents/envs/__init__.py b/python/unityagents/__init__.py old mode 100644 new mode 100755 similarity index 73% rename from ml-agents/mlagents/envs/__init__.py rename to python/unityagents/__init__.py index 93960d2f09..5403be1eaf --- a/ml-agents/mlagents/envs/__init__.py +++ b/python/unityagents/__init__.py @@ -1,3 +1,4 @@ from .environment import * from .brain import * from .exception import * +from .curriculum import * diff --git a/ml-agents/mlagents/envs/brain.py b/python/unityagents/brain.py old mode 100644 new mode 100755 similarity index 60% rename from ml-agents/mlagents/envs/brain.py rename to python/unityagents/brain.py index a421a3d20b..d2b16d0fcb --- a/ml-agents/mlagents/envs/brain.py +++ b/python/unityagents/brain.py @@ -4,7 +4,7 @@ class BrainInfo: def __init__(self, visual_observation, vector_observation, text_observations, memory=None, reward=None, agents=None, local_done=None, - vector_action=None, text_action=None, max_reached=None, action_mask=None): + vector_action=None, text_action=None, max_reached=None): """ Describes experience at current step of all agents linked to a brain. """ @@ -18,7 +18,6 @@ def __init__(self, visual_observation, vector_observation, text_observations, me self.agents = agents self.previous_vector_actions = vector_action self.previous_text_actions = text_action - self.action_masks = action_mask AllBrainInfo = Dict[str, BrainInfo] @@ -39,18 +38,21 @@ def __init__(self, brain_name, brain_param): self.vector_action_space_size = brain_param["vectorActionSize"] self.vector_action_descriptions = brain_param["vectorActionDescriptions"] self.vector_action_space_type = ["discrete", "continuous"][brain_param["vectorActionSpaceType"]] + self.vector_observation_space_type = ["discrete", "continuous"][brain_param["vectorObservationSpaceType"]] def __str__(self): - return '''Unity brain name: {} - Number of Visual Observations (per agent): {} - Vector Observation space size (per agent): {} - Number of stacked Vector Observation: {} - Vector Action space type: {} - Vector Action space size (per agent): {} - Vector Action descriptions: {}'''.format(self.brain_name, - str(self.number_visual_observations), - str(self.vector_observation_space_size), - str(self.num_stacked_vector_observations), - self.vector_action_space_type, - str(self.vector_action_space_size), - ', '.join(self.vector_action_descriptions)) + return '''Unity brain name: {0} + Number of Visual Observations (per agent): {1} + Vector Observation space type: {2} + Vector Observation space size (per agent): {3} + Number of stacked Vector Observation: {4} + Vector Action space type: {5} + Vector Action space size (per agent): {6} + Vector Action descriptions: {7}'''.format(self.brain_name, + str(self.number_visual_observations), + self.vector_observation_space_type, + str(self.vector_observation_space_size), + str(self.num_stacked_vector_observations), + self.vector_action_space_type, + str(self.vector_action_space_size), + ', '.join(self.vector_action_descriptions)) diff --git a/ml-agents/mlagents/envs/communicator.py b/python/unityagents/communicator.py old mode 100644 new mode 100755 similarity index 87% rename from ml-agents/mlagents/envs/communicator.py rename to python/unityagents/communicator.py index b43d320bb8..c1c566354c --- a/ml-agents/mlagents/envs/communicator.py +++ b/python/unityagents/communicator.py @@ -1,13 +1,14 @@ import logging -from .communicator_objects import UnityOutput, UnityInput +from communicator_objects import UnityOutput, UnityInput logging.basicConfig(level=logging.INFO) -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class Communicator(object): - def __init__(self, worker_id=0, base_port=5005): + def __init__(self, worker_id=0, + base_port=5005): """ Python side of the communication. Must be used in pair with the right Unity Communicator equivalent. diff --git a/python/unityagents/curriculum.py b/python/unityagents/curriculum.py new file mode 100755 index 0000000000..9f4c6c98de --- /dev/null +++ b/python/unityagents/curriculum.py @@ -0,0 +1,104 @@ +import json + +from .exception import UnityEnvironmentException + +import logging + +logger = logging.getLogger("unityagents") + + +class Curriculum(object): + def __init__(self, location, default_reset_parameters): + """ + Initializes a Curriculum object. + :param location: Path to JSON defining curriculum. + :param default_reset_parameters: Set of reset parameters for environment. + """ + self.lesson_length = 0 + self.max_lesson_number = 0 + self.measure_type = None + if location is None: + self.data = None + else: + try: + with open(location) as data_file: + self.data = json.load(data_file) + except IOError: + raise UnityEnvironmentException( + "The file {0} could not be found.".format(location)) + except UnicodeDecodeError: + raise UnityEnvironmentException("There was an error decoding {}".format(location)) + self.smoothing_value = 0 + for key in ['parameters', 'measure', 'thresholds', + 'min_lesson_length', 'signal_smoothing']: + if key not in self.data: + raise UnityEnvironmentException("{0} does not contain a " + "{1} field.".format(location, key)) + parameters = self.data['parameters'] + self.measure_type = self.data['measure'] + self.max_lesson_number = len(self.data['thresholds']) + for key in parameters: + if key not in default_reset_parameters: + raise UnityEnvironmentException( + "The parameter {0} in Curriculum {1} is not present in " + "the Environment".format(key, location)) + for key in parameters: + if len(parameters[key]) != self.max_lesson_number + 1: + raise UnityEnvironmentException( + "The parameter {0} in Curriculum {1} must have {2} values " + "but {3} were found".format(key, location, + self.max_lesson_number + 1, len(parameters[key]))) + self.set_lesson_number(0) + + @property + def measure(self): + return self.measure_type + + @property + def get_lesson_number(self): + return self.lesson_number + + def set_lesson_number(self, value): + self.lesson_length = 0 + self.lesson_number = max(0, min(value, self.max_lesson_number)) + + def increment_lesson(self, progress): + """ + Increments the lesson number depending on the progree given. + :param progress: Measure of progress (either reward or percentage steps completed). + """ + if self.data is None or progress is None: + return + if self.data["signal_smoothing"]: + progress = self.smoothing_value * 0.25 + 0.75 * progress + self.smoothing_value = progress + self.lesson_length += 1 + if self.lesson_number < self.max_lesson_number: + if ((progress > self.data['thresholds'][self.lesson_number]) and + (self.lesson_length > self.data['min_lesson_length'])): + self.lesson_length = 0 + self.lesson_number += 1 + config = {} + parameters = self.data["parameters"] + for key in parameters: + config[key] = parameters[key][self.lesson_number] + logger.info("\nLesson changed. Now in Lesson {0} : \t{1}" + .format(self.lesson_number, + ', '.join([str(x) + ' -> ' + str(config[x]) for x in config]))) + + def get_config(self, lesson=None): + """ + Returns reset parameters which correspond to the lesson. + :param lesson: The lesson you want to get the config of. If None, the current lesson is returned. + :return: The configuration of the reset parameters. + """ + if self.data is None: + return {} + if lesson is None: + lesson = self.lesson_number + lesson = max(0, min(lesson, self.max_lesson_number)) + config = {} + parameters = self.data["parameters"] + for key in parameters: + config[key] = parameters[key][lesson] + return config diff --git a/ml-agents/mlagents/envs/environment.py b/python/unityagents/environment.py old mode 100644 new mode 100755 similarity index 86% rename from ml-agents/mlagents/envs/environment.py rename to python/unityagents/environment.py index 51eab97b8d..9edd3eb372 --- a/ml-agents/mlagents/envs/environment.py +++ b/python/unityagents/environment.py @@ -8,8 +8,9 @@ from .brain import BrainInfo, BrainParameters, AllBrainInfo from .exception import UnityEnvironmentException, UnityActionException, UnityTimeOutException +from .curriculum import Curriculum -from .communicator_objects import UnityRLInput, UnityRLOutput, AgentActionProto,\ +from communicator_objects import UnityRLInput, UnityRLOutput, AgentActionProto,\ EnvironmentParametersProto, UnityRLInitializationInput, UnityRLInitializationOutput,\ UnityInput, UnityOutput @@ -21,13 +22,13 @@ from PIL import Image logging.basicConfig(level=logging.INFO) -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class UnityEnvironment(object): def __init__(self, file_name=None, worker_id=0, - base_port=5005, seed=0, - docker_training=False, no_graphics=False): + base_port=5005, curriculum=None, + seed=0, docker_training=False, no_graphics=False): """ Starts a new unity environment and establishes a connection with the environment. Notice: Currently communication between Unity and Python takes place over an open socket without authentication. @@ -43,17 +44,13 @@ def __init__(self, file_name=None, worker_id=0, atexit.register(self._close) self.port = base_port + worker_id self._buffer_size = 12000 - self._version_ = "API-5" + self._version_ = "API-4" self._loaded = False # If true, this means the environment was successfully loaded self.proc1 = None # The process that is started. If None, no process was started self.communicator = self.get_communicator(worker_id, base_port) - # If the environment name is None, a new environment will not be launched + # If the environment name is 'editor', a new environment will not be launched # and the communicator will directly try to connect to an existing unity environment. - # If the worker-id is not 0 and the environment name is None, an error is thrown - if file_name is None and worker_id!=0: - raise UnityEnvironmentException( - "If the environment name is None, the worker-id must be 0 in order to connect with the Editor.") if file_name is not None: self.executable_launcher(file_name, docker_training, no_graphics) else: @@ -96,18 +93,24 @@ def __init__(self, file_name=None, worker_id=0, "cameraResolutions": resolution, "vectorActionSize": brain_param.vector_action_size, "vectorActionDescriptions": brain_param.vector_action_descriptions, - "vectorActionSpaceType": brain_param.vector_action_space_type + "vectorActionSpaceType": brain_param.vector_action_space_type, + "vectorObservationSpaceType": brain_param.vector_observation_space_type }) if brain_param.brain_type == 2: self._external_brain_names += [brain_param.brain_name] self._num_brains = len(self._brain_names) self._num_external_brains = len(self._external_brain_names) self._resetParameters = dict(aca_params.environment_parameters.float_parameters) # TODO + self._curriculum = Curriculum(curriculum, self._resetParameters) logger.info("\n'{0}' started successfully!\n{1}".format(self._academy_name, str(self))) if self._num_external_brains == 0: logger.warning(" No External Brains found in the Unity Environment. " "You will not be able to pass actions to your agent(s).") + @property + def curriculum(self): + return self._curriculum + @property def logfile_path(self): return self._log_path @@ -221,24 +224,28 @@ def get_communicator(self, worker_id, base_port): # return SocketCommunicator(worker_id, base_port) def __str__(self): + _new_reset_param = self._curriculum.get_config() + for k in _new_reset_param: + self._resetParameters[k] = _new_reset_param[k] return '''Unity Academy name: {0} Number of Brains: {1} Number of External Brains : {2} - Reset Parameters :\n\t\t{3}'''.format(self._academy_name, str(self._num_brains), - str(self._num_external_brains), - "\n\t\t".join([str(k) + " -> " + str(self._resetParameters[k]) + Lesson number : {3} + Reset Parameters :\n\t\t{4}'''.format(self._academy_name, str(self._num_brains), + str(self._num_external_brains), self._curriculum.get_lesson_number, + "\n\t\t".join([str(k) + " -> " + str(self._resetParameters[k]) for k in self._resetParameters])) + '\n' + \ '\n'.join([str(self._brains[b]) for b in self._brains]) - def reset(self, config=None, train_mode=True) -> AllBrainInfo: + def reset(self, train_mode=True, config=None, lesson=None) -> AllBrainInfo: """ Sends a signal to reset the unity environment. :return: AllBrainInfo : A Data structure corresponding to the initial reset state of the environment. """ if config is None: - config = self._resetParameters - elif config: - logger.info("Academy reset with parameters: {0}" + config = self._curriculum.get_config(lesson) + elif config != {}: + logger.info("\nAcademy Reset with parameters : \t{0}" .format(', '.join([str(x) + ' -> ' + str(config[x]) for x in config]))) for k in config: if (k in self._resetParameters) and (isinstance(config[k], (int, float))): @@ -264,7 +271,7 @@ def reset(self, config=None, train_mode=True) -> AllBrainInfo: else: raise UnityEnvironmentException("No Unity environment is loaded.") - def step(self, vector_action=None, memory=None, text_action=None, value=None) -> AllBrainInfo: + def step(self, vector_action=None, memory=None, text_action=None) -> AllBrainInfo: """ Provides the environment with an action, moves the environment dynamics forward accordingly, and returns observation, state, and reward information to the agent. @@ -276,7 +283,6 @@ def step(self, vector_action=None, memory=None, text_action=None, value=None) - vector_action = {} if vector_action is None else vector_action memory = {} if memory is None else memory text_action = {} if text_action is None else text_action - value = {} if value is None else value if self._loaded and not self._global_done and self._global_done is not None: if isinstance(vector_action, (int, np.int_, float, np.float_, list, np.ndarray)): if self._num_external_brains == 1: @@ -312,17 +318,6 @@ def step(self, vector_action=None, memory=None, text_action=None, value=None) - raise UnityActionException( "There are no external brains in the environment, " "step cannot take a value input") - if isinstance(value, (int, np.int_, float, np.float_, list, np.ndarray)): - if self._num_external_brains == 1: - value = {self._external_brain_names[0]: value} - elif self._num_external_brains > 1: - raise UnityActionException( - "You have {0} brains, you need to feed a dictionary of brain names as keys " - "and state/action value estimates as values".format(self._num_brains)) - else: - raise UnityActionException( - "There are no external brains in the environment, " - "step cannot take a value input") for brain_name in list(vector_action.keys()) + list(memory.keys()) + list(text_action.keys()): if brain_name not in self._external_brain_names: @@ -335,9 +330,9 @@ def step(self, vector_action=None, memory=None, text_action=None, value=None) - if b not in vector_action: # raise UnityActionException("You need to input an action for the brain {0}".format(b)) if self._brains[b].vector_action_space_type == "discrete": - vector_action[b] = [0.0] * n_agent * len(self._brains[b].vector_action_space_size) + vector_action[b] = [0.0] * n_agent else: - vector_action[b] = [0.0] * n_agent * self._brains[b].vector_action_space_size[0] + vector_action[b] = [0.0] * n_agent * self._brains[b].vector_action_space_size else: vector_action[b] = self._flatten(vector_action[b]) if b not in memory: @@ -359,21 +354,19 @@ def step(self, vector_action=None, memory=None, text_action=None, value=None) - "There was a mismatch between the provided text_action and environment's expectation: " "The brain {0} expected {1} text_action but was given {2}".format( b, n_agent, len(text_action[b]))) - if not ((self._brains[b].vector_action_space_type == "discrete" and len( - vector_action[b]) == n_agent * len(self._brains[b].vector_action_space_size)) or + if not ((self._brains[b].vector_action_space_type == "discrete" and len(vector_action[b]) == n_agent) or (self._brains[b].vector_action_space_type == "continuous" and len( - vector_action[b]) == self._brains[b].vector_action_space_size[0] * n_agent)): + vector_action[b]) == self._brains[b].vector_action_space_size * n_agent)): raise UnityActionException( "There was a mismatch between the provided action and environment's expectation: " "The brain {0} expected {1} {2} action(s), but was provided: {3}" - .format(b, str(len(self._brains[b].vector_action_space_size) * n_agent) - if self._brains[b].vector_action_space_type == "discrete" - else str(self._brains[b].vector_action_space_size[0] * n_agent), + .format(b, n_agent if self._brains[b].vector_action_space_type == "discrete" else + str(self._brains[b].vector_action_space_size * n_agent), self._brains[b].vector_action_space_type, str(vector_action[b]))) outputs = self.communicator.exchange( - self._generate_step_input(vector_action, memory, text_action, value) + self._generate_step_input(vector_action, memory, text_action) ) if outputs is None: raise KeyboardInterrupt @@ -465,33 +458,21 @@ def _get_state(self, output: UnityRLOutput) -> (AllBrainInfo, bool): else: [x.memories.extend([0] * (memory_size - len(x.memories))) for x in agent_info_list] memory = np.array([x.memories for x in agent_info_list]) - total_num_actions = sum(self.brains[b].vector_action_space_size) - mask_actions = np.ones((len(agent_info_list), total_num_actions)) - for agent_index, agent_info in enumerate(agent_info_list): - if agent_info.action_mask is not None: - if len(agent_info.action_mask) == total_num_actions: - mask_actions[agent_index, :] = [ - 0 if agent_info.action_mask[k] else 1 for k in range(total_num_actions)] - if any([np.isnan(x.reward) for x in agent_info_list]): - logger.warning("An agent had a NaN reward for brain "+b) - if any([np.isnan(x.stacked_vector_observation).any() for x in agent_info_list]): - logger.warning("An agent had a NaN observation for brain " + b) _data[b] = BrainInfo( visual_observation=vis_obs, - vector_observation=np.nan_to_num(np.array([x.stacked_vector_observation for x in agent_info_list])), + vector_observation=np.array([x.stacked_vector_observation for x in agent_info_list]), text_observations=[x.text_observation for x in agent_info_list], memory=memory, - reward=[x.reward if not np.isnan(x.reward) else 0 for x in agent_info_list], + reward=[x.reward for x in agent_info_list], agents=[x.id for x in agent_info_list], local_done=[x.done for x in agent_info_list], vector_action=np.array([x.stored_vector_actions for x in agent_info_list]), text_action=[x.stored_text_actions for x in agent_info_list], - max_reached=[x.max_step_reached for x in agent_info_list], - action_mask=mask_actions + max_reached=[x.max_step_reached for x in agent_info_list] ) return _data, global_done - def _generate_step_input(self, vector_action, memory, text_action, value) -> UnityRLInput: + def _generate_step_input(self, vector_action, memory, text_action) -> UnityRLInput: rl_in = UnityRLInput() for b in vector_action: n_agents = self._n_agents[b] @@ -503,11 +484,8 @@ def _generate_step_input(self, vector_action, memory, text_action, value) -> Uni action = AgentActionProto( vector_actions=vector_action[b][i*_a_s: (i+1)*_a_s], memories=memory[b][i*_m_s: (i+1)*_m_s], - text_actions=text_action[b][i], + text_actions=text_action[b][i] ) - if b in value: - if value[b] is not None: - action.value = float(value[b][i]) rl_in.agent_actions[b].value.extend([action]) rl_in.command = 0 return self.wrap_unity_input(rl_in) diff --git a/ml-agents/mlagents/envs/exception.py b/python/unityagents/exception.py old mode 100644 new mode 100755 similarity index 93% rename from ml-agents/mlagents/envs/exception.py rename to python/unityagents/exception.py index 511734235e..9e6f9c8b8e --- a/ml-agents/mlagents/envs/exception.py +++ b/python/unityagents/exception.py @@ -1,5 +1,5 @@ import logging -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class UnityException(Exception): """ @@ -44,6 +44,6 @@ def __init__(self, message, log_file_path = None): "You can check the logfile for more information at {}".format(log_file_path)) except: logger.error("An error might have occured in the environment. " - "No UnitySDK.log file could be found.") + "No unity-environment.log file could be found.") super(UnityTimeOutException, self).__init__(message) diff --git a/ml-agents/mlagents/envs/rpc_communicator.py b/python/unityagents/rpc_communicator.py old mode 100644 new mode 100755 similarity index 94% rename from ml-agents/mlagents/envs/rpc_communicator.py rename to python/unityagents/rpc_communicator.py index 4ea57d2ed2..985cadd904 --- a/ml-agents/mlagents/envs/rpc_communicator.py +++ b/python/unityagents/rpc_communicator.py @@ -5,13 +5,13 @@ from concurrent.futures import ThreadPoolExecutor from .communicator import Communicator -from .communicator_objects import UnityToExternalServicer, add_UnityToExternalServicer_to_server -from .communicator_objects import UnityMessage, UnityInput, UnityOutput +from communicator_objects import UnityToExternalServicer, add_UnityToExternalServicer_to_server +from communicator_objects import UnityMessage, UnityInput, UnityOutput from .exception import UnityTimeOutException logging.basicConfig(level=logging.INFO) -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class UnityToExternalServicerImplementation(UnityToExternalServicer): diff --git a/ml-agents/mlagents/envs/socket_communicator.py b/python/unityagents/socket_communicator.py old mode 100644 new mode 100755 similarity index 97% rename from ml-agents/mlagents/envs/socket_communicator.py rename to python/unityagents/socket_communicator.py index c6283c293c..f555507675 --- a/ml-agents/mlagents/envs/socket_communicator.py +++ b/python/unityagents/socket_communicator.py @@ -3,12 +3,12 @@ import struct from .communicator import Communicator -from .communicator_objects import UnityMessage, UnityOutput, UnityInput +from communicator_objects import UnityMessage, UnityOutput, UnityInput from .exception import UnityTimeOutException logging.basicConfig(level=logging.INFO) -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class SocketCommunicator(Communicator): diff --git a/ml-agents/mlagents/trainers/__init__.py b/python/unitytrainers/__init__.py similarity index 54% rename from ml-agents/mlagents/trainers/__init__.py rename to python/unitytrainers/__init__.py index 072ee83e75..b2c309e4e8 100644 --- a/ml-agents/mlagents/trainers/__init__.py +++ b/python/unitytrainers/__init__.py @@ -1,13 +1,7 @@ from .buffer import * -from .curriculum import * -from .meta_curriculum import * from .models import * from .trainer_controller import * from .bc.models import * from .bc.trainer import * -from .bc.policy import * from .ppo.models import * from .ppo.trainer import * -from .ppo.policy import * -from .exception import * -from .policy import * diff --git a/ml-agents/mlagents/trainers/bc/__init__.py b/python/unitytrainers/bc/__init__.py similarity index 67% rename from ml-agents/mlagents/trainers/bc/__init__.py rename to python/unitytrainers/bc/__init__.py index d48a8ccfe1..a1ee1b79d9 100644 --- a/ml-agents/mlagents/trainers/bc/__init__.py +++ b/python/unitytrainers/bc/__init__.py @@ -1,3 +1,2 @@ from .models import * from .trainer import * -from .policy import * diff --git a/python/unitytrainers/bc/models.py b/python/unitytrainers/bc/models.py new file mode 100644 index 0000000000..8697488d1b --- /dev/null +++ b/python/unitytrainers/bc/models.py @@ -0,0 +1,43 @@ +import tensorflow as tf +import tensorflow.contrib.layers as c_layers +from unitytrainers.models import LearningModel + + +class BehavioralCloningModel(LearningModel): + def __init__(self, brain, h_size=128, lr=1e-4, n_layers=2, m_size=128, + normalize=False, use_recurrent=False): + LearningModel.__init__(self, m_size, normalize, use_recurrent, brain) + + num_streams = 1 + hidden_streams = self.create_observation_streams(num_streams, h_size, n_layers) + hidden = hidden_streams[0] + self.dropout_rate = tf.placeholder(dtype=tf.float32, shape=[], name="dropout_rate") + hidden_reg = tf.layers.dropout(hidden, self.dropout_rate) + if self.use_recurrent: + tf.Variable(self.m_size, name="memory_size", trainable=False, dtype=tf.int32) + self.memory_in = tf.placeholder(shape=[None, self.m_size], dtype=tf.float32, name='recurrent_in') + hidden_reg, self.memory_out = self.create_recurrent_encoder(hidden_reg, self.memory_in, + self.sequence_length) + self.memory_out = tf.identity(self.memory_out, name='recurrent_out') + self.policy = tf.layers.dense(hidden_reg, self.a_size, activation=None, use_bias=False, name='pre_action', + kernel_initializer=c_layers.variance_scaling_initializer(factor=0.01)) + + if brain.vector_action_space_type == "discrete": + self.action_probs = tf.nn.softmax(self.policy) + self.sample_action_float = tf.multinomial(self.policy, 1) + self.sample_action_float = tf.identity(self.sample_action_float, name="action") + self.sample_action = tf.cast(self.sample_action_float, tf.int32) + self.true_action = tf.placeholder(shape=[None], dtype=tf.int32, name="teacher_action") + self.action_oh = tf.one_hot(self.true_action, self.a_size) + self.loss = tf.reduce_sum(-tf.log(self.action_probs + 1e-10) * self.action_oh) + self.action_percent = tf.reduce_mean(tf.cast( + tf.equal(tf.cast(tf.argmax(self.action_probs, axis=1), tf.int32), self.sample_action), tf.float32)) + else: + self.clipped_sample_action = tf.clip_by_value(self.policy, -1, 1) + self.sample_action = tf.identity(self.clipped_sample_action, name="action") + self.true_action = tf.placeholder(shape=[None, self.a_size], dtype=tf.float32, name="teacher_action") + self.clipped_true_action = tf.clip_by_value(self.true_action, -1, 1) + self.loss = tf.reduce_sum(tf.squared_difference(self.clipped_true_action, self.sample_action)) + + optimizer = tf.train.AdamOptimizer(learning_rate=lr) + self.update = optimizer.minimize(self.loss) diff --git a/ml-agents/mlagents/trainers/bc/trainer.py b/python/unitytrainers/bc/trainer.py old mode 100644 new mode 100755 similarity index 58% rename from ml-agents/mlagents/trainers/bc/trainer.py rename to python/unitytrainers/bc/trainer.py index 5c677259cf..63b7fcafbc --- a/ml-agents/mlagents/trainers/bc/trainer.py +++ b/python/unitytrainers/bc/trainer.py @@ -8,54 +8,78 @@ import numpy as np import tensorflow as tf -from mlagents.envs import AllBrainInfo -from mlagents.trainers.bc.policy import BCPolicy -from mlagents.trainers.buffer import Buffer -from mlagents.trainers.trainer import UnityTrainerException, Trainer +from unityagents import AllBrainInfo +from unitytrainers.bc.models import BehavioralCloningModel +from unitytrainers.buffer import Buffer +from unitytrainers.trainer import UnityTrainerException, Trainer -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class BehavioralCloningTrainer(Trainer): """The ImitationTrainer is an implementation of the imitation learning.""" - def __init__(self, sess, brain, trainer_parameters, training, seed, run_id): + def __init__(self, sess, env, brain_name, trainer_parameters, training, seed): """ Responsible for collecting experiences and training PPO model. :param sess: Tensorflow session. + :param env: The UnityEnvironment. :param trainer_parameters: The parameters for the trainer (dictionary). :param training: Whether the trainer is set for training. """ - super(BehavioralCloningTrainer, self).__init__(sess, brain, trainer_parameters, training, run_id) - - self.param_keys = ['brain_to_imitate', 'batch_size', 'time_horizon', - 'graph_scope', 'summary_freq', 'max_steps', - 'batches_per_epoch', 'use_recurrent', - 'hidden_units','learning_rate', 'num_layers', - 'sequence_length', 'memory_size'] + self.param_keys = ['brain_to_imitate', 'batch_size', 'time_horizon', 'graph_scope', + 'summary_freq', 'max_steps', 'batches_per_epoch', 'use_recurrent', 'hidden_units', + 'num_layers', 'sequence_length', 'memory_size'] for k in self.param_keys: if k not in trainer_parameters: raise UnityTrainerException("The hyperparameter {0} could not be found for the Imitation trainer of " - "brain {1}.".format(k, brain.brain_name)) + "brain {1}.".format(k, brain_name)) + + super(BehavioralCloningTrainer, self).__init__(sess, env, brain_name, trainer_parameters, training) - self.policy = BCPolicy(seed, brain, trainer_parameters, sess) - self.brain_name = brain.brain_name + self.variable_scope = trainer_parameters['graph_scope'] self.brain_to_imitate = trainer_parameters['brain_to_imitate'] self.batches_per_epoch = trainer_parameters['batches_per_epoch'] - self.n_sequences = max(int(trainer_parameters['batch_size'] / self.policy.sequence_length), 1) + self.use_recurrent = trainer_parameters['use_recurrent'] + self.sequence_length = 1 + self.m_size = None + if self.use_recurrent: + self.m_size = trainer_parameters["memory_size"] + self.sequence_length = trainer_parameters["sequence_length"] + self.n_sequences = max(int(trainer_parameters['batch_size'] / self.sequence_length), 1) self.cumulative_rewards = {} self.episode_steps = {} self.stats = {'losses': [], 'episode_length': [], 'cumulative_reward': []} self.training_buffer = Buffer() + self.is_continuous_action = (env.brains[brain_name].vector_action_space_type == "continuous") + self.is_continuous_observation = (env.brains[brain_name].vector_observation_space_type == "continuous") + self.use_visual_observations = (env.brains[brain_name].number_visual_observations > 0) + if self.use_visual_observations: + logger.info('Cannot use observations with imitation learning') + self.use_vector_observations = (env.brains[brain_name].vector_observation_space_size > 0) self.summary_path = trainer_parameters['summary_path'] if not os.path.exists(self.summary_path): os.makedirs(self.summary_path) self.summary_writer = tf.summary.FileWriter(self.summary_path) + with tf.variable_scope(self.variable_scope): + tf.set_random_seed(seed) + self.model = BehavioralCloningModel( + h_size=int(trainer_parameters['hidden_units']), + lr=float(trainer_parameters['learning_rate']), + n_layers=int(trainer_parameters['num_layers']), + m_size=self.m_size, + normalize=False, + use_recurrent=trainer_parameters['use_recurrent'], + brain=self.brain) + self.inference_run_list = [self.model.sample_action] + if self.use_recurrent: + self.inference_run_list += [self.model.memory_out] def __str__(self): + return '''Hyperparameters for the Imitation Trainer of brain {0}: \n{1}'''.format( self.brain_name, '\n'.join(['\t{0}:\t{1}'.format(x, self.trainer_parameters[x]) for x in self.param_keys])) @@ -66,6 +90,13 @@ def parameters(self): """ return self.trainer_parameters + @property + def graph_scope(self): + """ + Returns the graph scope of the trainer. + """ + return self.variable_scope + @property def get_max_steps(self): """ @@ -80,7 +111,7 @@ def get_step(self): Returns the number of steps the trainer has performed :return: the step count of the trainer """ - return self.policy.get_current_step() + return self.sess.run(self.model.global_step) @property def get_last_reward(self): @@ -97,25 +128,36 @@ def increment_step_and_update_last_reward(self): """ Increment the step count of the trainer and Updates the last reward """ - self.policy.increment_step() + self.sess.run(self.model.increment_step) return def take_action(self, all_brain_info: AllBrainInfo): """ - Decides actions using policy given current brain info. + Decides actions given state/observation information, and takes them in environment. :param all_brain_info: AllBrainInfo from environment. :return: a tuple containing action, memories, values and an object to be passed to add experiences """ if len(all_brain_info[self.brain_name].agents) == 0: - return [], [], [], None, None + return [], [], [], None agent_brain = all_brain_info[self.brain_name] - run_out = self.policy.evaluate(agent_brain) - if self.policy.use_recurrent: - return run_out['action'], run_out['memory_out'], None, None, None + feed_dict = {self.model.dropout_rate: 1.0, self.model.sequence_length: 1} + + if self.use_visual_observations: + for i, _ in enumerate(agent_brain.visual_observations): + feed_dict[self.model.visual_in[i]] = agent_brain.visual_observations[i] + if self.use_vector_observations: + feed_dict[self.model.vector_in] = agent_brain.vector_observations + if self.use_recurrent: + if agent_brain.memories.shape[1] == 0: + agent_brain.memories = np.zeros((len(agent_brain.agents), self.m_size)) + feed_dict[self.model.memory_in] = agent_brain.memories + agent_action, memories = self.sess.run(self.inference_run_list, feed_dict) + return agent_action, memories, None, None else: - return run_out['action'], None, None, None, None + agent_action = self.sess.run(self.inference_run_list, feed_dict) + return agent_action, None, None, None def add_experiences(self, curr_info: AllBrainInfo, next_info: AllBrainInfo, take_action_outputs): """ @@ -149,16 +191,16 @@ def add_experiences(self, curr_info: AllBrainInfo, next_info: AllBrainInfo, take info_teacher_record, next_info_teacher_record = "true", "true" if info_teacher_record == "true" and next_info_teacher_record == "true": if not stored_info_teacher.local_done[idx]: - for i in range(self.policy.vis_obs_size): - self.training_buffer[agent_id]['visual_obs%d' % i]\ - .append(stored_info_teacher.visual_observations[i][idx]) - if self.policy.use_vec_obs: - self.training_buffer[agent_id]['vector_obs']\ + if self.use_visual_observations: + for i, _ in enumerate(stored_info_teacher.visual_observations): + self.training_buffer[agent_id]['visual_observations%d' % i]\ + .append(stored_info_teacher.visual_observations[i][idx]) + if self.use_vector_observations: + self.training_buffer[agent_id]['vector_observations']\ .append(stored_info_teacher.vector_observations[idx]) - if self.policy.use_recurrent: + if self.use_recurrent: if stored_info_teacher.memories.shape[1] == 0: - stored_info_teacher.memories = np.zeros((len(stored_info_teacher.agents), - self.policy.m_size)) + stored_info_teacher.memories = np.zeros((len(stored_info_teacher.agents), self.m_size)) self.training_buffer[agent_id]['memory'].append(stored_info_teacher.memories[idx]) self.training_buffer[agent_id]['actions'].append(next_info_teacher. previous_vector_actions[next_idx]) @@ -191,13 +233,13 @@ def process_experiences(self, current_info: AllBrainInfo, next_info: AllBrainInf """ info_teacher = next_info[self.brain_to_imitate] for l in range(len(info_teacher.agents)): - teacher_action_list = len(self.training_buffer[info_teacher.agents[l]]['actions']) - horizon_reached = teacher_action_list > self.trainer_parameters['time_horizon'] - teacher_filled = len(self.training_buffer[info_teacher.agents[l]]['actions']) > 0 - if ((info_teacher.local_done[l] or horizon_reached) and teacher_filled): + if ((info_teacher.local_done[l] or + len(self.training_buffer[info_teacher.agents[l]]['actions']) > self.trainer_parameters[ + 'time_horizon']) + and len(self.training_buffer[info_teacher.agents[l]]['actions']) > 0): agent_id = info_teacher.agents[l] - self.training_buffer.append_update_buffer( - agent_id, batch_size=None, training_length=self.policy.sequence_length) + self.training_buffer.append_update_buffer(agent_id, batch_size=None, + training_length=self.sequence_length) self.training_buffer[agent_id].reset_agent() info_student = next_info[self.brain_name] @@ -229,21 +271,40 @@ def is_ready_update(self): """ return len(self.training_buffer.update_buffer['actions']) > self.n_sequences - def update_policy(self): + def update_model(self): """ - Updates the policy. + Uses training_buffer to update model. """ self.training_buffer.update_buffer.shuffle() batch_losses = [] - num_batches = min(len(self.training_buffer.update_buffer['actions']) // - self.n_sequences, self.batches_per_epoch) - for i in range(num_batches): - buffer = self.training_buffer.update_buffer - start = i * self.n_sequences - end = (i + 1) * self.n_sequences - mini_batch = buffer.make_mini_batch(start, end) - run_out = self.policy.update(mini_batch, self.n_sequences) - loss = run_out['policy_loss'] + for j in range( + min(len(self.training_buffer.update_buffer['actions']) // self.n_sequences, self.batches_per_epoch)): + _buffer = self.training_buffer.update_buffer + start = j * self.n_sequences + end = (j + 1) * self.n_sequences + + feed_dict = {self.model.dropout_rate: 0.5, + self.model.batch_size: self.n_sequences, + self.model.sequence_length: self.sequence_length} + if self.is_continuous_action: + feed_dict[self.model.true_action] = np.array(_buffer['actions'][start:end]).\ + reshape([-1, self.brain.vector_action_space_size]) + else: + feed_dict[self.model.true_action] = np.array(_buffer['actions'][start:end]).reshape([-1]) + if self.use_vector_observations: + if not self.is_continuous_observation: + feed_dict[self.model.vector_in] = np.array(_buffer['vector_observations'][start:end])\ + .reshape([-1, self.brain.num_stacked_vector_observations]) + else: + feed_dict[self.model.vector_in] = np.array(_buffer['vector_observations'][start:end])\ + .reshape([-1, self.brain.vector_observation_space_size * self.brain.num_stacked_vector_observations]) + if self.use_visual_observations: + for i, _ in enumerate(self.model.visual_in): + _obs = np.array(_buffer['visual_observations%d' % i][start:end]) + feed_dict[self.model.visual_in[i]] = _obs + if self.use_recurrent: + feed_dict[self.model.memory_in] = np.zeros([self.n_sequences, self.m_size]) + loss, _ = self.sess.run([self.model.loss, self.model.update], feed_dict=feed_dict) batch_losses.append(loss) if len(batch_losses) > 0: self.stats['losses'].append(np.mean(batch_losses)) diff --git a/ml-agents/mlagents/trainers/buffer.py b/python/unitytrainers/buffer.py similarity index 95% rename from ml-agents/mlagents/trainers/buffer.py rename to python/unitytrainers/buffer.py index f60bcf385a..10f0117565 100644 --- a/ml-agents/mlagents/trainers/buffer.py +++ b/python/unitytrainers/buffer.py @@ -1,6 +1,6 @@ import numpy as np -from mlagents.envs.exception import UnityException +from unityagents.exception import UnityException class BufferException(UnityException): @@ -157,7 +157,6 @@ def check_length(self, key_list): def shuffle(self, key_list=None): """ Shuffles the fields in key_list in a consistent way: The reordering will - Shuffles the fields in key_list in a consistent way: The reordering will be the same across fields. :param key_list: The fields that must be shuffled. """ @@ -170,18 +169,6 @@ def shuffle(self, key_list=None): for key in key_list: self[key][:] = [self[key][i] for i in s] - def make_mini_batch(self, start, end): - """ - Creates a mini-batch from buffer. - :param start: Starting index of buffer. - :param end: Ending index of buffer. - :return: Dict of mini batch. - """ - mini_batch = {} - for key in self: - mini_batch[key] = np.array(self[key][start:end]) - return mini_batch - def __init__(self): self.update_buffer = self.AgentBuffer() super(Buffer, self).__init__() diff --git a/ml-agents/mlagents/trainers/models.py b/python/unitytrainers/models.py old mode 100644 new mode 100755 similarity index 57% rename from ml-agents/mlagents/trainers/models.py rename to python/unitytrainers/models.py index d97002b5e9..1654dfbba3 --- a/ml-agents/mlagents/trainers/models.py +++ b/python/unitytrainers/models.py @@ -4,14 +4,15 @@ import tensorflow as tf import tensorflow.contrib.layers as c_layers -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class LearningModel(object): - def __init__(self, m_size, normalize, use_recurrent, brain, seed): - tf.set_random_seed(seed) + def __init__(self, m_size, normalize, use_recurrent, brain): self.brain = brain self.vector_in = None + self.normalize = False + self.use_recurrent = False self.global_step, self.increment_step = self.create_global_steps() self.visual_in = [] self.batch_size = tf.placeholder(shape=None, dtype=tf.int32, name='batch_size') @@ -21,10 +22,9 @@ def __init__(self, m_size, normalize, use_recurrent, brain, seed): self.m_size = m_size self.normalize = normalize self.use_recurrent = use_recurrent - self.act_size = brain.vector_action_space_size - self.vec_obs_size = brain.vector_observation_space_size * \ - brain.num_stacked_vector_observations - self.vis_obs_size = brain.number_visual_observations + self.a_size = brain.vector_action_space_size + self.o_size = brain.vector_observation_space_size * brain.num_stacked_vector_observations + self.v_size = brain.number_visual_observations @staticmethod def create_global_steps(): @@ -55,40 +55,39 @@ def create_visual_input(camera_parameters, name): else: c_channels = 3 - visual_in = tf.placeholder(shape=[None, o_size_h, o_size_w, c_channels], dtype=tf.float32, - name=name) + visual_in = tf.placeholder(shape=[None, o_size_h, o_size_w, c_channels], dtype=tf.float32, name=name) return visual_in def create_vector_input(self, name='vector_observation'): """ Creates ops for vector observation input. :param name: Name of the placeholder op. - :param vec_obs_size: Size of stacked vector observation. + :param o_size: Size of stacked vector observation. :return: """ - self.vector_in = tf.placeholder(shape=[None, self.vec_obs_size], dtype=tf.float32, - name=name) - if self.normalize: - self.running_mean = tf.get_variable("running_mean", [self.vec_obs_size], - trainable=False, dtype=tf.float32, - initializer=tf.zeros_initializer()) - self.running_variance = tf.get_variable("running_variance", [self.vec_obs_size], - trainable=False, - dtype=tf.float32, - initializer=tf.ones_initializer()) - self.update_mean, self.update_variance = self.create_normalizer_update(self.vector_in) - - self.normalized_state = tf.clip_by_value((self.vector_in - self.running_mean) / tf.sqrt( - self.running_variance / (tf.cast(self.global_step, tf.float32) + 1)), -5, 5, - name="normalized_state") - return self.normalized_state + if self.brain.vector_observation_space_type == "continuous": + self.vector_in = tf.placeholder(shape=[None, self.o_size], dtype=tf.float32, name=name) + if self.normalize: + self.running_mean = tf.get_variable("running_mean", [self.o_size], trainable=False, dtype=tf.float32, + initializer=tf.zeros_initializer()) + self.running_variance = tf.get_variable("running_variance", [self.o_size], trainable=False, + dtype=tf.float32, initializer=tf.ones_initializer()) + self.update_mean, self.update_variance = self.create_normalizer_update(self.vector_in) + + self.normalized_state = tf.clip_by_value((self.vector_in - self.running_mean) / tf.sqrt( + self.running_variance / (tf.cast(self.global_step, tf.float32) + 1)), -5, 5, + name="normalized_state") + return self.normalized_state + else: + return self.vector_in else: + self.vector_in = tf.placeholder(shape=[None, 1], dtype=tf.int32, name='vector_observation') return self.vector_in def create_normalizer_update(self, vector_input): mean_current_observation = tf.reduce_mean(vector_input, axis=0) new_mean = self.running_mean + (mean_current_observation - self.running_mean) / \ - tf.cast(tf.add(self.global_step, 1), tf.float32) + tf.cast(self.global_step + 1, tf.float32) new_variance = self.running_variance + (mean_current_observation - new_mean) * \ (mean_current_observation - self.running_mean) update_mean = tf.assign(self.running_mean, new_mean) @@ -96,8 +95,7 @@ def create_normalizer_update(self, vector_input): return update_mean, update_variance @staticmethod - def create_vector_observation_encoder(observation_input, h_size, activation, num_layers, scope, - reuse): + def create_continuous_observation_encoder(observation_input, h_size, activation, num_layers, scope, reuse): """ Builds a set of hidden state encoders. :param reuse: Whether to re-use the weights within the same scope. @@ -111,14 +109,11 @@ def create_vector_observation_encoder(observation_input, h_size, activation, num with tf.variable_scope(scope): hidden = observation_input for i in range(num_layers): - hidden = tf.layers.dense(hidden, h_size, activation=activation, reuse=reuse, - name="hidden_{}".format(i), - kernel_initializer=c_layers.variance_scaling_initializer( - 1.0)) + hidden = tf.layers.dense(hidden, h_size, activation=activation, reuse=reuse, name="hidden_{}".format(i), + kernel_initializer=c_layers.variance_scaling_initializer(1.0)) return hidden - def create_visual_observation_encoder(self, image_input, h_size, activation, num_layers, scope, - reuse): + def create_visual_observation_encoder(self, image_input, h_size, activation, num_layers, scope, reuse): """ Builds a set of visual (CNN) encoders. :param reuse: Whether to re-use the weights within the same scope. @@ -136,30 +131,33 @@ def create_visual_observation_encoder(self, image_input, h_size, activation, num activation=tf.nn.elu, reuse=reuse, name="conv_2") hidden = c_layers.flatten(conv2) - with tf.variable_scope(scope + '/' + 'flat_encoding'): - hidden_flat = self.create_vector_observation_encoder(hidden, h_size, activation, - num_layers, scope, reuse) + with tf.variable_scope(scope+'/'+'flat_encoding'): + hidden_flat = self.create_continuous_observation_encoder(hidden, h_size, activation, + num_layers, scope, reuse) return hidden_flat @staticmethod - def create_discrete_action_masking_layer(all_logits, action_masks, action_size): + def create_discrete_observation_encoder(observation_input, s_size, h_size, activation, + num_layers, scope, reuse): """ - Creates a masking layer for the discrete actions - :param all_logits: The concatenated unnormalized action probabilities for all branches - :param action_masks: The mask for the logits. Must be of dimension [None x total_number_of_action] - :param action_size: A list containing the number of possible actions for each branch - :return: The action output dimension [batch_size, num_branches] and the concatenated normalized logits + Builds a set of hidden state encoders from discrete state input. + :param reuse: Whether to re-use the weights within the same scope. + :param scope: The scope of the graph within which to create the ops. + :param observation_input: Discrete observation. + :param s_size: state input size (discrete). + :param h_size: Hidden layer size. + :param activation: What type of activation function to use for layers. + :param num_layers: number of hidden layers to create. + :return: List of hidden layer tensors. """ - action_idx = [0] + list(np.cumsum(action_size)) - branches_logits = [all_logits[:, action_idx[i]:action_idx[i + 1]] for i in range(len(action_size))] - branch_masks = [action_masks[:, action_idx[i]:action_idx[i + 1]] for i in range(len(action_size))] - raw_probs = [tf.multiply(tf.nn.softmax(branches_logits[k]), branch_masks[k]) + 1.0e-10 - for k in range(len(action_size))] - normalized_probs = [ - tf.divide(raw_probs[k], tf.reduce_sum(raw_probs[k] + 1.0e-10, axis=1, keepdims=True)) - for k in range(len(action_size))] - output = tf.concat([tf.multinomial(tf.log(normalized_probs[k]), 1) for k in range(len(action_size))], axis=1) - return output, tf.concat([tf.log(normalized_probs[k]) for k in range(len(action_size))], axis=1) + with tf.variable_scope(scope): + vector_in = tf.reshape(observation_input, [-1]) + state_onehot = tf.one_hot(vector_in, s_size) + hidden = state_onehot + for i in range(num_layers): + hidden = tf.layers.dense(hidden, h_size, use_bias=False, activation=activation, + reuse=reuse, name="hidden_{}".format(i)) + return hidden def create_observation_streams(self, num_streams, h_size, num_layers): """ @@ -174,8 +172,7 @@ def create_observation_streams(self, num_streams, h_size, num_layers): self.visual_in = [] for i in range(brain.number_visual_observations): - visual_input = self.create_visual_input(brain.camera_resolutions[i], - name="visual_observation_" + str(i)) + visual_input = self.create_visual_input(brain.camera_resolutions[i], name="visual_observation_" + str(i)) self.visual_in.append(visual_input) vector_observation_input = self.create_vector_input() @@ -183,22 +180,23 @@ def create_observation_streams(self, num_streams, h_size, num_layers): for i in range(num_streams): visual_encoders = [] hidden_state, hidden_visual = None, None - if self.vis_obs_size > 0: + if self.v_size > 0: for j in range(brain.number_visual_observations): - encoded_visual = self.create_visual_observation_encoder(self.visual_in[j], - h_size, - activation_fn, - num_layers, + encoded_visual = self.create_visual_observation_encoder(self.visual_in[j], h_size, + activation_fn, num_layers, "main_graph_{}_encoder{}" .format(i, j), False) visual_encoders.append(encoded_visual) hidden_visual = tf.concat(visual_encoders, axis=1) if brain.vector_observation_space_size > 0: - hidden_state = self.create_vector_observation_encoder(vector_observation_input, - h_size, activation_fn, - num_layers, - "main_graph_{}".format(i), - False) + if brain.vector_observation_space_type == "continuous": + hidden_state = self.create_continuous_observation_encoder(vector_observation_input, + h_size, activation_fn, num_layers, + "main_graph_{}".format(i), False) + else: + hidden_state = self.create_discrete_observation_encoder(vector_observation_input, self.o_size, + h_size, activation_fn, num_layers, + "main_graph_{}".format(i), False) if hidden_state is not None and hidden_visual is not None: final_hidden = tf.concat([hidden_visual, hidden_state], axis=1) elif hidden_state is None and hidden_visual is not None: @@ -227,14 +225,51 @@ def create_recurrent_encoder(input_state, memory_in, sequence_length, name='lstm _half_point = int(m_size / 2) with tf.variable_scope(name): rnn_cell = tf.contrib.rnn.BasicLSTMCell(_half_point) - lstm_vector_in = tf.contrib.rnn.LSTMStateTuple(memory_in[:, :_half_point], - memory_in[:, _half_point:]) + lstm_vector_in = tf.contrib.rnn.LSTMStateTuple(memory_in[:, :_half_point], memory_in[:, _half_point:]) recurrent_output, lstm_state_out = tf.nn.dynamic_rnn(rnn_cell, lstm_input_state, initial_state=lstm_vector_in) recurrent_output = tf.reshape(recurrent_output, shape=[-1, _half_point]) return recurrent_output, tf.concat([lstm_state_out.c, lstm_state_out.h], axis=1) + def create_dc_actor_critic(self, h_size, num_layers): + """ + Creates Discrete control actor-critic model. + :param h_size: Size of hidden linear layers. + :param num_layers: Number of hidden linear layers. + """ + hidden_streams = self.create_observation_streams(1, h_size, num_layers) + hidden = hidden_streams[0] + + if self.use_recurrent: + tf.Variable(self.m_size, name="memory_size", trainable=False, dtype=tf.int32) + self.prev_action = tf.placeholder(shape=[None], dtype=tf.int32, name='prev_action') + prev_action_oh = tf.one_hot(self.prev_action, self.a_size) + hidden = tf.concat([hidden, prev_action_oh], axis=1) + + self.memory_in = tf.placeholder(shape=[None, self.m_size], dtype=tf.float32, name='recurrent_in') + hidden, memory_out = self.create_recurrent_encoder(hidden, self.memory_in, self.sequence_length) + self.memory_out = tf.identity(memory_out, name='recurrent_out') + + self.policy = tf.layers.dense(hidden, self.a_size, activation=None, use_bias=False, + kernel_initializer=c_layers.variance_scaling_initializer(factor=0.01)) + + self.all_probs = tf.nn.softmax(self.policy, name="action_probs") + output = tf.multinomial(self.policy, 1) + self.output = tf.identity(output, name="action") + + value = tf.layers.dense(hidden, 1, activation=None) + self.value = tf.identity(value, name="value_estimate") + self.entropy = -tf.reduce_sum(self.all_probs * tf.log(self.all_probs + 1e-10), axis=1) + self.action_holder = tf.placeholder(shape=[None], dtype=tf.int32) + self.selected_actions = tf.one_hot(self.action_holder, self.a_size) + + self.all_old_probs = tf.placeholder(shape=[None, self.a_size], dtype=tf.float32, name='old_probabilities') + + # We reshape these tensors to [batch x 1] in order to be of the same rank as continuous control probabilities. + self.probs = tf.expand_dims(tf.reduce_sum(self.all_probs * self.selected_actions, axis=1), 1) + self.old_probs = tf.expand_dims(tf.reduce_sum(self.all_old_probs * self.selected_actions, axis=1), 1) + def create_cc_actor_critic(self, h_size, num_layers): """ Creates Continuous control actor-critic model. @@ -245,26 +280,22 @@ def create_cc_actor_critic(self, h_size, num_layers): if self.use_recurrent: tf.Variable(self.m_size, name="memory_size", trainable=False, dtype=tf.int32) - self.memory_in = tf.placeholder(shape=[None, self.m_size], dtype=tf.float32, - name='recurrent_in') + self.memory_in = tf.placeholder(shape=[None, self.m_size], dtype=tf.float32, name='recurrent_in') _half_point = int(self.m_size / 2) hidden_policy, memory_policy_out = self.create_recurrent_encoder( - hidden_streams[0], self.memory_in[:, :_half_point], self.sequence_length, - name='lstm_policy') + hidden_streams[0], self.memory_in[:, :_half_point], self.sequence_length, name='lstm_policy') hidden_value, memory_value_out = self.create_recurrent_encoder( - hidden_streams[1], self.memory_in[:, _half_point:], self.sequence_length, - name='lstm_value') - self.memory_out = tf.concat([memory_policy_out, memory_value_out], axis=1, - name='recurrent_out') + hidden_streams[1], self.memory_in[:, _half_point:], self.sequence_length, name='lstm_value') + self.memory_out = tf.concat([memory_policy_out, memory_value_out], axis=1, name='recurrent_out') else: hidden_policy = hidden_streams[0] hidden_value = hidden_streams[1] - mu = tf.layers.dense(hidden_policy, self.act_size[0], activation=None, + mu = tf.layers.dense(hidden_policy, self.a_size, activation=None, kernel_initializer=c_layers.variance_scaling_initializer(factor=0.01)) - log_sigma_sq = tf.get_variable("log_sigma_squared", [self.act_size[0]], dtype=tf.float32, + log_sigma_sq = tf.get_variable("log_sigma_squared", [self.a_size], dtype=tf.float32, initializer=tf.zeros_initializer()) sigma_sq = tf.exp(log_sigma_sq) @@ -278,91 +309,19 @@ def create_cc_actor_critic(self, h_size, num_layers): self.selected_actions = tf.stop_gradient(output_post) # Compute probability of model output. - all_probs = - 0.5 * tf.square(tf.stop_gradient(self.output_pre) - mu) / sigma_sq \ - - 0.5 * tf.log(2.0 * np.pi) - 0.5 * log_sigma_sq + a = tf.exp(-1 * tf.pow(tf.stop_gradient(self.output_pre) - mu, 2) / (2 * sigma_sq)) + b = 1 / tf.sqrt(2 * sigma_sq * np.pi) + all_probs = tf.multiply(a, b) + self.all_probs = tf.identity(all_probs, name='action_probs') - self.all_log_probs = tf.identity(all_probs, name='action_probs') - - self.entropy = 0.5 * tf.reduce_mean(tf.log(2 * np.pi * np.e) + log_sigma_sq) + self.entropy = tf.reduce_mean(0.5 * tf.log(2 * np.pi * np.e * sigma_sq)) value = tf.layers.dense(hidden_value, 1, activation=None) self.value = tf.identity(value, name="value_estimate") - self.all_old_log_probs = tf.placeholder(shape=[None, self.act_size[0]], dtype=tf.float32, - name='old_probabilities') + self.all_old_probs = tf.placeholder(shape=[None, self.a_size], dtype=tf.float32, + name='old_probabilities') # We keep these tensors the same name, but use new nodes to keep code parallelism with discrete control. - self.log_probs = tf.reduce_sum((tf.identity(self.all_log_probs)), axis=1, keepdims=True) - self.old_log_probs = tf.reduce_sum((tf.identity(self.all_old_log_probs)), axis=1, - keepdims=True) - - def create_dc_actor_critic(self, h_size, num_layers): - """ - Creates Discrete control actor-critic model. - :param h_size: Size of hidden linear layers. - :param num_layers: Number of hidden linear layers. - """ - hidden_streams = self.create_observation_streams(1, h_size, num_layers) - hidden = hidden_streams[0] - - if self.use_recurrent: - tf.Variable(self.m_size, name="memory_size", trainable=False, dtype=tf.int32) - self.prev_action = tf.placeholder(shape=[None, len(self.act_size)], dtype=tf.int32, - name='prev_action') - prev_action_oh = tf.concat([ - tf.one_hot(self.prev_action[:, i], self.act_size[i]) for i in - range(len(self.act_size))], axis=1) - hidden = tf.concat([hidden, prev_action_oh], axis=1) - - self.memory_in = tf.placeholder(shape=[None, self.m_size], dtype=tf.float32, - name='recurrent_in') - hidden, memory_out = self.create_recurrent_encoder(hidden, self.memory_in, - self.sequence_length) - self.memory_out = tf.identity(memory_out, name='recurrent_out') - - policy_branches = [] - for size in self.act_size: - policy_branches.append(tf.layers.dense(hidden, size, activation=None, use_bias=False, - kernel_initializer=c_layers.variance_scaling_initializer(factor=0.01))) - - self.all_log_probs = tf.concat([branch for branch in policy_branches], axis=1, name="action_probs") - - self.action_masks = tf.placeholder(shape=[None, sum(self.act_size)], dtype=tf.float32, name="action_masks") - output, normalized_logits = self.create_discrete_action_masking_layer( - self.all_log_probs, self.action_masks, self.act_size) - - self.output = tf.identity(output, name="action") - - value = tf.layers.dense(hidden, 1, activation=None) - self.value = tf.identity(value, name="value_estimate") - - self.action_holder = tf.placeholder( - shape=[None, len(policy_branches)], dtype=tf.int32, name="action_holder") - self.selected_actions = tf.concat([ - tf.one_hot(self.action_holder[:, i], self.act_size[i]) for i in range(len(self.act_size))], axis=1) - - self.all_old_log_probs = tf.placeholder( - shape=[None, sum(self.act_size)], dtype=tf.float32, name='old_probabilities') - _, old_normalized_logits = self.create_discrete_action_masking_layer( - self.all_old_log_probs, self.action_masks, self.act_size) - - action_idx = [0] + list(np.cumsum(self.act_size)) - - self.entropy = tf.reduce_sum((tf.stack([ - tf.nn.softmax_cross_entropy_with_logits_v2( - labels=tf.nn.softmax(self.all_log_probs[:, action_idx[i]:action_idx[i + 1]]), - logits=self.all_log_probs[:, action_idx[i]:action_idx[i + 1]]) - for i in range(len(self.act_size))], axis=1)), axis=1) - - self.log_probs = tf.reduce_sum((tf.stack([ - -tf.nn.softmax_cross_entropy_with_logits_v2( - labels=self.selected_actions[:, action_idx[i]:action_idx[i + 1]], - logits=normalized_logits[:, action_idx[i]:action_idx[i + 1]] - ) - for i in range(len(self.act_size))], axis=1)), axis=1, keepdims=True) - self.old_log_probs = tf.reduce_sum((tf.stack([ - -tf.nn.softmax_cross_entropy_with_logits_v2( - labels=self.selected_actions[:, action_idx[i]:action_idx[i + 1]], - logits=old_normalized_logits[:, action_idx[i]:action_idx[i + 1]] - ) - for i in range(len(self.act_size))], axis=1)), axis=1, keepdims=True) + self.probs = tf.identity(self.all_probs) + self.old_probs = tf.identity(self.all_old_probs) diff --git a/ml-agents/mlagents/trainers/ppo/__init__.py b/python/unitytrainers/ppo/__init__.py similarity index 67% rename from ml-agents/mlagents/trainers/ppo/__init__.py rename to python/unitytrainers/ppo/__init__.py index d48a8ccfe1..a1ee1b79d9 100644 --- a/ml-agents/mlagents/trainers/ppo/__init__.py +++ b/python/unitytrainers/ppo/__init__.py @@ -1,3 +1,2 @@ from .models import * from .trainer import * -from .policy import * diff --git a/ml-agents/mlagents/trainers/ppo/models.py b/python/unitytrainers/ppo/models.py similarity index 73% rename from ml-agents/mlagents/trainers/ppo/models.py rename to python/unitytrainers/ppo/models.py index 86cf0d03dd..0943b68ac5 100644 --- a/ml-agents/mlagents/trainers/ppo/models.py +++ b/python/unitytrainers/ppo/models.py @@ -1,16 +1,15 @@ import logging -import numpy as np import tensorflow as tf -from mlagents.trainers.models import LearningModel +from unitytrainers.models import LearningModel -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class PPOModel(LearningModel): def __init__(self, brain, lr=1e-4, h_size=128, epsilon=0.2, beta=1e-3, max_step=5e6, normalize=False, use_recurrent=False, num_layers=2, m_size=None, use_curiosity=False, - curiosity_strength=0.01, curiosity_enc_size=128, scope='Model', seed=0): + curiosity_strength=0.01, curiosity_enc_size=128): """ Takes a Unity environment and model-specific hyper-parameters and returns the appropriate PPO agent model for the environment. @@ -26,25 +25,24 @@ def __init__(self, brain, lr=1e-4, h_size=128, epsilon=0.2, beta=1e-3, max_step= :param num_layers Number of hidden layers between encoded input and policy & value layers :param m_size: Size of brain memory. """ - with tf.variable_scope(scope): - LearningModel.__init__(self, m_size, normalize, use_recurrent, brain, seed) - self.use_curiosity = use_curiosity - if num_layers < 1: - num_layers = 1 - self.last_reward, self.new_reward, self.update_reward = self.create_reward_encoder() - if brain.vector_action_space_type == "continuous": - self.create_cc_actor_critic(h_size, num_layers) - self.entropy = tf.ones_like(tf.reshape(self.value, [-1])) * self.entropy - else: - self.create_dc_actor_critic(h_size, num_layers) - if self.use_curiosity: - self.curiosity_enc_size = curiosity_enc_size - self.curiosity_strength = curiosity_strength - encoded_state, encoded_next_state = self.create_curiosity_encoders() - self.create_inverse_model(encoded_state, encoded_next_state) - self.create_forward_model(encoded_state, encoded_next_state) - self.create_ppo_optimizer(self.log_probs, self.old_log_probs, self.value, - self.entropy, beta, epsilon, lr, max_step) + LearningModel.__init__(self, m_size, normalize, use_recurrent, brain) + self.use_curiosity = use_curiosity + if num_layers < 1: + num_layers = 1 + self.last_reward, self.new_reward, self.update_reward = self.create_reward_encoder() + if brain.vector_action_space_type == "continuous": + self.create_cc_actor_critic(h_size, num_layers) + self.entropy = tf.ones_like(tf.reshape(self.value, [-1])) * self.entropy + else: + self.create_dc_actor_critic(h_size, num_layers) + if self.use_curiosity: + self.curiosity_enc_size = curiosity_enc_size + self.curiosity_strength = curiosity_strength + encoded_state, encoded_next_state = self.create_curiosity_encoders() + self.create_inverse_model(encoded_state, encoded_next_state) + self.create_forward_model(encoded_state, encoded_next_state) + self.create_ppo_optimizer(self.probs, self.old_probs, self.value, + self.entropy, beta, epsilon, lr, max_step) @staticmethod def create_reward_encoder(): @@ -64,11 +62,11 @@ def create_curiosity_encoders(self): encoded_state_list = [] encoded_next_state_list = [] - if self.vis_obs_size > 0: + if self.v_size > 0: self.next_visual_in = [] visual_encoders = [] next_visual_encoders = [] - for i in range(self.vis_obs_size): + for i in range(self.v_size): # Create input ops for next (t+1) visual observations. next_visual_input = self.create_visual_input(self.brain.camera_resolutions[i], name="next_visual_observation_" + str(i)) @@ -92,21 +90,35 @@ def create_curiosity_encoders(self): encoded_state_list.append(hidden_visual) encoded_next_state_list.append(hidden_next_visual) - if self.vec_obs_size > 0: + if self.o_size > 0: + # Create the encoder ops for current and next vector input. Not that these encoders are siamese. - # Create input op for next (t+1) vector observation. - self.next_vector_in = tf.placeholder(shape=[None, self.vec_obs_size], dtype=tf.float32, - name='next_vector_observation') - - encoded_vector_obs = self.create_vector_observation_encoder(self.vector_in, - self.curiosity_enc_size, - self.swish, 2, "vector_obs_encoder", - False) - encoded_next_vector_obs = self.create_vector_observation_encoder(self.next_vector_in, - self.curiosity_enc_size, - self.swish, 2, - "vector_obs_encoder", - True) + if self.brain.vector_observation_space_type == "continuous": + # Create input op for next (t+1) vector observation. + self.next_vector_in = tf.placeholder(shape=[None, self.o_size], dtype=tf.float32, + name='next_vector_observation') + + encoded_vector_obs = self.create_continuous_observation_encoder(self.vector_in, + self.curiosity_enc_size, + self.swish, 2, "vector_obs_encoder", + False) + encoded_next_vector_obs = self.create_continuous_observation_encoder(self.next_vector_in, + self.curiosity_enc_size, + self.swish, 2, + "vector_obs_encoder", + True) + else: + self.next_vector_in = tf.placeholder(shape=[None, 1], dtype=tf.int32, + name='next_vector_observation') + + encoded_vector_obs = self.create_discrete_observation_encoder(self.vector_in, self.o_size, + self.curiosity_enc_size, + self.swish, 2, "vector_obs_encoder", + False) + encoded_next_vector_obs = self.create_discrete_observation_encoder(self.next_vector_in, self.o_size, + self.curiosity_enc_size, + self.swish, 2, "vector_obs_encoder", + True) encoded_state_list.append(encoded_vector_obs) encoded_next_state_list.append(encoded_next_vector_obs) @@ -124,13 +136,11 @@ def create_inverse_model(self, encoded_state, encoded_next_state): combined_input = tf.concat([encoded_state, encoded_next_state], axis=1) hidden = tf.layers.dense(combined_input, 256, activation=self.swish) if self.brain.vector_action_space_type == "continuous": - pred_action = tf.layers.dense(hidden, self.act_size[0], activation=None) + pred_action = tf.layers.dense(hidden, self.a_size, activation=None) squared_difference = tf.reduce_sum(tf.squared_difference(pred_action, self.selected_actions), axis=1) self.inverse_loss = tf.reduce_mean(tf.dynamic_partition(squared_difference, self.mask, 2)[1]) else: - pred_action = tf.concat( - [tf.layers.dense(hidden, self.act_size[i], activation=tf.nn.softmax) - for i in range(len(self.act_size))], axis=1) + pred_action = tf.layers.dense(hidden, self.a_size, activation=tf.nn.softmax) cross_entropy = tf.reduce_sum(-tf.log(pred_action + 1e-10) * self.selected_actions, axis=1) self.inverse_loss = tf.reduce_mean(tf.dynamic_partition(cross_entropy, self.mask, 2)[1]) @@ -143,8 +153,8 @@ def create_forward_model(self, encoded_state, encoded_next_state): """ combined_input = tf.concat([encoded_state, self.selected_actions], axis=1) hidden = tf.layers.dense(combined_input, 256, activation=self.swish) - # We compare against the concatenation of all observation streams, hence `self.vis_obs_size + int(self.vec_obs_size > 0)`. - pred_next_state = tf.layers.dense(hidden, self.curiosity_enc_size * (self.vis_obs_size + int(self.vec_obs_size > 0)), + # We compare against the concatenation of all observation streams, hence `self.v_size + int(self.o_size > 0)`. + pred_next_state = tf.layers.dense(hidden, self.curiosity_enc_size * (self.v_size + int(self.o_size > 0)), activation=None) squared_difference = 0.5 * tf.reduce_sum(tf.squared_difference(pred_next_state, encoded_next_state), axis=1) @@ -183,7 +193,7 @@ def create_ppo_optimizer(self, probs, old_probs, value, entropy, beta, epsilon, # Here we calculate PPO policy loss. In continuous control this is done independently for each action gaussian # and then averaged together. This provides significantly better performance than treating the probability # as an average of probabilities, or as a joint probability. - r_theta = tf.exp(probs - old_probs) + r_theta = probs / (old_probs + 1e-10) p_opt_a = r_theta * self.advantage p_opt_b = tf.clip_by_value(r_theta, 1.0 - decay_epsilon, 1.0 + decay_epsilon) * self.advantage self.policy_loss = -tf.reduce_mean(tf.dynamic_partition(tf.minimum(p_opt_a, p_opt_b), self.mask, 2)[1]) diff --git a/ml-agents/mlagents/trainers/ppo/trainer.py b/python/unitytrainers/ppo/trainer.py old mode 100644 new mode 100755 similarity index 51% rename from ml-agents/mlagents/trainers/ppo/trainer.py rename to python/unitytrainers/ppo/trainer.py index 80040f3944..92c36d5e29 --- a/ml-agents/mlagents/trainers/ppo/trainer.py +++ b/python/unitytrainers/ppo/trainer.py @@ -4,31 +4,29 @@ import logging import os -from collections import deque import numpy as np import tensorflow as tf -from mlagents.envs import AllBrainInfo, BrainInfo -from mlagents.trainers.buffer import Buffer -from mlagents.trainers.ppo.policy import PPOPolicy -from mlagents.trainers.trainer import UnityTrainerException, Trainer +from unityagents import AllBrainInfo, BrainInfo +from unitytrainers.buffer import Buffer +from unitytrainers.ppo.models import PPOModel +from unitytrainers.trainer import UnityTrainerException, Trainer -logger = logging.getLogger("mlagents.envs") +logger = logging.getLogger("unityagents") class PPOTrainer(Trainer): """The PPOTrainer is an implementation of the PPO algorithm.""" - def __init__(self, sess, brain, reward_buff_cap, trainer_parameters, training, seed, run_id): + def __init__(self, sess, env, brain_name, trainer_parameters, training, seed): """ Responsible for collecting experiences and training PPO model. :param sess: Tensorflow session. + :param env: The UnityEnvironment. :param trainer_parameters: The parameters for the trainer (dictionary). :param training: Whether the trainer is set for training. """ - super(PPOTrainer, self).__init__(sess, brain.brain_name, trainer_parameters, training, run_id) - self.param_keys = ['batch_size', 'beta', 'buffer_size', 'epsilon', 'gamma', 'hidden_units', 'lambd', 'learning_rate', 'max_steps', 'normalize', 'num_epoch', 'num_layers', 'time_horizon', 'sequence_length', 'summary_freq', 'use_recurrent', @@ -38,14 +36,42 @@ def __init__(self, sess, brain, reward_buff_cap, trainer_parameters, training, s for k in self.param_keys: if k not in trainer_parameters: raise UnityTrainerException("The hyperparameter {0} could not be found for the PPO trainer of " - "brain {1}.".format(k, brain.brain_name)) + "brain {1}.".format(k, brain_name)) - self.use_curiosity = bool(trainer_parameters['use_curiosity']) + super(PPOTrainer, self).__init__(sess, env, brain_name, trainer_parameters, training) + self.use_recurrent = trainer_parameters["use_recurrent"] + self.use_curiosity = bool(trainer_parameters['use_curiosity']) + self.sequence_length = 1 self.step = 0 - - self.policy = PPOPolicy(seed, brain, trainer_parameters, - sess, self.is_training) + self.has_updated = False + self.m_size = None + if self.use_recurrent: + self.m_size = trainer_parameters["memory_size"] + self.sequence_length = trainer_parameters["sequence_length"] + if self.m_size == 0: + raise UnityTrainerException("The memory size for brain {0} is 0 even though the trainer uses recurrent." + .format(brain_name)) + elif self.m_size % 4 != 0: + raise UnityTrainerException("The memory size for brain {0} is {1} but it must be divisible by 4." + .format(brain_name, self.m_size)) + + self.variable_scope = trainer_parameters['graph_scope'] + with tf.variable_scope(self.variable_scope): + tf.set_random_seed(seed) + self.model = PPOModel(env.brains[brain_name], + lr=float(trainer_parameters['learning_rate']), + h_size=int(trainer_parameters['hidden_units']), + epsilon=float(trainer_parameters['epsilon']), + beta=float(trainer_parameters['beta']), + max_step=float(trainer_parameters['max_steps']), + normalize=trainer_parameters['normalize'], + use_recurrent=trainer_parameters['use_recurrent'], + num_layers=int(trainer_parameters['num_layers']), + m_size=self.m_size, + use_curiosity=bool(trainer_parameters['use_curiosity']), + curiosity_strength=float(trainer_parameters['curiosity_strength']), + curiosity_enc_size=float(trainer_parameters['curiosity_enc_size'])) stats = {'cumulative_reward': [], 'episode_length': [], 'value_estimate': [], 'entropy': [], 'value_loss': [], 'policy_loss': [], 'learning_rate': []} @@ -58,14 +84,27 @@ def __init__(self, sess, brain, reward_buff_cap, trainer_parameters, training, s self.training_buffer = Buffer() self.cumulative_rewards = {} - self._reward_buffer = deque(maxlen=reward_buff_cap) self.episode_steps = {} + self.is_continuous_action = (env.brains[brain_name].vector_action_space_type == "continuous") + self.is_continuous_observation = (env.brains[brain_name].vector_observation_space_type == "continuous") + self.use_visual_obs = (env.brains[brain_name].number_visual_observations > 0) + self.use_vector_obs = (env.brains[brain_name].vector_observation_space_size > 0) self.summary_path = trainer_parameters['summary_path'] if not os.path.exists(self.summary_path): os.makedirs(self.summary_path) self.summary_writer = tf.summary.FileWriter(self.summary_path) + self.inference_run_list = [self.model.output, self.model.all_probs, self.model.value, + self.model.entropy, self.model.learning_rate] + if self.is_continuous_action: + self.inference_run_list.append(self.model.output_pre) + if self.use_recurrent: + self.inference_run_list.extend([self.model.memory_out]) + if (self.is_training and self.is_continuous_observation and + self.use_vector_obs and self.trainer_parameters['normalize']): + self.inference_run_list.extend([self.model.update_mean, self.model.update_variance]) + def __str__(self): return '''Hyperparameters for the PPO Trainer of brain {0}: \n{1}'''.format( self.brain_name, '\n'.join(['\t{0}:\t{1}'.format(x, self.trainer_parameters[x]) for x in self.param_keys])) @@ -77,6 +116,13 @@ def parameters(self): """ return self.trainer_parameters + @property + def graph_scope(self): + """ + Returns the graph scope of the trainer. + """ + return self.variable_scope + @property def get_max_steps(self): """ @@ -94,14 +140,12 @@ def get_step(self): return self.step @property - def reward_buffer(self): + def get_last_reward(self): """ - Returns the reward buffer. The reward buffer contains the cumulative - rewards of the most recent episodes completed by agents using this - trainer. - :return: the reward buffer. + Returns the last reward the trainer has had + :return: the new last reward """ - return self._reward_buffer + return self.sess.run(self.model.last_reward) def increment_step_and_update_last_reward(self): """ @@ -109,9 +153,12 @@ def increment_step_and_update_last_reward(self): """ if len(self.stats['cumulative_reward']) > 0: mean_reward = np.mean(self.stats['cumulative_reward']) - self.policy.update_reward(mean_reward) - self.policy.increment_step() - self.step = self.policy.get_current_step() + self.sess.run([self.model.update_reward, + self.model.increment_step], + feed_dict={self.model.new_reward: mean_reward}) + else: + self.sess.run(self.model.increment_step) + self.step = self.sess.run(self.model.global_step) def take_action(self, all_brain_info: AllBrainInfo): """ @@ -122,17 +169,32 @@ def take_action(self, all_brain_info: AllBrainInfo): """ curr_brain_info = all_brain_info[self.brain_name] if len(curr_brain_info.agents) == 0: - return [], [], [], None, None - - run_out = self.policy.evaluate(curr_brain_info) - self.stats['value_estimate'].append(run_out['value'].mean()) - self.stats['entropy'].append(run_out['entropy'].mean()) - self.stats['learning_rate'].append(run_out['learning_rate']) - if self.policy.use_recurrent: - return run_out['action'], run_out['memory_out'], None, \ - run_out['value'], run_out + return [], [], [], None + + feed_dict = {self.model.batch_size: len(curr_brain_info.vector_observations), + self.model.sequence_length: 1} + if self.use_recurrent: + if not self.is_continuous_action: + feed_dict[self.model.prev_action] = curr_brain_info.previous_vector_actions.flatten() + if curr_brain_info.memories.shape[1] == 0: + curr_brain_info.memories = np.zeros((len(curr_brain_info.agents), self.m_size)) + feed_dict[self.model.memory_in] = curr_brain_info.memories + if self.use_visual_obs: + for i, _ in enumerate(curr_brain_info.visual_observations): + feed_dict[self.model.visual_in[i]] = curr_brain_info.visual_observations[i] + if self.use_vector_obs: + feed_dict[self.model.vector_in] = curr_brain_info.vector_observations + + values = self.sess.run(self.inference_run_list, feed_dict=feed_dict) + run_out = dict(zip(self.inference_run_list, values)) + + self.stats['value_estimate'].append(run_out[self.model.value].mean()) + self.stats['entropy'].append(run_out[self.model.entropy].mean()) + self.stats['learning_rate'].append(run_out[self.model.learning_rate]) + if self.use_recurrent: + return run_out[self.model.output], run_out[self.model.memory_out], None, run_out else: - return run_out['action'], None, None, run_out['value'], run_out + return run_out[self.model.output], None, None, run_out def construct_curr_info(self, next_info: BrainInfo) -> BrainInfo: """ @@ -153,31 +215,82 @@ def construct_curr_info(self, next_info: BrainInfo) -> BrainInfo: prev_text_actions = [] for agent_id in next_info.agents: agent_brain_info = self.training_buffer[agent_id].last_brain_info + agent_index = agent_brain_info.agents.index(agent_id) if agent_brain_info is None: agent_brain_info = next_info - agent_index = agent_brain_info.agents.index(agent_id) for i in range(len(next_info.visual_observations)): visual_observations[i].append(agent_brain_info.visual_observations[i][agent_index]) vector_observations.append(agent_brain_info.vector_observations[agent_index]) text_observations.append(agent_brain_info.text_observations[agent_index]) - if self.policy.use_recurrent: - if len(agent_brain_info.memories > 0): - memories.append(agent_brain_info.memories[agent_index]) - else: - memories.append(self.policy.make_empty_memory(1)) + if self.use_recurrent: + memories.append(agent_brain_info.memories[agent_index]) rewards.append(agent_brain_info.rewards[agent_index]) local_dones.append(agent_brain_info.local_done[agent_index]) max_reacheds.append(agent_brain_info.max_reached[agent_index]) agents.append(agent_brain_info.agents[agent_index]) prev_vector_actions.append(agent_brain_info.previous_vector_actions[agent_index]) prev_text_actions.append(agent_brain_info.previous_text_actions[agent_index]) - if self.policy.use_recurrent: - memories = np.vstack(memories) - curr_info = BrainInfo(visual_observations, vector_observations, text_observations, - memories, rewards, agents, local_dones, prev_vector_actions, - prev_text_actions, max_reacheds) + curr_info = BrainInfo(visual_observations, vector_observations, text_observations, memories, rewards, + agents, local_dones, prev_vector_actions, prev_text_actions, max_reacheds) return curr_info + def generate_intrinsic_rewards(self, curr_info, next_info): + """ + Generates intrinsic reward used for Curiosity-based training. + :BrainInfo curr_info: Current BrainInfo. + :BrainInfo next_info: Next BrainInfo. + :return: Intrinsic rewards for all agents. + """ + if self.use_curiosity: + feed_dict = {self.model.batch_size: len(next_info.vector_observations), self.model.sequence_length: 1} + if self.is_continuous_action: + feed_dict[self.model.output] = next_info.previous_vector_actions + else: + feed_dict[self.model.action_holder] = next_info.previous_vector_actions.flatten() + + if curr_info.agents != next_info.agents: + curr_info = self.construct_curr_info(next_info) + + if self.use_visual_obs: + for i in range(len(curr_info.visual_observations)): + feed_dict[self.model.visual_in[i]] = curr_info.visual_observations[i] + feed_dict[self.model.next_visual_in[i]] = next_info.visual_observations[i] + if self.use_vector_obs: + feed_dict[self.model.vector_in] = curr_info.vector_observations + feed_dict[self.model.next_vector_in] = next_info.vector_observations + if self.use_recurrent: + if curr_info.memories.shape[1] == 0: + curr_info.memories = np.zeros((len(curr_info.agents), self.m_size)) + feed_dict[self.model.memory_in] = curr_info.memories + intrinsic_rewards = self.sess.run(self.model.intrinsic_reward, + feed_dict=feed_dict) * float(self.has_updated) + return intrinsic_rewards + else: + return None + + def generate_value_estimate(self, brain_info, idx): + """ + Generates value estimates for bootstrapping. + :param brain_info: BrainInfo to be used for bootstrapping. + :param idx: Index in BrainInfo of agent. + :return: Value estimate. + """ + feed_dict = {self.model.batch_size: 1, self.model.sequence_length: 1} + if self.use_visual_obs: + for i in range(len(brain_info.visual_observations)): + feed_dict[self.model.visual_in[i]] = [brain_info.visual_observations[i][idx]] + if self.use_vector_obs: + feed_dict[self.model.vector_in] = [brain_info.vector_observations[idx]] + if self.use_recurrent: + if brain_info.memories.shape[1] == 0: + brain_info.memories = np.zeros( + (len(brain_info.vector_observations), self.m_size)) + feed_dict[self.model.memory_in] = [brain_info.memories[idx]] + if not self.is_continuous_action and self.use_recurrent: + feed_dict[self.model.prev_action] = brain_info.previous_vector_actions[idx].flatten() + value_estimate = self.sess.run(self.model.value, feed_dict) + return value_estimate + def add_experiences(self, curr_all_info: AllBrainInfo, next_all_info: AllBrainInfo, take_action_outputs): """ Adds experiences to each agent's experience history. @@ -192,12 +305,7 @@ def add_experiences(self, curr_all_info: AllBrainInfo, next_all_info: AllBrainIn self.training_buffer[agent_id].last_brain_info = curr_info self.training_buffer[agent_id].last_take_action_outputs = take_action_outputs - if curr_info.agents != next_info.agents: - curr_to_use = self.construct_curr_info(next_info) - else: - curr_to_use = curr_info - - intrinsic_rewards = self.policy.get_intrinsic_rewards(curr_to_use, next_info) + intrinsic_rewards = self.generate_intrinsic_rewards(curr_info, next_info) for agent_id in next_info.agents: stored_info = self.training_buffer[agent_id].last_brain_info @@ -206,28 +314,26 @@ def add_experiences(self, curr_all_info: AllBrainInfo, next_all_info: AllBrainIn idx = stored_info.agents.index(agent_id) next_idx = next_info.agents.index(agent_id) if not stored_info.local_done[idx]: - for i, _ in enumerate(stored_info.visual_observations): - self.training_buffer[agent_id]['visual_obs%d' % i].append( - stored_info.visual_observations[i][idx]) - self.training_buffer[agent_id]['next_visual_obs%d' % i].append( - next_info.visual_observations[i][next_idx]) - if self.policy.use_vec_obs: + if self.use_visual_obs: + for i, _ in enumerate(stored_info.visual_observations): + self.training_buffer[agent_id]['visual_obs%d' % i].append( + stored_info.visual_observations[i][idx]) + self.training_buffer[agent_id]['next_visual_obs%d' % i].append( + next_info.visual_observations[i][idx]) + if self.use_vector_obs: self.training_buffer[agent_id]['vector_obs'].append(stored_info.vector_observations[idx]) self.training_buffer[agent_id]['next_vector_in'].append( next_info.vector_observations[next_idx]) - if self.policy.use_recurrent: + if self.use_recurrent: if stored_info.memories.shape[1] == 0: - stored_info.memories = np.zeros((len(stored_info.agents), self.policy.m_size)) + stored_info.memories = np.zeros((len(stored_info.agents), self.m_size)) self.training_buffer[agent_id]['memory'].append(stored_info.memories[idx]) - actions = stored_take_action_outputs['action'] - if self.policy.use_continuous_act: - actions_pre = stored_take_action_outputs['pre_action'] + actions = stored_take_action_outputs[self.model.output] + if self.is_continuous_action: + actions_pre = stored_take_action_outputs[self.model.output_pre] self.training_buffer[agent_id]['actions_pre'].append(actions_pre[idx]) - else: - self.training_buffer[agent_id]['action_mask'].append( - stored_info.action_masks[idx]) - a_dist = stored_take_action_outputs['log_probs'] - value = stored_take_action_outputs['value'] + a_dist = stored_take_action_outputs[self.model.all_probs] + value = stored_take_action_outputs[self.model.value] self.training_buffer[agent_id]['actions'].append(actions[idx]) self.training_buffer[agent_id]['prev_action'].append(stored_info.previous_vector_actions[idx]) self.training_buffer[agent_id]['masks'].append(1.0) @@ -238,6 +344,7 @@ def add_experiences(self, curr_all_info: AllBrainInfo, next_all_info: AllBrainIn self.training_buffer[agent_id]['rewards'].append(next_info.rewards[next_idx]) self.training_buffer[agent_id]['action_probs'].append(a_dist[idx]) self.training_buffer[agent_id]['value_estimates'].append(value[idx][0]) + if agent_id not in self.cumulative_rewards: self.cumulative_rewards[agent_id] = 0 self.cumulative_rewards[agent_id] += next_info.rewards[next_idx] @@ -273,7 +380,7 @@ def process_experiences(self, current_info: AllBrainInfo, new_info: AllBrainInfo else: bootstrapping_info = info idx = l - value_next = self.policy.get_value_estimate(bootstrapping_info, idx) + value_next = self.generate_value_estimate(bootstrapping_info, idx) self.training_buffer[agent_id]['advantages'].set( get_gae( @@ -287,13 +394,12 @@ def process_experiences(self, current_info: AllBrainInfo, new_info: AllBrainInfo + self.training_buffer[agent_id]['value_estimates'].get_batch()) self.training_buffer.append_update_buffer(agent_id, batch_size=None, - training_length=self.policy.sequence_length) + training_length=self.sequence_length) self.training_buffer[agent_id].reset_agent() if info.local_done[l]: self.stats['cumulative_reward'].append( self.cumulative_rewards.get(agent_id, 0)) - self.reward_buffer.appendleft(self.cumulative_rewards.get(agent_id, 0)) self.stats['episode_length'].append( self.episode_steps.get(agent_id, 0)) self.cumulative_rewards[agent_id] = 0 @@ -323,13 +429,13 @@ def is_ready_update(self): :return: A boolean corresponding to whether or not update_model() can be run """ size_of_buffer = len(self.training_buffer.update_buffer['actions']) - return size_of_buffer > max(int(self.trainer_parameters['buffer_size'] / self.policy.sequence_length), 1) + return size_of_buffer > max(int(self.trainer_parameters['buffer_size'] / self.sequence_length), 1) - def update_policy(self): + def update_model(self): """ - Uses training_buffer to update the policy. + Uses training_buffer to update model. """ - n_sequences = max(int(self.trainer_parameters['batch_size'] / self.policy.sequence_length), 1) + n_sequences = max(int(self.trainer_parameters['batch_size'] / self.sequence_length), 1) value_total, policy_total, forward_total, inverse_total = [], [], [], [] advantages = self.training_buffer.update_buffer['advantages'].get_batch() self.training_buffer.update_buffer['advantages'].set( @@ -341,12 +447,67 @@ def update_policy(self): for l in range(len(self.training_buffer.update_buffer['actions']) // n_sequences): start = l * n_sequences end = (l + 1) * n_sequences - run_out = self.policy.update(buffer.make_mini_batch(start, end), n_sequences) - value_total.append(run_out['value_loss']) - policy_total.append(np.abs(run_out['policy_loss'])) + feed_dict = {self.model.batch_size: n_sequences, + self.model.sequence_length: self.sequence_length, + self.model.mask_input: np.array(buffer['masks'][start:end]).flatten(), + self.model.returns_holder: np.array(buffer['discounted_returns'][start:end]).flatten(), + self.model.old_value: np.array(buffer['value_estimates'][start:end]).flatten(), + self.model.advantage: np.array(buffer['advantages'][start:end]).reshape([-1, 1]), + self.model.all_old_probs: np.array(buffer['action_probs'][start:end]).reshape( + [-1, self.brain.vector_action_space_size])} + if self.is_continuous_action: + feed_dict[self.model.output_pre] = np.array(buffer['actions_pre'][start:end]).reshape( + [-1, self.brain.vector_action_space_size]) + else: + feed_dict[self.model.action_holder] = np.array(buffer['actions'][start:end]).flatten() + if self.use_recurrent: + feed_dict[self.model.prev_action] = np.array(buffer['prev_action'][start:end]).flatten() + if self.use_vector_obs: + if self.is_continuous_observation: + total_observation_length = self.brain.vector_observation_space_size * \ + self.brain.num_stacked_vector_observations + feed_dict[self.model.vector_in] = np.array(buffer['vector_obs'][start:end]).reshape( + [-1, total_observation_length]) + if self.use_curiosity: + feed_dict[self.model.next_vector_in] = np.array(buffer['next_vector_in'][start:end]) \ + .reshape([-1, total_observation_length]) + else: + feed_dict[self.model.vector_in] = np.array(buffer['vector_obs'][start:end]).reshape( + [-1, self.brain.num_stacked_vector_observations]) + if self.use_curiosity: + feed_dict[self.model.next_vector_in] = np.array(buffer['next_vector_in'][start:end]) \ + .reshape([-1, self.brain.num_stacked_vector_observations]) + if self.use_visual_obs: + for i, _ in enumerate(self.model.visual_in): + _obs = np.array(buffer['visual_obs%d' % i][start:end]) + if self.sequence_length > 1 and self.use_recurrent: + (_batch, _seq, _w, _h, _c) = _obs.shape + feed_dict[self.model.visual_in[i]] = _obs.reshape([-1, _w, _h, _c]) + else: + feed_dict[self.model.visual_in[i]] = _obs + if self.use_curiosity: + for i, _ in enumerate(self.model.visual_in): + _obs = np.array(buffer['next_visual_obs%d' % i][start:end]) + if self.sequence_length > 1 and self.use_recurrent: + (_batch, _seq, _w, _h, _c) = _obs.shape + feed_dict[self.model.next_visual_in[i]] = _obs.reshape([-1, _w, _h, _c]) + else: + feed_dict[self.model.next_visual_in[i]] = _obs + if self.use_recurrent: + mem_in = np.array(buffer['memory'][start:end])[:, 0, :] + feed_dict[self.model.memory_in] = mem_in + + run_list = [self.model.value_loss, self.model.policy_loss, self.model.update_batch] + if self.use_curiosity: + run_list.extend([self.model.forward_loss, self.model.inverse_loss]) + values = self.sess.run(run_list, feed_dict=feed_dict) + self.has_updated = True + run_out = dict(zip(run_list, values)) + value_total.append(run_out[self.model.value_loss]) + policy_total.append(np.abs(run_out[self.model.policy_loss])) if self.use_curiosity: - inverse_total.append(run_out['inverse_loss']) - forward_total.append(run_out['forward_loss']) + inverse_total.append(run_out[self.model.inverse_loss]) + forward_total.append(run_out[self.model.forward_loss]) self.stats['value_loss'].append(np.mean(value_total)) self.stats['policy_loss'].append(np.mean(policy_total)) if self.use_curiosity: diff --git a/ml-agents/mlagents/trainers/trainer.py b/python/unitytrainers/trainer.py old mode 100644 new mode 100755 similarity index 74% rename from ml-agents/mlagents/trainers/trainer.py rename to python/unitytrainers/trainer.py index c8edc3d1c8..aa5b3033f5 --- a/ml-agents/mlagents/trainers/trainer.py +++ b/python/unitytrainers/trainer.py @@ -4,9 +4,9 @@ import tensorflow as tf import numpy as np -from mlagents.envs import UnityException, AllBrainInfo +from unityagents import UnityException, AllBrainInfo -logger = logging.getLogger("mlagents.trainers") +logger = logging.getLogger("unityagents") class UnityTrainerException(UnityException): @@ -17,20 +17,21 @@ class UnityTrainerException(UnityException): class Trainer(object): - """This class is the abstract class for the mlagents.trainers""" + """This class is the abstract class for the unitytrainers""" - def __init__(self, sess, brain_name, trainer_parameters, training, run_id): + def __init__(self, sess, env, brain_name, trainer_parameters, training): """ Responsible for collecting experiences and training a neural network model. :param sess: Tensorflow session. - :param trainer_parameters: The parameters for the trainer (dictionary). + :param env: The UnityEnvironment. + :param trainer_parameters: The parameters for the trainer (dictionary). :param training: Whether the trainer is set for training. """ - self.sess = sess self.brain_name = brain_name - self.run_id = run_id + self.brain = env.brains[self.brain_name] self.trainer_parameters = trainer_parameters self.is_training = training + self.sess = sess self.stats = {} self.summary_writer = None @@ -62,7 +63,7 @@ def get_max_steps(self): @property def get_step(self): """ - Returns the number of training steps the trainer has performed + Returns the number of steps the trainer has performed :return: the step count of the trainer """ raise UnityTrainerException("The get_step property was not implemented.") @@ -79,8 +80,7 @@ def increment_step_and_update_last_reward(self): """ Increment the step count of the trainer and updates the last reward """ - raise UnityTrainerException( - "The increment_step_and_update_last_reward method was not implemented.") + raise UnityTrainerException("The increment_step_and_update_last_reward method was not implemented.") def take_action(self, all_brain_info: AllBrainInfo): """ @@ -91,8 +91,7 @@ def take_action(self, all_brain_info: AllBrainInfo): """ raise UnityTrainerException("The take_action method was not implemented.") - def add_experiences(self, curr_info: AllBrainInfo, next_info: AllBrainInfo, - take_action_outputs): + def add_experiences(self, curr_info: AllBrainInfo, next_info: AllBrainInfo, take_action_outputs): """ Adds experiences to each agent's experience history. :param curr_info: Current AllBrainInfo. @@ -124,37 +123,34 @@ def is_ready_update(self): """ raise UnityTrainerException("The is_ready_update method was not implemented.") - def update_policy(self): + def update_model(self): """ Uses training_buffer to update model. """ raise UnityTrainerException("The update_model method was not implemented.") - def write_summary(self, global_step, lesson_num=0): + def write_summary(self, lesson_number): """ Saves training statistics to Tensorboard. - :param lesson_num: Current lesson number in curriculum. - :param global_step: The number of steps the simulation has been going for + :param lesson_number: The lesson the trainer is at. """ - if global_step % self.trainer_parameters['summary_freq'] == 0 and global_step != 0: - is_training = "Training." if self.is_training and self.get_step <= self.get_max_steps else "Not Training." + if (self.get_step % self.trainer_parameters['summary_freq'] == 0 and self.get_step != 0 and + self.is_training and self.get_step <= self.get_max_steps): if len(self.stats['cumulative_reward']) > 0: mean_reward = np.mean(self.stats['cumulative_reward']) - logger.info(" {}: {}: Step: {}. Mean Reward: {:0.3f}. Std of Reward: {:0.3f}. {}" - .format(self.run_id, self.brain_name, - min(self.get_step, self.get_max_steps), - mean_reward, np.std(self.stats['cumulative_reward']), - is_training)) + logger.info(" {}: Step: {}. Mean Reward: {:0.3f}. Std of Reward: {:0.3f}." + .format(self.brain_name, self.get_step, + mean_reward, np.std(self.stats['cumulative_reward']))) else: - logger.info(" {}: {}: Step: {}. No episode was completed since last summary. {}" - .format(self.run_id, self.brain_name, self.get_step, is_training)) + logger.info(" {}: Step: {}. No episode was completed since last summary." + .format(self.brain_name, self.get_step)) summary = tf.Summary() for key in self.stats: if len(self.stats[key]) > 0: stat_mean = float(np.mean(self.stats[key])) summary.value.add(tag='Info/{}'.format(key), simple_value=stat_mean) self.stats[key] = [] - summary.value.add(tag='Info/Lesson', simple_value=lesson_num) + summary.value.add(tag='Info/Lesson', simple_value=lesson_number) self.summary_writer.add_summary(summary, self.get_step) self.summary_writer.flush() @@ -166,11 +162,9 @@ def write_tensorboard_text(self, key, input_dict): :param input_dict: A dictionary that will be displayed in a table on Tensorboard. """ try: - s_op = tf.summary.text(key, tf.convert_to_tensor( - ([[str(x), str(input_dict[x])] for x in input_dict]))) + s_op = tf.summary.text(key, tf.convert_to_tensor(([[str(x), str(input_dict[x])] for x in input_dict]))) s = self.sess.run(s_op) self.summary_writer.add_summary(s, self.get_step) except: - logger.info( - "Cannot write text summary for Tensorboard. Tensorflow version must be r1.2 or above.") + logger.info("Cannot write text summary for Tensorboard. Tensorflow version must be r1.2 or above.") pass diff --git a/python/unitytrainers/trainer_controller.py b/python/unitytrainers/trainer_controller.py new file mode 100644 index 0000000000..ff067eb19a --- /dev/null +++ b/python/unitytrainers/trainer_controller.py @@ -0,0 +1,286 @@ +# # Unity ML-Agents Toolkit +# ## ML-Agent Learning +# Launches unitytrainers for each External Brains in a Unity Environment + +import logging +import numpy as np +import os +import re +import tensorflow as tf +import yaml + +from tensorflow.python.tools import freeze_graph +from unitytrainers.ppo.trainer import PPOTrainer +from unitytrainers.bc.trainer import BehavioralCloningTrainer +from unityagents import UnityEnvironment, UnityEnvironmentException + + +class TrainerController(object): + def __init__(self, env_path, run_id, save_freq, curriculum_file, fast_simulation, load, train, + worker_id, keep_checkpoints, lesson, seed, docker_target_name, trainer_config_path, + no_graphics): + """ + :param env_path: Location to the environment executable to be loaded. + :param run_id: The sub-directory name for model and summary statistics + :param save_freq: Frequency at which to save model + :param curriculum_file: Curriculum json file for environment + :param fast_simulation: Whether to run the game at training speed + :param load: Whether to load the model or randomly initialize + :param train: Whether to train model, or only run inference + :param worker_id: Number to add to communication port (5005). Used for multi-environment + :param keep_checkpoints: How many model checkpoints to keep + :param lesson: Start learning from this lesson + :param seed: Random seed used for training. + :param docker_target_name: Name of docker volume that will contain all data. + :param trainer_config_path: Fully qualified path to location of trainer configuration file + :param no_graphics: Whether to run the Unity simulator in no-graphics mode + """ + self.trainer_config_path = trainer_config_path + if env_path is not None: + env_path = (env_path.strip() + .replace('.app', '') + .replace('.exe', '') + .replace('.x86_64', '') + .replace('.x86', '')) # Strip out executable extensions if passed + # Recognize and use docker volume if one is passed as an argument + if docker_target_name == '': + self.docker_training = False + self.model_path = './models/{run_id}'.format(run_id=run_id) + self.curriculum_file = curriculum_file + self.summaries_dir = './summaries' + else: + self.docker_training = True + self.model_path = '/{docker_target_name}/models/{run_id}'.format( + docker_target_name=docker_target_name, + run_id=run_id) + if env_path is not None: + env_path = '/{docker_target_name}/{env_name}'.format(docker_target_name=docker_target_name, + env_name=env_path) + if curriculum_file is None: + self.curriculum_file = None + else: + self.curriculum_file = '/{docker_target_name}/{curriculum_file}'.format( + docker_target_name=docker_target_name, + curriculum_file=curriculum_file) + self.summaries_dir = '/{docker_target_name}/summaries'.format(docker_target_name=docker_target_name) + self.logger = logging.getLogger("unityagents") + self.run_id = run_id + self.save_freq = save_freq + self.lesson = lesson + self.fast_simulation = fast_simulation + self.load_model = load + self.train_model = train + self.worker_id = worker_id + self.keep_checkpoints = keep_checkpoints + self.trainers = {} + if seed == -1: + seed = np.random.randint(0, 999999) + self.seed = seed + np.random.seed(self.seed) + tf.set_random_seed(self.seed) + self.env = UnityEnvironment(file_name=env_path, worker_id=self.worker_id, + curriculum=self.curriculum_file, seed=self.seed, + docker_training=self.docker_training, + no_graphics=no_graphics) + if env_path is None: + self.env_name = 'editor_'+self.env.academy_name + else: + self.env_name = os.path.basename(os.path.normpath(env_path)) # Extract out name of environment + + def _get_progress(self): + if self.curriculum_file is not None: + progress = 0 + if self.env.curriculum.measure_type == "progress": + for brain_name in self.env.external_brain_names: + progress += self.trainers[brain_name].get_step / self.trainers[brain_name].get_max_steps + return progress / len(self.env.external_brain_names) + elif self.env.curriculum.measure_type == "reward": + for brain_name in self.env.external_brain_names: + progress += self.trainers[brain_name].get_last_reward + return progress + else: + return None + else: + return None + + def _process_graph(self): + nodes = [] + scopes = [] + for brain_name in self.trainers.keys(): + if self.trainers[brain_name].graph_scope is not None: + scope = self.trainers[brain_name].graph_scope + '/' + if scope == '/': + scope = '' + scopes += [scope] + if self.trainers[brain_name].parameters["trainer"] == "imitation": + nodes += [scope + x for x in ["action"]] + else: + nodes += [scope + x for x in ["action", "value_estimate", "action_probs"]] + if self.trainers[brain_name].parameters["use_recurrent"]: + nodes += [scope + x for x in ["recurrent_out", "memory_size"]] + if len(scopes) > 1: + self.logger.info("List of available scopes :") + for scope in scopes: + self.logger.info("\t" + scope) + self.logger.info("List of nodes to export :") + for n in nodes: + self.logger.info("\t" + n) + return nodes + + def _save_model(self, sess, saver, steps=0): + """ + Saves current model to checkpoint folder. + :param sess: Current Tensorflow session. + :param steps: Current number of steps in training process. + :param saver: Tensorflow saver for session. + """ + last_checkpoint = self.model_path + '/model-' + str(steps) + '.cptk' + saver.save(sess, last_checkpoint) + tf.train.write_graph(sess.graph_def, self.model_path, 'raw_graph_def.pb', as_text=False) + self.logger.info("Saved Model") + + def _export_graph(self): + """ + Exports latest saved model to .bytes format for Unity embedding. + """ + target_nodes = ','.join(self._process_graph()) + ckpt = tf.train.get_checkpoint_state(self.model_path) + freeze_graph.freeze_graph(input_graph=self.model_path + '/raw_graph_def.pb', + input_binary=True, + input_checkpoint=ckpt.model_checkpoint_path, + output_node_names=target_nodes, + output_graph=self.model_path + '/' + self.env_name + "_" + self.run_id + '.bytes', + clear_devices=True, initializer_nodes="", input_saver="", + restore_op_name="save/restore_all", filename_tensor_name="save/Const:0") + + def _initialize_trainers(self, trainer_config, sess): + trainer_parameters_dict = {} + self.trainers = {} + for brain_name in self.env.external_brain_names: + trainer_parameters = trainer_config['default'].copy() + if len(self.env.external_brain_names) > 1: + graph_scope = re.sub('[^0-9a-zA-Z]+', '-', brain_name) + trainer_parameters['graph_scope'] = graph_scope + trainer_parameters['summary_path'] = '{basedir}/{name}'.format( + basedir=self.summaries_dir, + name=str(self.run_id) + '_' + graph_scope) + else: + trainer_parameters['graph_scope'] = '' + trainer_parameters['summary_path'] = '{basedir}/{name}'.format( + basedir=self.summaries_dir, + name=str(self.run_id)) + if brain_name in trainer_config: + _brain_key = brain_name + while not isinstance(trainer_config[_brain_key], dict): + _brain_key = trainer_config[_brain_key] + for k in trainer_config[_brain_key]: + trainer_parameters[k] = trainer_config[_brain_key][k] + trainer_parameters_dict[brain_name] = trainer_parameters.copy() + for brain_name in self.env.external_brain_names: + if trainer_parameters_dict[brain_name]['trainer'] == "imitation": + self.trainers[brain_name] = BehavioralCloningTrainer(sess, self.env, brain_name, + trainer_parameters_dict[brain_name], + self.train_model, self.seed) + elif trainer_parameters_dict[brain_name]['trainer'] == "ppo": + self.trainers[brain_name] = PPOTrainer(sess, self.env, brain_name, trainer_parameters_dict[brain_name], + self.train_model, self.seed) + else: + raise UnityEnvironmentException("The trainer config contains an unknown trainer type for brain {}" + .format(brain_name)) + + def _load_config(self): + try: + with open(self.trainer_config_path) as data_file: + trainer_config = yaml.load(data_file) + return trainer_config + except IOError: + raise UnityEnvironmentException("""Parameter file could not be found here {}. + Will use default Hyper parameters""" + .format(self.trainer_config_path)) + except UnicodeDecodeError: + raise UnityEnvironmentException("There was an error decoding Trainer Config from this path : {}" + .format(self.trainer_config_path)) + + @staticmethod + def _create_model_path(model_path): + try: + if not os.path.exists(model_path): + os.makedirs(model_path) + except Exception: + raise UnityEnvironmentException("The folder {} containing the generated model could not be accessed." + " Please make sure the permissions are set correctly." + .format(model_path)) + + def start_learning(self): + self.env.curriculum.set_lesson_number(self.lesson) + trainer_config = self._load_config() + self._create_model_path(self.model_path) + + tf.reset_default_graph() + + with tf.Session() as sess: + self._initialize_trainers(trainer_config, sess) + for k, t in self.trainers.items(): + self.logger.info(t) + init = tf.global_variables_initializer() + saver = tf.train.Saver(max_to_keep=self.keep_checkpoints) + # Instantiate model parameters + if self.load_model: + self.logger.info('Loading Model...') + ckpt = tf.train.get_checkpoint_state(self.model_path) + if ckpt is None: + self.logger.info('The model {0} could not be found. Make sure you specified the right ' + '--run-id'.format(self.model_path)) + saver.restore(sess, ckpt.model_checkpoint_path) + else: + sess.run(init) + global_step = 0 # This is only for saving the model + self.env.curriculum.increment_lesson(self._get_progress()) + curr_info = self.env.reset(train_mode=self.fast_simulation) + if self.train_model: + for brain_name, trainer in self.trainers.items(): + trainer.write_tensorboard_text('Hyperparameters', trainer.parameters) + try: + while any([t.get_step <= t.get_max_steps for k, t in self.trainers.items()]) or not self.train_model: + if self.env.global_done: + self.env.curriculum.increment_lesson(self._get_progress()) + curr_info = self.env.reset(train_mode=self.fast_simulation) + for brain_name, trainer in self.trainers.items(): + trainer.end_episode() + # Decide and take an action + take_action_vector, take_action_memories, take_action_text, take_action_outputs = {}, {}, {}, {} + for brain_name, trainer in self.trainers.items(): + (take_action_vector[brain_name], + take_action_memories[brain_name], + take_action_text[brain_name], + take_action_outputs[brain_name]) = trainer.take_action(curr_info) + new_info = self.env.step(vector_action=take_action_vector, memory=take_action_memories, + text_action=take_action_text) + for brain_name, trainer in self.trainers.items(): + trainer.add_experiences(curr_info, new_info, take_action_outputs[brain_name]) + trainer.process_experiences(curr_info, new_info) + if trainer.is_ready_update() and self.train_model and trainer.get_step <= trainer.get_max_steps: + # Perform gradient descent with experience buffer + trainer.update_model() + # Write training statistics to Tensorboard. + trainer.write_summary(self.env.curriculum.lesson_number) + if self.train_model and trainer.get_step <= trainer.get_max_steps: + trainer.increment_step_and_update_last_reward() + if self.train_model: + global_step += 1 + if global_step % self.save_freq == 0 and global_step != 0 and self.train_model: + # Save Tensorflow model + self._save_model(sess, steps=global_step, saver=saver) + curr_info = new_info + # Final save Tensorflow model + if global_step != 0 and self.train_model: + self._save_model(sess, steps=global_step, saver=saver) + except KeyboardInterrupt: + print('--------------------------Now saving model-------------------------') + if self.train_model: + self.logger.info("Learning was interrupted. Please wait while the graph is generated.") + self._save_model(sess, steps=global_step, saver=saver) + pass + self.env.close() + if self.train_model: + self._export_graph() diff --git a/UnitySDK/Assets/ML-Agents.meta b/unity-environment/Assets/ML-Agents.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents.meta rename to unity-environment/Assets/ML-Agents.meta diff --git a/UnitySDK/Assets/ML-Agents/Editor.meta b/unity-environment/Assets/ML-Agents/Editor.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Editor.meta rename to unity-environment/Assets/ML-Agents/Editor.meta diff --git a/UnitySDK/Assets/ML-Agents/Editor/AgentEditor.cs b/unity-environment/Assets/ML-Agents/Editor/AgentEditor.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Editor/AgentEditor.cs rename to unity-environment/Assets/ML-Agents/Editor/AgentEditor.cs diff --git a/UnitySDK/Assets/ML-Agents/Editor/AgentEditor.cs.meta b/unity-environment/Assets/ML-Agents/Editor/AgentEditor.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Editor/AgentEditor.cs.meta rename to unity-environment/Assets/ML-Agents/Editor/AgentEditor.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Editor/BrainEditor.cs b/unity-environment/Assets/ML-Agents/Editor/BrainEditor.cs similarity index 52% rename from UnitySDK/Assets/ML-Agents/Editor/BrainEditor.cs rename to unity-environment/Assets/ML-Agents/Editor/BrainEditor.cs index eabe2a516e..f597a34383 100755 --- a/UnitySDK/Assets/ML-Agents/Editor/BrainEditor.cs +++ b/unity-environment/Assets/ML-Agents/Editor/BrainEditor.cs @@ -34,6 +34,11 @@ public override void OnInspectorGUI() MessageType.Error); } + BrainParameters parameters = myBrain.brainParameters; + if (parameters.vectorActionDescriptions == null || + parameters.vectorActionDescriptions.Length != parameters.vectorActionSize) + parameters.vectorActionDescriptions = new string[parameters.vectorActionSize]; + serializedBrain.Update(); @@ -45,6 +50,13 @@ public override void OnInspectorGUI() EditorGUILayout.LabelField("Vector Observation"); EditorGUI.indentLevel++; + SerializedProperty bpVectorObsType = + serializedBrain.FindProperty("brainParameters.vectorObservationSpaceType"); + EditorGUILayout.PropertyField(bpVectorObsType, new GUIContent("Space Type", + "Corresponds to whether state " + + "vector contains a single integer (Discrete) " + + "or a series of real-valued floats (Continuous).")); + SerializedProperty bpVectorObsSize = serializedBrain.FindProperty("brainParameters.vectorObservationSize"); EditorGUILayout.PropertyField(bpVectorObsSize, new GUIContent("Space Size", @@ -75,81 +87,29 @@ public override void OnInspectorGUI() "Corresponds to whether state" + " vector contains a single integer (Discrete) " + "or a series of real-valued floats (Continuous).")); - if (bpVectorActionType.enumValueIndex == 1) - { - //Continuous case : - SerializedProperty bpVectorActionSize = - serializedBrain.FindProperty("brainParameters.vectorActionSize"); - bpVectorActionSize.arraySize = 1; - SerializedProperty continuousActionSize = - bpVectorActionSize.GetArrayElementAtIndex(0); - EditorGUILayout.PropertyField(continuousActionSize, new GUIContent( - "Space Size", "Length of continuous action vector.")); - - } - else - { - // Discrete case : - SerializedProperty bpVectorActionSize = - serializedBrain.FindProperty("brainParameters.vectorActionSize"); - bpVectorActionSize.arraySize = EditorGUILayout.IntField( - "Branches Size", bpVectorActionSize.arraySize); - EditorGUI.indentLevel++; - for (int branchIndex = 0; - branchIndex < bpVectorActionSize.arraySize; - branchIndex++) - { - SerializedProperty branchActionSize = - bpVectorActionSize.GetArrayElementAtIndex(branchIndex); - EditorGUILayout.PropertyField(branchActionSize, new GUIContent( - "Branch " + branchIndex+" Size", - "Number of possible actions for the branch number " + branchIndex+".")); - } - EditorGUI.indentLevel--; - - } - - try - { - BrainParameters parameters = myBrain.brainParameters; - int numberOfDescriptions = 0; - if (parameters.vectorActionSpaceType == SpaceType.continuous) - numberOfDescriptions = parameters.vectorActionSize[0]; - else - numberOfDescriptions = parameters.vectorActionSize.Length; - if (parameters.vectorActionDescriptions == null || - parameters.vectorActionDescriptions.Length != numberOfDescriptions) - parameters.vectorActionDescriptions = new string[numberOfDescriptions]; - } - catch - { - - } - - if (bpVectorActionType.enumValueIndex == 1) - { - //Continuous case : - SerializedProperty bpVectorActionDescription = - serializedBrain.FindProperty("brainParameters.vectorActionDescriptions"); - EditorGUILayout.PropertyField(bpVectorActionDescription, new GUIContent( - "Action Descriptions", "A list of strings used to name" + - " the available actions for the Brain."), true); - } - else - { - // Discrete case : - SerializedProperty bpVectorActionDescription = - serializedBrain.FindProperty("brainParameters.vectorActionDescriptions"); - EditorGUILayout.PropertyField(bpVectorActionDescription, new GUIContent( - "Branch Descriptions", "A list of strings used to name" + - " the available branches for the Brain."), true); - } + + SerializedProperty bpVectorActionSize = + serializedBrain.FindProperty("brainParameters.vectorActionSize"); + EditorGUILayout.PropertyField(bpVectorActionSize, new GUIContent("Space Size", + "Length of action vector " + + "for brain (In Continuous state space)." + + "Or number of possible values (In Discrete action space).")); + + SerializedProperty bpVectorActionDescription = + serializedBrain.FindProperty("brainParameters.vectorActionDescriptions"); + EditorGUILayout.PropertyField(bpVectorActionDescription, new GUIContent( + "Action Descriptions", "A list of strings used to name" + + " the available actions for the Brain."), true); + } EditorGUI.indentLevel = indentLevel; SerializedProperty bt = serializedBrain.FindProperty("brainType"); EditorGUILayout.PropertyField(bt); + + + if (bt.enumValueIndex < 0) { bt.enumValueIndex = (int) BrainType.Player; diff --git a/UnitySDK/Assets/ML-Agents/Editor/BrainEditor.cs.meta b/unity-environment/Assets/ML-Agents/Editor/BrainEditor.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Editor/BrainEditor.cs.meta rename to unity-environment/Assets/ML-Agents/Editor/BrainEditor.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Editor/Tests/MLAgentsEditModeTest.cs b/unity-environment/Assets/ML-Agents/Editor/MLAgentsEditModeTest.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Editor/Tests/MLAgentsEditModeTest.cs rename to unity-environment/Assets/ML-Agents/Editor/MLAgentsEditModeTest.cs diff --git a/UnitySDK/Assets/ML-Agents/Editor/Tests/MLAgentsEditModeTest.cs.meta b/unity-environment/Assets/ML-Agents/Editor/MLAgentsEditModeTest.cs.meta similarity index 69% rename from UnitySDK/Assets/ML-Agents/Editor/Tests/MLAgentsEditModeTest.cs.meta rename to unity-environment/Assets/ML-Agents/Editor/MLAgentsEditModeTest.cs.meta index 2823ab05a5..ecfdf1df73 100644 --- a/UnitySDK/Assets/ML-Agents/Editor/Tests/MLAgentsEditModeTest.cs.meta +++ b/unity-environment/Assets/ML-Agents/Editor/MLAgentsEditModeTest.cs.meta @@ -1,7 +1,8 @@ fileFormatVersion: 2 -guid: 3170fcbfa5f4d4a8ca82c50c750e9083 +guid: 64f5b117b5f304a4281f16eb904311fd +timeCreated: 1518706577 +licenseType: Free MonoImporter: - externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 diff --git a/UnitySDK/Assets/ML-Agents/Editor/ResetParameterDrawer.cs b/unity-environment/Assets/ML-Agents/Editor/ResetParameterDrawer.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Editor/ResetParameterDrawer.cs rename to unity-environment/Assets/ML-Agents/Editor/ResetParameterDrawer.cs diff --git a/UnitySDK/Assets/ML-Agents/Editor/ResetParameterDrawer.cs.meta b/unity-environment/Assets/ML-Agents/Editor/ResetParameterDrawer.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Editor/ResetParameterDrawer.cs.meta rename to unity-environment/Assets/ML-Agents/Editor/ResetParameterDrawer.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples.meta b/unity-environment/Assets/ML-Agents/Examples.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples.meta rename to unity-environment/Assets/ML-Agents/Examples.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo1.mat b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo1.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo1.mat rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo1.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo1.mat.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo1.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo1.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo1.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo2.mat b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo2.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo2.mat rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo2.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo2.mat.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo2.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo2.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Materials/logo2.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Text.mat b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Text.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Text.mat rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Text.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Text.mat.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Text.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/Text.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/Text.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/logo.png b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/logo.png similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/logo.png rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/logo.png diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/logo.png.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/logo.png.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Materials/logo.png.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Materials/logo.png.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs/Game.prefab b/unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs/Game.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs/Game.prefab rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs/Game.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs/Game.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs/Game.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs/Game.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs/Game.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs/GameHard.prefab b/unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs/GameHard.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs/GameHard.prefab rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs/GameHard.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs/GameHard.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs/GameHard.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Prefabs/GameHard.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Prefabs/GameHard.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity index 31aa6a3aa9..eb34b71f00 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity +++ b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44824862, g: 0.49827534, b: 0.57558274, a: 1} + m_IndirectSpecularColor: {r: 0.4482636, g: 0.49828887, b: 0.5755903, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -228,18 +228,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ff026d63a00abdc48ad6ddcff89aba04, type: 2} m_IsPrefabParent: 0 ---- !u!114 &157026687 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 667765197} --- !u!1001 &159612743 Prefab: m_ObjectHideFlags: 0 @@ -300,6 +288,18 @@ GameObject: m_PrefabParentObject: {fileID: 1536511242562482, guid: ff026d63a00abdc48ad6ddcff89aba04, type: 2} m_PrefabInternal: {fileID: 119733639} +--- !u!114 &225807877 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 667765197} --- !u!1001 &292233615 Prefab: m_ObjectHideFlags: 0 @@ -550,7 +550,36 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &548284581 +--- !u!114 &667765197 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114938382745838118, guid: 00a1ebe742cf2394d8c21484e3a02412, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1456409882} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c676a8ddf5a5f4f64b35e9ed5028679d, type: 3} + m_Name: + m_EditorClassIdentifier: + brainParameters: + vectorObservationSize: 8 + numStackedVectorObservations: 1 + vectorActionSize: 2 + cameraResolutions: [] + vectorActionDescriptions: + - + - + vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 + brainType: 0 + CoreBrains: + - {fileID: 733527874} + - {fileID: 1611488545} + - {fileID: 225807877} + - {fileID: 1539590936} + instanceID: 29552 +--- !u!114 &733527874 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -559,10 +588,10 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - keyContinuousPlayerActions: + continuousPlayerActions: - key: 273 index: 1 value: 1 @@ -575,38 +604,9 @@ MonoBehaviour: - key: 276 index: 0 value: 1 - axisContinuousPlayerActions: [] discretePlayerActions: [] + defaultAction: 0 brain: {fileID: 667765197} ---- !u!114 &667765197 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 114938382745838118, guid: 00a1ebe742cf2394d8c21484e3a02412, - type: 2} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1456409882} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c676a8ddf5a5f4f64b35e9ed5028679d, type: 3} - m_Name: - m_EditorClassIdentifier: - brainParameters: - vectorObservationSize: 8 - numStackedVectorObservations: 1 - vectorActionSize: 02000000 - test: 010000000200000003000000 - cameraResolutions: [] - vectorActionDescriptions: - - - - - vectorActionSpaceType: 1 - brainType: 0 - CoreBrains: - - {fileID: 548284581} - - {fileID: 1806797620} - - {fileID: 157026687} - - {fileID: 1159453570} - instanceID: 98474 --- !u!1001 &764818074 Prefab: m_ObjectHideFlags: 0 @@ -717,29 +717,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ff026d63a00abdc48ad6ddcff89aba04, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1159453570 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 93f91f35982184949a09d9ce97965cd5, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 667765197} --- !u!1001 &1318922267 Prefab: m_ObjectHideFlags: 0 @@ -956,6 +933,29 @@ Transform: m_Father: {fileID: 1583402088} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1539590936 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 93f91f35982184949a09d9ce97965cd5, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 667765197} --- !u!1 &1583402087 GameObject: m_ObjectHideFlags: 0 @@ -1015,6 +1015,19 @@ MonoBehaviour: targetFrameRate: -1 resetParameters: resetParameters: [] +--- !u!114 &1611488545 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 667765197} --- !u!1 &1746325439 GameObject: m_ObjectHideFlags: 0 @@ -1132,19 +1145,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ff026d63a00abdc48ad6ddcff89aba04, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1806797620 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 667765197} --- !u!1001 &1825513289 Prefab: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity index 369d9245c3..bb1b54b4ac 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity +++ b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.45096254, g: 0.5008292, b: 0.5744089, a: 1} + m_IndirectSpecularColor: {r: 0.4509806, g: 0.5008471, b: 0.57441616, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -113,19 +113,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!114 &96662597 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 667765197} --- !u!1001 &98684496 Prefab: m_ObjectHideFlags: 0 @@ -177,6 +164,18 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 50eec9166a3e043dd8102d117835dee6, type: 2} m_IsPrefabParent: 0 +--- !u!114 &144449023 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 667765197} --- !u!1 &544547867 GameObject: m_ObjectHideFlags: 0 @@ -262,6 +261,35 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &592182705 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 276 + index: 0 + value: 1 + - key: 275 + index: 0 + value: -1 + - key: 273 + index: 1 + value: 1 + - key: 274 + index: 1 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: [] + defaultAction: -1 + brain: {fileID: 667765197} --- !u!1001 &653232701 Prefab: m_ObjectHideFlags: 0 @@ -313,18 +341,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 50eec9166a3e043dd8102d117835dee6, type: 2} m_IsPrefabParent: 0 ---- !u!114 &659951087 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 667765197} --- !u!114 &667765197 MonoBehaviour: m_ObjectHideFlags: 0 @@ -340,20 +356,43 @@ MonoBehaviour: brainParameters: vectorObservationSize: 5 numStackedVectorObservations: 5 - vectorActionSize: 02000000 - test: 010000000200000003000000 + vectorActionSize: 2 cameraResolutions: [] vectorActionDescriptions: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1625398132} - - {fileID: 96662597} - - {fileID: 659951087} - - {fileID: 1925628860} - instanceID: 98652 + - {fileID: 592182705} + - {fileID: 2061584741} + - {fileID: 144449023} + - {fileID: 762474648} + instanceID: 12960 +--- !u!114 &762474648 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 477e2fb07d79544e48897e8ba162a74f, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 667765197} --- !u!1001 &794378715 Prefab: m_ObjectHideFlags: 0 @@ -900,34 +939,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 50eec9166a3e043dd8102d117835dee6, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1625398132 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 276 - index: 0 - value: 1 - - key: 275 - index: 0 - value: -1 - - key: 273 - index: 1 - value: 1 - - key: 274 - index: 1 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: [] - brain: {fileID: 667765197} --- !u!1 &1746325439 GameObject: m_ObjectHideFlags: 0 @@ -1041,29 +1052,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 50eec9166a3e043dd8102d117835dee6, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1925628860 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 477e2fb07d79544e48897e8ba162a74f, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 667765197} --- !u!1001 &1975354163 Prefab: m_ObjectHideFlags: 0 @@ -1115,6 +1103,19 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 50eec9166a3e043dd8102d117835dee6, type: 2} m_IsPrefabParent: 0 +--- !u!114 &2061584741 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 667765197} --- !u!1 &2063801192 GameObject: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DDecision.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes b/unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes rename to unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes b/unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes rename to unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes diff --git a/UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/agent.mat b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/agent.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/agent.mat rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/agent.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/agent.mat.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/agent.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/agent.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/agent.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/bad.mat b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/bad.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/bad.mat rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/bad.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/bad.mat.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/bad.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/bad.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/bad.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/badColor.mat b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/badColor.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/badColor.mat rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/badColor.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/badColor.mat.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/badColor.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/badColor.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/badColor.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/lazer.mat b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/lazer.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/lazer.mat rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/lazer.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/lazer.mat.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/lazer.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/lazer.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/lazer.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/red.mat b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/red.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/red.mat rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/red.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/red.mat.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/red.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/red.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/red.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatch.mat b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatch.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatch.mat rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatch.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatch.mat.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatch.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatch.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatch.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatchMaster.psd b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatchMaster.psd similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatchMaster.psd rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatchMaster.psd diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatchMaster.psd.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatchMaster.psd.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatchMaster.psd.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/swatchMaster.psd.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/white.mat b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/white.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/white.mat rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/white.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/white.mat.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/white.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Materials/white.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Materials/white.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Models.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Models.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Models.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Models.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Models/banana.fbx b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Models/banana.fbx similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Models/banana.fbx rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Models/banana.fbx diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Models/banana.fbx.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Models/banana.fbx.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Models/banana.fbx.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Models/banana.fbx.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/BadBanana.prefab b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/BadBanana.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/BadBanana.prefab rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/BadBanana.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/BadBanana.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/BadBanana.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/BadBanana.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/BadBanana.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/Banana.prefab b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/Banana.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/Banana.prefab rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/Banana.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/Banana.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/Banana.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/Banana.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/Banana.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab index 612044bf18..8a2549fda3 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab +++ b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab @@ -829,7 +829,7 @@ GameObject: m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967294 + m_StaticEditorFlags: 4294967295 m_IsActive: 1 --- !u!1 &1573257363500854 GameObject: @@ -2038,7 +2038,7 @@ Transform: m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1819751139121548} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -75, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 4573776289891160} @@ -5810,10 +5810,10 @@ MonoBehaviour: brain: {fileID: 0} agentParameters: agentCameras: [] - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1819751139121548} turnSpeed: 300 @@ -5889,10 +5889,10 @@ MonoBehaviour: brain: {fileID: 0} agentParameters: agentCameras: [] - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1819751139121548} turnSpeed: 300 @@ -5918,10 +5918,10 @@ MonoBehaviour: brain: {fileID: 0} agentParameters: agentCameras: [] - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1819751139121548} turnSpeed: 300 @@ -5947,10 +5947,10 @@ MonoBehaviour: brain: {fileID: 0} agentParameters: agentCameras: [] - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1819751139121548} turnSpeed: 300 @@ -5976,10 +5976,10 @@ MonoBehaviour: brain: {fileID: 0} agentParameters: agentCameras: [] - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1819751139121548} turnSpeed: 300 diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/RLArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab index 6ebdc4b736..88a10c0787 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab +++ b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab @@ -962,7 +962,7 @@ GameObject: m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967294 + m_StaticEditorFlags: 4294967295 m_IsActive: 1 --- !u!1 &1717079971716124 GameObject: @@ -5744,7 +5744,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1152175531072396} contribute: 0 - useVectorObs: 1 + useVectorObs: 0 --- !u!114 &114038595653051694 MonoBehaviour: m_ObjectHideFlags: 1 @@ -5790,7 +5790,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1210120910569848} contribute: 1 - useVectorObs: 1 + useVectorObs: 0 --- !u!114 &114142328162608466 MonoBehaviour: m_ObjectHideFlags: 1 @@ -5819,7 +5819,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1653636945240924} contribute: 1 - useVectorObs: 1 + useVectorObs: 0 --- !u!114 &114217618254455056 MonoBehaviour: m_ObjectHideFlags: 1 @@ -5894,7 +5894,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1157471804445718} contribute: 1 - useVectorObs: 1 + useVectorObs: 0 --- !u!114 &114983848801657944 MonoBehaviour: m_ObjectHideFlags: 1 @@ -5934,7 +5934,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1170637324644966} contribute: 1 - useVectorObs: 1 + useVectorObs: 0 --- !u!136 &136272331299970796 CapsuleCollider: m_ObjectHideFlags: 1 diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/TeachingArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab index 0b7ef494df..74b894d0d4 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab +++ b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab @@ -848,7 +848,7 @@ GameObject: m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967294 + m_StaticEditorFlags: 4294967295 m_IsActive: 1 --- !u!1 &1901019347833374 GameObject: @@ -4434,10 +4434,10 @@ MonoBehaviour: agentParameters: agentCameras: - {fileID: 20214279307138674} - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1575621625717122} turnSpeed: 300 @@ -4448,7 +4448,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1655886918472060} contribute: 0 - useVectorObs: 0 + useVisual: 1 --- !u!114 &114661537450162482 MonoBehaviour: m_ObjectHideFlags: 1 @@ -4464,10 +4464,10 @@ MonoBehaviour: agentParameters: agentCameras: - {fileID: 20216502261607616} - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1575621625717122} turnSpeed: 300 @@ -4478,7 +4478,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1995320573564588} contribute: 0 - useVectorObs: 0 + useVisual: 1 --- !u!114 &114813974235827884 MonoBehaviour: m_ObjectHideFlags: 1 @@ -4494,10 +4494,10 @@ MonoBehaviour: agentParameters: agentCameras: - {fileID: 20704335789641980} - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1575621625717122} turnSpeed: 300 @@ -4508,7 +4508,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1929077749028892} contribute: 0 - useVectorObs: 0 + useVisual: 1 --- !u!114 &114863868205103286 MonoBehaviour: m_ObjectHideFlags: 1 @@ -4524,10 +4524,10 @@ MonoBehaviour: agentParameters: agentCameras: - {fileID: 20130538700979288} - maxStep: 5000 + maxStep: 0 resetOnDone: 1 onDemandDecision: 0 - numberOfActionsBetweenDecisions: 5 + numberOfActionsBetweenDecisions: 4 myAcademyObj: {fileID: 0} area: {fileID: 1575621625717122} turnSpeed: 300 @@ -4538,7 +4538,7 @@ MonoBehaviour: frozenMaterial: {fileID: 2100000, guid: 866f7a84824d141dbbe50dd1893207d9, type: 2} myLaser: {fileID: 1708530989208544} contribute: 0 - useVectorObs: 0 + useVisual: 1 --- !u!114 &114928211057886896 MonoBehaviour: m_ObjectHideFlags: 1 diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Prefabs/VisualRLArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity similarity index 86% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity index 3301c8b7c3..7037f6271e 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity +++ b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity @@ -26,7 +26,7 @@ RenderSettings: m_AmbientIntensity: 1 m_AmbientMode: 3 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_SkyboxMaterial: {fileID: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.4482636, g: 0.49828887, b: 0.5755903, a: 1} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -58,21 +58,20 @@ LightmapSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 - m_AtlasSize: 128 - m_AO: 0 + m_AtlasSize: 1024 + m_AO: 1 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 - m_LightmapParameters: {fileID: 15201, guid: 0000000000000000f000000000000000, - type: 0} + m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 - m_MixedBakeMode: 1 + m_MixedBakeMode: 2 m_BakeBackend: 0 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 @@ -92,7 +91,7 @@ LightmapSettings: m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 112000002, guid: 03723c7f910c3423aa1974f1b9ce8392, type: 2} - m_UseShadowmask: 0 + m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -158,34 +157,21 @@ MonoBehaviour: brainParameters: vectorObservationSize: 53 numStackedVectorObservations: 3 - vectorActionSize: 03000000030000000300000002000000 + vectorActionSize: 3 cameraResolutions: [] vectorActionDescriptions: - - - - - - vectorActionSpaceType: 0 - brainType: 2 + vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 + brainType: 3 CoreBrains: - - {fileID: 1885400555} - - {fileID: 176304109} - - {fileID: 1779487393} - - {fileID: 519006512} - instanceID: 16114 ---- !u!114 &176304109 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 7561199} + - {fileID: 1874908734} + - {fileID: 1023297396} + - {fileID: 1175964616} + - {fileID: 760280300} + instanceID: 12904 --- !u!1 &273651478 GameObject: m_ObjectHideFlags: 0 @@ -260,6 +246,98 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 273651478} +--- !u!1001 &347716708 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 7561199} + - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 7561199} + - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 7561199} + - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 7561199} + - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 7561199} + - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + m_IsPrefabParent: 0 --- !u!1 &378228137 GameObject: m_ObjectHideFlags: 0 @@ -417,7 +495,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &519006512 +--- !u!114 &760280300 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -426,10 +504,10 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - graphModel: {fileID: 4900000, guid: 88f1d4da9ad644b2490a103d19616b4e, type: 3} + graphModel: {fileID: 4900000, guid: 27226823b49da46f590443cfe72207bd, type: 3} graphScope: graphPlaceholders: [] BatchSizePlaceholderName: batch_size @@ -505,146 +583,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 45, y: -45, z: 0} ---- !u!1 &1009000883 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1009000884} - - component: {fileID: 1009000887} - m_Layer: 0 - m_Name: OverviewCamera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1009000884 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1009000883} - m_LocalRotation: {x: 0.2588191, y: 0, z: 0, w: 0.9659258} - m_LocalPosition: {x: 0, y: 75, z: -140} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 30, y: 0, z: 0} ---- !u!20 &1009000887 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1009000883} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 2 - m_BackGroundColor: {r: 0.39609292, g: 0.49962592, b: 0.6509434, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 30 - orthographic: 0 - orthographic size: 35.13 - m_Depth: 2 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 1 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!1 &1086444495 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1086444498} - - component: {fileID: 1086444497} - - component: {fileID: 1086444496} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1086444496 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1086444495} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: New Text ---- !u!222 &1086444497 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1086444495} ---- !u!224 &1086444498 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1086444495} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 378228141} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -1000, y: -239.57645} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1001 &1139136113 +--- !u!1001 &886044223 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -657,7 +596,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_LocalPosition.y - value: 0 + value: -19.9 objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_LocalPosition.z @@ -681,28 +620,38 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_RootOrder - value: 5 + value: 6 objectReference: {fileID: 0} - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, + - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: brain + propertyPath: myAcademyObj value: - objectReference: {fileID: 7561199} + objectReference: {fileID: 1574236047} - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, + - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} + - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain @@ -710,58 +659,29 @@ Prefab: objectReference: {fileID: 7561199} - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: agentParameters.maxStep - value: 5000 + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 0} + propertyPath: brain + value: + objectReference: {fileID: 7561199} + - target: {fileID: 0} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 1819751139121548, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_Name + value: RLArea (1) objectReference: {fileID: 0} - - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 + - target: {fileID: 1819751139121548, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_IsActive + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} m_IsPrefabParent: 0 ---- !u!1001 &1237871472 +--- !u!1001 &889240182 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -774,7 +694,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_LocalPosition.y - value: -50 + value: -39.6 objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_LocalPosition.z @@ -798,90 +718,231 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_RootOrder - value: 7 + value: 8 objectReference: {fileID: 0} - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, + - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: brain + propertyPath: myAcademyObj value: - objectReference: {fileID: 7561199} + objectReference: {fileID: 1574236047} - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, + - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: brain + propertyPath: myAcademyObj value: - objectReference: {fileID: 7561199} - - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, + objectReference: {fileID: 1574236047} + - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} + propertyPath: brain + value: + objectReference: {fileID: 7561199} - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 0} + propertyPath: brain + value: + objectReference: {fileID: 7561199} + - target: {fileID: 0} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} - target: {fileID: 1819751139121548, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_Name - value: RLArea (2) + value: RLArea (3) + objectReference: {fileID: 0} + - target: {fileID: 1819751139121548, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_IsActive + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} m_IsPrefabParent: 0 +--- !u!1 &1009000883 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1009000884} + - component: {fileID: 1009000887} + m_Layer: 0 + m_Name: OverviewCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1009000884 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1009000883} + m_LocalRotation: {x: 0.2588191, y: 0, z: 0, w: 0.9659258} + m_LocalPosition: {x: 0, y: 75, z: -140} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 30, y: 0, z: 0} +--- !u!20 &1009000887 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1009000883} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.39609292, g: 0.49962592, b: 0.6509434, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 30 + orthographic: 0 + orthographic size: 35.13 + m_Depth: 2 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 1 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!114 &1023297396 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 7561199} +--- !u!1 &1086444495 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1086444498} + - component: {fileID: 1086444497} + - component: {fileID: 1086444496} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1086444496 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1086444495} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &1086444497 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1086444495} +--- !u!224 &1086444498 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1086444495} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 378228141} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1000, y: -239.57645} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1175964616 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 7561199} --- !u!1 &1574236047 GameObject: m_ObjectHideFlags: 0 @@ -942,18 +1003,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1779487393 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 7561199} --- !u!1 &1799584680 GameObject: m_ObjectHideFlags: 0 @@ -1023,7 +1072,7 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1799584680} ---- !u!114 &1885400555 +--- !u!114 &1874908734 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1032,7 +1081,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 keyContinuousPlayerActions: @@ -1054,28 +1103,16 @@ MonoBehaviour: axisContinuousPlayerActions: [] discretePlayerActions: - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 113 - branchIndex: 1 value: 1 - - key: 101 - branchIndex: 1 + - key: 32 value: 2 - key: 97 - branchIndex: 2 - value: 1 + value: 3 - key: 100 - branchIndex: 2 - value: 2 - - key: 32 - branchIndex: 3 - value: 1 + value: 4 + defaultAction: 0 brain: {fileID: 7561199} ---- !u!1001 &1914556066 +--- !u!1001 &2025833435 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -1088,7 +1125,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_LocalPosition.y - value: -75 + value: -59.5 objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_LocalPosition.z @@ -1112,157 +1149,63 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_RootOrder - value: 8 + value: 7 objectReference: {fileID: 0} - - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, + - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, + - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: brain + propertyPath: myAcademyObj value: - objectReference: {fileID: 7561199} + objectReference: {fileID: 1574236047} - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: brain - value: - objectReference: {fileID: 7561199} - - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: brain - value: - objectReference: {fileID: 7561199} - - target: {fileID: 1819751139121548, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_Name - value: RLArea (3) - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - m_IsPrefabParent: 0 ---- !u!1001 &1939641706 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_LocalPosition.y - value: -25 - objectReference: {fileID: 0} - - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4688212428263696, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: m_RootOrder - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, + - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: brain + propertyPath: myAcademyObj value: - objectReference: {fileID: 7561199} + objectReference: {fileID: 1574236047} - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, + - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} - propertyPath: brain + propertyPath: myAcademyObj value: - objectReference: {fileID: 7561199} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, + objectReference: {fileID: 1574236047} + - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: brain value: objectReference: {fileID: 7561199} - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 0} propertyPath: brain value: objectReference: {fileID: 7561199} - - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.maxStep - value: 5000 - objectReference: {fileID: 0} - - target: {fileID: 114875485509234200, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114816434626527468, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114846764322938622, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114508049814297234, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 114245753946332258, guid: 38400a68c4ea54b52998e34ee238d1a7, - type: 2} - propertyPath: agentParameters.numberOfActionsBetweenDecisions - value: 5 - objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} - target: {fileID: 1819751139121548, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} propertyPath: m_Name - value: RLArea (1) + value: RLArea (2) + objectReference: {fileID: 0} + - target: {fileID: 1819751139121548, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} + propertyPath: m_IsActive + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 38400a68c4ea54b52998e34ee238d1a7, type: 2} diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/Banana.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity similarity index 95% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity index f5b083ab78..bc32661a0b 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity +++ b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity @@ -157,21 +157,21 @@ MonoBehaviour: brainParameters: vectorObservationSize: 53 numStackedVectorObservations: 3 - vectorActionSize: 03000000030000000200000002000000 + vectorActionSize: 3 cameraResolutions: [] vectorActionDescriptions: - - - - - - vectorActionSpaceType: 0 + vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 766474356} - - {fileID: 951358151} - - {fileID: 887333755} - - {fileID: 1010702445} - instanceID: 17114 + - {fileID: 964200322} + - {fileID: 963319857} + - {fileID: 844996251} + - {fileID: 1926202686} + instanceID: 106598 --- !u!1 &192430538 GameObject: m_ObjectHideFlags: 0 @@ -414,6 +414,29 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} +--- !u!114 &481005355 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 27226823b49da46f590443cfe72207bd, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 2015024680} --- !u!1 &499540684 GameObject: m_ObjectHideFlags: 0 @@ -476,6 +499,123 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &635027128 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 114879445014876350, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 2015024680} + - target: {fileID: 114879445014876350, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114142328162608466, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 2015024680} + - target: {fileID: 114142328162608466, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114990713253136410, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 2015024680} + - target: {fileID: 114990713253136410, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114033573546398302, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 7561199} + - target: {fileID: 114033573546398302, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114085328779651546, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: brain + value: + objectReference: {fileID: 2015024680} + - target: {fileID: 114085328779651546, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: myAcademyObj + value: + objectReference: {fileID: 1574236047} + - target: {fileID: 114033573546398302, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: useVectorObs + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114085328779651546, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: useVectorObs + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114879445014876350, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: useVectorObs + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114990713253136410, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: useVectorObs + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114142328162608466, guid: 40ff8390cb10a47b69a26f13051c0077, + type: 2} + propertyPath: useVectorObs + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} + m_IsPrefabParent: 0 --- !u!1 &762086410 GameObject: m_ObjectHideFlags: 0 @@ -541,7 +681,31 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0} ---- !u!114 &766474356 +--- !u!114 &844996251 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 7561199} +--- !u!114 &894946636 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 2015024680} +--- !u!114 &923796454 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -550,7 +714,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 keyContinuousPlayerActions: @@ -572,145 +736,16 @@ MonoBehaviour: axisContinuousPlayerActions: [] discretePlayerActions: - key: 119 - branchIndex: 0 value: 1 - key: 32 - branchIndex: 3 - value: 1 - - key: 97 - branchIndex: 2 - value: 1 - - key: 115 - branchIndex: 0 value: 2 + - key: 97 + value: 3 - key: 100 - branchIndex: 2 - value: 2 - - key: 113 - branchIndex: 1 - value: 2 - - key: 101 - branchIndex: 1 - value: 1 - brain: {fileID: 7561199} ---- !u!1001 &781008698 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4603070702628152, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - propertyPath: m_RootOrder - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 114033573546398302, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: brain - value: - objectReference: {fileID: 7561199} - - target: {fileID: 114033573546398302, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: myAcademyObj - value: - objectReference: {fileID: 1574236047} - - target: {fileID: 114085328779651546, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: brain - value: - objectReference: {fileID: 2015024680} - - target: {fileID: 114085328779651546, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: myAcademyObj - value: - objectReference: {fileID: 1574236047} - - target: {fileID: 114879445014876350, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: brain - value: - objectReference: {fileID: 2015024680} - - target: {fileID: 114879445014876350, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: myAcademyObj - value: - objectReference: {fileID: 1574236047} - - target: {fileID: 114142328162608466, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: brain - value: - objectReference: {fileID: 2015024680} - - target: {fileID: 114142328162608466, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: myAcademyObj - value: - objectReference: {fileID: 1574236047} - - target: {fileID: 114990713253136410, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: brain - value: - objectReference: {fileID: 2015024680} - - target: {fileID: 114990713253136410, guid: 40ff8390cb10a47b69a26f13051c0077, - type: 2} - propertyPath: myAcademyObj - value: - objectReference: {fileID: 1574236047} - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: 40ff8390cb10a47b69a26f13051c0077, type: 2} - m_IsPrefabParent: 0 ---- !u!114 &865391430 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 7561199} ---- !u!114 &887333755 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 7561199} ---- !u!114 &951358151 + value: 4 + defaultAction: 0 + brain: {fileID: 2015024680} +--- !u!114 &963319857 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -719,11 +754,11 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 brain: {fileID: 7561199} ---- !u!114 &1010702445 +--- !u!114 &964200322 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -731,20 +766,37 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - graphModel: {fileID: 4900000, guid: 88f1d4da9ad644b2490a103d19616b4e, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action + keyContinuousPlayerActions: + - key: 119 + index: 0 + value: 1 + - key: 97 + index: 1 + value: -1 + - key: 100 + index: 1 + value: 1 + - key: 32 + index: 2 + value: 1 + - key: 115 + index: 0 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 119 + value: 1 + - key: 32 + value: 2 + - key: 97 + value: 3 + - key: 100 + value: 4 + defaultAction: 0 brain: {fileID: 7561199} --- !u!1 &1196437247 GameObject: @@ -820,7 +872,7 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1196437247} ---- !u!114 &1494890984 +--- !u!114 &1569436421 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -828,21 +880,11 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - graphModel: {fileID: 4900000, guid: 88f1d4da9ad644b2490a103d19616b4e, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 2015024680} + brain: {fileID: 7561199} --- !u!1 &1570348456 GameObject: m_ObjectHideFlags: 0 @@ -977,70 +1019,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1629417692 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 119 - index: 0 - value: 1 - - key: 97 - index: 1 - value: -1 - - key: 100 - index: 1 - value: 1 - - key: 32 - index: 2 - value: 1 - - key: 115 - index: 0 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 119 - branchIndex: 0 - value: 1 - - key: 32 - branchIndex: 3 - value: 1 - - key: 97 - branchIndex: 2 - value: 1 - - key: 100 - branchIndex: 2 - value: 2 - - key: 115 - branchIndex: 0 - value: 2 - - key: 113 - branchIndex: 1 - value: 2 - - key: 101 - branchIndex: 1 - value: 1 - brain: {fileID: 2015024680} ---- !u!114 &1681726684 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 2015024680} --- !u!1 &1799584680 GameObject: m_ObjectHideFlags: 0 @@ -1110,6 +1088,29 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1799584680} +--- !u!114 &1926202686 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 27226823b49da46f590443cfe72207bd, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 7561199} --- !u!1 &2015024677 GameObject: m_ObjectHideFlags: 0 @@ -1153,18 +1154,18 @@ MonoBehaviour: brainParameters: vectorObservationSize: 53 numStackedVectorObservations: 3 - vectorActionSize: 03000000030000000200000002000000 + vectorActionSize: 3 cameraResolutions: [] vectorActionDescriptions: - - - - - - vectorActionSpaceType: 0 + vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 2 CoreBrains: - - {fileID: 1629417692} - - {fileID: 865391430} - - {fileID: 1681726684} - - {fileID: 1494890984} - instanceID: 17834 + - {fileID: 923796454} + - {fileID: 1569436421} + - {fileID: 894946636} + - {fileID: 481005355} + instanceID: 106692 diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/BananaIL.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity index ec0e82cd9a..985ada1e1d 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity +++ b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity @@ -157,7 +157,7 @@ MonoBehaviour: brainParameters: vectorObservationSize: 0 numStackedVectorObservations: 1 - vectorActionSize: 03000000030000000300000002000000 + vectorActionSize: 4 cameraResolutions: - width: 84 height: 84 @@ -168,13 +168,54 @@ MonoBehaviour: - - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1628146832} - - {fileID: 1464461321} - - {fileID: 1887232565} - - {fileID: 1491670606} - instanceID: 24554 + - {fileID: 32186147} + - {fileID: 1356435211} + - {fileID: 405692841} + - {fileID: 1695285567} + instanceID: 15840 +--- !u!114 &32186147 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 119 + index: 0 + value: 1 + - key: 97 + index: 1 + value: -3 + - key: 100 + index: 1 + value: 1 + - key: 32 + index: 2 + value: 1 + - key: 115 + index: 0 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 119 + value: 1 + - key: 32 + value: 2 + - key: 97 + value: 3 + - key: 100 + value: 4 + defaultAction: 0 + brain: {fileID: 7561199} --- !u!1 &273651478 GameObject: m_ObjectHideFlags: 0 @@ -344,6 +385,18 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} +--- !u!114 &405692841 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 7561199} --- !u!1 &762086410 GameObject: m_ObjectHideFlags: 0 @@ -630,6 +683,19 @@ RectTransform: m_AnchoredPosition: {x: -1000, y: -239.57645} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1356435211 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 7561199} --- !u!1001 &1429151548 Prefab: m_ObjectHideFlags: 0 @@ -716,43 +782,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 79d09bf6cbfa64f55a572755f594652f, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1464461321 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 7561199} ---- !u!114 &1491670606 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 0} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: - - visual_observation_0 - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 7561199} --- !u!1 &1574236047 GameObject: m_ObjectHideFlags: 0 @@ -813,7 +842,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1628146832 +--- !u!114 &1695285567 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -821,49 +850,21 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - keyContinuousPlayerActions: - - key: 119 - index: 0 - value: 1 - - key: 97 - index: 1 - value: -3 - - key: 100 - index: 1 - value: 1 - - key: 32 - index: 2 - value: 1 - - key: 115 - index: 0 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 119 - branchIndex: 0 - value: 1 - - key: 32 - branchIndex: 0 - value: 2 - - key: 97 - branchIndex: 2 - value: 1 - - key: 100 - branchIndex: 2 - value: 2 - - key: 113 - branchIndex: 1 - value: 1 - - key: 101 - branchIndex: 1 - value: 2 - - key: 32 - branchIndex: 3 - value: 1 + graphModel: {fileID: 0} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: + - visual_observation_0 + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action brain: {fileID: 7561199} --- !u!1 &1799584680 GameObject: @@ -934,15 +935,3 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1799584680} ---- !u!114 &1887232565 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 7561199} diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scenes/VisualBanana.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs similarity index 88% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs index 648f25c612..3bbaabbd67 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs +++ b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs @@ -100,44 +100,19 @@ public void MoveAgent(float[] act) } else { - var forwardAxis = (int)act[0]; - var rightAxis = (int)act[1]; - var rotateAxis = (int)act[2]; - var shootAxis = (int)act[3]; - - switch (forwardAxis) + switch ((int)act[0]) { case 1: dirToGo = transform.forward; break; case 2: - dirToGo = -transform.forward; - break; - } - - switch (rightAxis) - { - case 1: - dirToGo = transform.right; - break; - case 2: - dirToGo = -transform.right; + shootCommand = true; break; - } - - switch (rotateAxis) - { - case 1: + case 3: rotateDir = -transform.up; break; - case 2: + case 4: rotateDir = transform.up; - break; - } - switch (shootAxis) - { - case 1: - shootCommand = true; break; } } diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaArea.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/Scripts/BananaLogic.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes new file mode 100644 index 0000000000..371b6c55e4 Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes.meta similarity index 75% rename from UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes.meta index 0ed87ae850..ccb86df127 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes.meta +++ b/unity-environment/Assets/ML-Agents/Examples/BananaCollectors/TFModels/Banana.bytes.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 88f1d4da9ad644b2490a103d19616b4e +guid: 27226823b49da46f590443cfe72207bd TextScriptImporter: externalObjects: {} userData: diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic.meta b/unity-environment/Assets/ML-Agents/Examples/Basic.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Basic/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity b/unity-environment/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity similarity index 96% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity index d44203326a..718e984d0c 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity @@ -88,7 +88,6 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 @@ -126,7 +125,7 @@ GameObject: - component: {fileID: 282272645} - component: {fileID: 282272649} m_Layer: 0 - m_Name: BasicAgent + m_Name: Agent m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -217,53 +216,13 @@ MonoBehaviour: onDemandDecision: 1 numberOfActionsBetweenDecisions: 1 timeBetweenDecisionsAtInference: 0.15 + position: 0 + smallGoalPosition: -3 + largeGoalPosition: 7 largeGoal: {fileID: 984725368} smallGoal: {fileID: 1178588871} ---- !u!114 &347573594 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 1 - - key: 100 - branchIndex: 0 - value: 2 - brain: {fileID: 846768605} ---- !u!114 &531162329 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 781e74f5e76a543ec90032529776c2d1, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 846768605} + minPosition: -10 + maxPosition: 10 --- !u!1 &762086410 GameObject: m_ObjectHideFlags: 0 @@ -372,18 +331,43 @@ MonoBehaviour: brainParameters: vectorObservationSize: 20 numStackedVectorObservations: 1 - vectorActionSize: 03000000 + vectorActionSize: 2 cameraResolutions: [] vectorActionDescriptions: - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 0 brainType: 0 CoreBrains: - - {fileID: 347573594} - - {fileID: 1529956007} - - {fileID: 1784272405} - - {fileID: 531162329} - instanceID: 74032 + - {fileID: 1458832067} + - {fileID: 1183791066} + - {fileID: 1066285776} + - {fileID: 977008778} + instanceID: 21298 +--- !u!114 &977008778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 8786b6500d406497c959f24c2a8b59ac, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 846768605} --- !u!1 &984725368 GameObject: m_ObjectHideFlags: 0 @@ -396,7 +380,7 @@ GameObject: - component: {fileID: 984725370} - component: {fileID: 984725369} m_Layer: 0 - m_Name: LargeGoal + m_Name: largeGoal m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -468,6 +452,18 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1066285776 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 846768605} --- !u!1 &1178588871 GameObject: m_ObjectHideFlags: 0 @@ -480,7 +476,7 @@ GameObject: - component: {fileID: 1178588873} - component: {fileID: 1178588872} m_Layer: 0 - m_Name: SmallGoal + m_Name: smallGoal m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -552,7 +548,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1529956007 +--- !u!114 &1183791066 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -561,9 +557,29 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 + brain: {fileID: 0} +--- !u!114 &1458832067 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: [] + discretePlayerActions: + - key: 97 + value: 0 + - key: 100 + value: 1 + defaultAction: -1 brain: {fileID: 846768605} --- !u!1 &1574236047 GameObject: @@ -710,15 +726,3 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1784272405 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 846768605} diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Basic/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs similarity index 82% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs index 5af80732e0..42d5409d71 100755 --- a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs +++ b/unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs @@ -9,13 +9,13 @@ public class BasicAgent : Agent private BasicAcademy academy; public float timeBetweenDecisionsAtInference; private float timeSinceDecision; - int position; - int smallGoalPosition; - int largeGoalPosition; + public int position; + public int smallGoalPosition; + public int largeGoalPosition; public GameObject largeGoal; public GameObject smallGoal; - int minPosition; - int maxPosition; + public int minPosition; + public int maxPosition; public override void InitializeAgent() { @@ -24,7 +24,7 @@ public override void InitializeAgent() public override void CollectObservations() { - AddVectorObs(position, 20); + AddVectorObs(position); } public override void AgentAction(float[] vectorAction, string textAction) @@ -35,10 +35,10 @@ public override void AgentAction(float[] vectorAction, string textAction) switch (movement) { - case 1: + case 0: direction = -1; break; - case 2: + case 1: direction = 1; break; } @@ -47,7 +47,7 @@ public override void AgentAction(float[] vectorAction, string textAction) if (position < minPosition) { position = minPosition; } if (position > maxPosition) { position = maxPosition; } - gameObject.transform.position = new Vector3(position - 10f, 0f, 0f); + gameObject.transform.position = new Vector3(position, 0f, 0f); AddReward(-0.01f); @@ -66,13 +66,13 @@ public override void AgentAction(float[] vectorAction, string textAction) public override void AgentReset() { - position = 10; - minPosition = 0; - maxPosition = 20; - smallGoalPosition = 7; - largeGoalPosition = 17; - smallGoal.transform.position = new Vector3(smallGoalPosition - 10f, 0f, 0f); - largeGoal.transform.position = new Vector3(largeGoalPosition - 10f, 0f, 0f); + position = 0; + minPosition = -10; + maxPosition = 10; + smallGoalPosition = -3; + largeGoalPosition = 7; + smallGoal.transform.position = new Vector3(smallGoalPosition, 0f, 0f); + largeGoal.transform.position = new Vector3(largeGoalPosition, 0f, 0f); } public override void AgentOnDone() diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs b/unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Basic/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic/TFModels.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes b/unity-environment/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes new file mode 100644 index 0000000000..bc729a18c1 Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes.meta similarity index 59% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes.meta index 680b8b1590..3ad722a6cd 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.bytes.meta +++ b/unity-environment/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes.meta @@ -1,5 +1,7 @@ fileFormatVersion: 2 -guid: 4856a334c6d4a4984ba1cc6610f31b20 +guid: 8786b6500d406497c959f24c2a8b59ac +timeCreated: 1523662030 +licenseType: Free TextScriptImporter: externalObjects: {} userData: diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs/Environment.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs/RLAgent.prefab b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs/RLAgent.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs/RLAgent.prefab rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs/RLAgent.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs/RLAgent.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs/RLAgent.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Prefabs/RLAgent.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Prefabs/RLAgent.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity index 75087652c5..967a3375e1 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44824862, g: 0.49827534, b: 0.57558274, a: 1} + m_IndirectSpecularColor: {r: 0.4482636, g: 0.49828887, b: 0.5755903, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -223,6 +223,54 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: e2c4e1ad4f2224d34bb09d20f26b3207, type: 2} m_IsPrefabParent: 0 +--- !u!114 &223293593 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: f6197a66bd242464e8b654ef1ac01faf, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1319880098} +--- !u!114 &283857610 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} +--- !u!114 &317555893 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 1319880098} --- !u!1001 &324066892 Prefab: m_ObjectHideFlags: 0 @@ -608,18 +656,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: e2c4e1ad4f2224d34bb09d20f26b3207, type: 2} m_IsPrefabParent: 0 ---- !u!114 &843971902 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 1319880098} --- !u!1001 &892755145 Prefab: m_ObjectHideFlags: 0 @@ -675,6 +711,37 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: e2c4e1ad4f2224d34bb09d20f26b3207, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1025026074 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 2 + value: 1 + - key: 115 + index: 2 + value: -1 + - key: 101 + index: 1 + value: 1 + discretePlayerActions: [] + defaultAction: 0 + brain: {fileID: 1319880098} --- !u!1001 &1070233294 Prefab: m_ObjectHideFlags: 0 @@ -828,21 +895,21 @@ MonoBehaviour: brainParameters: vectorObservationSize: 6 numStackedVectorObservations: 3 - vectorActionSize: 03000000 - test: 010000000200000003000000 + vectorActionSize: 3 cameraResolutions: [] vectorActionDescriptions: - - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1542945058} - - {fileID: 1443417188} - - {fileID: 843971902} - - {fileID: 1734263332} - instanceID: 100942 + - {fileID: 1025026074} + - {fileID: 283857610} + - {fileID: 317555893} + - {fileID: 223293593} + instanceID: 27252 --- !u!1001 &1342597084 Prefab: m_ObjectHideFlags: 0 @@ -890,19 +957,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: e2c4e1ad4f2224d34bb09d20f26b3207, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1443417188 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} --- !u!1 &1453982293 GameObject: m_ObjectHideFlags: 0 @@ -960,37 +1014,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1542945058 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 2 - value: 1 - - key: 115 - index: 2 - value: -1 - - key: 101 - index: 1 - value: 1 - axisContinuousPlayerActions: [] - discretePlayerActions: [] - brain: {fileID: 1319880098} --- !u!1001 &1594422523 Prefab: m_ObjectHideFlags: 0 @@ -1156,29 +1179,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: e2c4e1ad4f2224d34bb09d20f26b3207, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1734263332 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: f6197a66bd242464e8b654ef1ac01faf, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 1319880098} --- !u!1001 &1822801414 Prefab: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity index 3a76af9a0b..47b6c6ff9f 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44824862, g: 0.49827534, b: 0.57558274, a: 1} + m_IndirectSpecularColor: {r: 0.4482636, g: 0.49828887, b: 0.5755903, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -113,6 +113,29 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!114 &169304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: f6197a66bd242464e8b654ef1ac01faf, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1319880098} --- !u!1 &93032780 GameObject: m_ObjectHideFlags: 0 @@ -203,29 +226,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 93032780} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &145110821 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: f6197a66bd242464e8b654ef1ac01faf, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 1319880098} --- !u!1 &177428570 GameObject: m_ObjectHideFlags: 0 @@ -316,19 +316,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 177428570} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &221156861 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} --- !u!1 &293806018 GameObject: m_ObjectHideFlags: 0 @@ -419,29 +406,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 293806018} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &337644622 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: f6197a66bd242464e8b654ef1ac01faf, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 1319880098} --- !u!1 &360306788 GameObject: m_ObjectHideFlags: 0 @@ -748,6 +712,19 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &510974366 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1 &547845511 GameObject: m_ObjectHideFlags: 0 @@ -1018,49 +995,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 655081222} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &755374548 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 2 - value: 1 - - key: 115 - index: 2 - value: -1 - - key: 101 - index: 1 - value: 1 - axisContinuousPlayerActions: [] - discretePlayerActions: [] - brain: {fileID: 1319880098} ---- !u!114 &761157829 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 1319880098} --- !u!1 &942330938 GameObject: m_ObjectHideFlags: 0 @@ -1522,7 +1456,7 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1083815624} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1120891150 +--- !u!114 &1136721888 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1530,10 +1464,52 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: f6197a66bd242464e8b654ef1ac01faf, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action brain: {fileID: 1319880098} +--- !u!114 &1149308946 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 2 + value: 1 + - key: 115 + index: 2 + value: -1 + - key: 101 + index: 1 + value: 1 + discretePlayerActions: [] + defaultAction: 0 + brain: {fileID: 1822922867} --- !u!1 &1202199113 GameObject: m_ObjectHideFlags: 0 @@ -1624,7 +1600,7 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1202199113} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1240717847 +--- !u!114 &1258959407 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1632,29 +1608,10 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 2 - value: 1 - - key: 115 - index: 2 - value: -1 - - key: 101 - index: 1 - value: 1 - axisContinuousPlayerActions: [] - discretePlayerActions: [] - brain: {fileID: 1822922867} + brain: {fileID: 1319880098} --- !u!1 &1319880096 GameObject: m_ObjectHideFlags: 0 @@ -1698,21 +1655,21 @@ MonoBehaviour: brainParameters: vectorObservationSize: 6 numStackedVectorObservations: 3 - vectorActionSize: 03000000 - test: 010000000200000003000000 + vectorActionSize: 3 cameraResolutions: [] vectorActionDescriptions: - - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 2 CoreBrains: - - {fileID: 755374548} - - {fileID: 221156861} - - {fileID: 1120891150} - - {fileID: 145110821} - instanceID: 101364 + - {fileID: 1476139026} + - {fileID: 510974366} + - {fileID: 1962903472} + - {fileID: 169304} + instanceID: 19832 --- !u!1 &1347974921 GameObject: m_ObjectHideFlags: 0 @@ -1807,19 +1764,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1347974921} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1420210670 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} --- !u!1 &1453982293 GameObject: m_ObjectHideFlags: 0 @@ -1878,6 +1822,37 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1476139026 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 2 + value: 1 + - key: 115 + index: 2 + value: -1 + - key: 101 + index: 1 + value: 1 + discretePlayerActions: [] + defaultAction: 0 + brain: {fileID: 1319880098} --- !u!1 &1496059855 GameObject: m_ObjectHideFlags: 0 @@ -2274,21 +2249,21 @@ MonoBehaviour: brainParameters: vectorObservationSize: 6 numStackedVectorObservations: 3 - vectorActionSize: 03000000 - test: 010000000200000003000000 + vectorActionSize: 3 cameraResolutions: [] vectorActionDescriptions: - - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1240717847} - - {fileID: 1420210670} - - {fileID: 761157829} - - {fileID: 337644622} - instanceID: 101428 + - {fileID: 1149308946} + - {fileID: 1938467577} + - {fileID: 1258959407} + - {fileID: 1136721888} + instanceID: 19898 --- !u!1 &1933723823 GameObject: m_ObjectHideFlags: 0 @@ -2379,6 +2354,31 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1933723823} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1938467577 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} +--- !u!114 &1962903472 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 1319880098} --- !u!1 &2058716318 GameObject: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scenes/BouncerIL.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerBanana.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/TFModels.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes b/unity-environment/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes diff --git a/UnitySDK/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Bouncer/TFModels/Bouncer.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab b/unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab b/unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab b/unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity index 9cb1f7887c..0862855ad9 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity @@ -417,8 +417,7 @@ MonoBehaviour: brainParameters: vectorObservationSize: 129 numStackedVectorObservations: 1 - vectorActionSize: 14000000 - test: 010000000200000003000000 + vectorActionSize: 20 cameraResolutions: [] vectorActionDescriptions: - @@ -442,52 +441,14 @@ MonoBehaviour: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 769190986} - - {fileID: 2021599809} - - {fileID: 1996599968} - - {fileID: 623618784} - instanceID: 101796 ---- !u!114 &623618784 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 310a6ef92323640b48a7342988a69466, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 393360180} ---- !u!114 &769190986 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] - discretePlayerActions: [] - brain: {fileID: 393360180} + - {fileID: 1495374266} + - {fileID: 1746293761} + - {fileID: 891800801} + - {fileID: 1773402215} + instanceID: 14192 --- !u!1001 &820757171 Prefab: m_ObjectHideFlags: 0 @@ -623,6 +584,18 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 0058b366f9d6d44a3ba35beb06b0174b, type: 2} m_IsPrefabParent: 0 +--- !u!114 &891800801 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 393360180} --- !u!1001 &986425172 Prefab: m_ObjectHideFlags: 0 @@ -897,6 +870,23 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: target: {fileID: 1796370627} +--- !u!114 &1495374266 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: [] + axisContinuousPlayerActions: [] + discretePlayerActions: [] + defaultAction: 0 + brain: {fileID: 393360180} --- !u!1001 &1555297488 Prefab: m_ObjectHideFlags: 0 @@ -1672,6 +1662,42 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 0058b366f9d6d44a3ba35beb06b0174b, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1746293761 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} +--- !u!114 &1773402215 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 310a6ef92323640b48a7342988a69466, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 393360180} --- !u!4 &1796370627 stripped Transform: m_PrefabParentObject: {fileID: 4222914027048448, guid: 0058b366f9d6d44a3ba35beb06b0174b, @@ -1742,31 +1768,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 33, y: 0, z: 0} ---- !u!114 &1996599968 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 393360180} ---- !u!114 &2021599809 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} --- !u!1 &2095421678 GameObject: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity index e4b1bb496e..029786b0ed 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity @@ -239,7 +239,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 2} m_IsPrefabParent: 0 ---- !u!114 &257727742 +--- !u!114 &355383963 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -247,20 +247,14 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - graphModel: {fileID: 4900000, guid: 24ef4b74625ba4c53b782ec33ad9f7d6, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action + keyContinuousPlayerActions: [] + axisContinuousPlayerActions: [] + discretePlayerActions: [] + defaultAction: 0 brain: {fileID: 393360180} --- !u!1001 &390093069 Prefab: @@ -430,8 +424,7 @@ MonoBehaviour: brainParameters: vectorObservationSize: 129 numStackedVectorObservations: 1 - vectorActionSize: 14000000 - test: 010000000200000003000000 + vectorActionSize: 20 cameraResolutions: [] vectorActionDescriptions: - @@ -455,13 +448,14 @@ MonoBehaviour: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 2072888643} - - {fileID: 1062524694} - - {fileID: 1533908803} - - {fileID: 257727742} - instanceID: 102252 + - {fileID: 355383963} + - {fileID: 1368353555} + - {fileID: 1611747288} + - {fileID: 1663417967} + instanceID: 44260 --- !u!1 &425632980 GameObject: m_ObjectHideFlags: 0 @@ -1059,7 +1053,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1062524694 +--- !u!114 &1368353555 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1068,7 +1062,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 brain: {fileID: 0} @@ -1626,18 +1620,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1524725509} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1533908803 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 393360180} --- !u!1001 &1541768107 Prefab: m_ObjectHideFlags: 0 @@ -1848,6 +1830,41 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1591997500} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1611747288 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 393360180} +--- !u!114 &1663417967 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 24ef4b74625ba4c53b782ec33ad9f7d6, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 393360180} --- !u!1 &1706224190 GameObject: m_ObjectHideFlags: 0 @@ -2200,22 +2217,6 @@ Transform: m_PrefabParentObject: {fileID: 4535347620366576, guid: 1b9d167a4e71146a883212e4f08bda88, type: 2} m_PrefabInternal: {fileID: 755285501} ---- !u!114 &2072888643 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] - discretePlayerActions: [] - brain: {fileID: 393360180} --- !u!1 &2095421678 GameObject: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels/DynamicCrawler.bytes b/unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels/DynamicCrawler.bytes similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels/DynamicCrawler.bytes rename to unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels/DynamicCrawler.bytes diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels/DynamicCrawler.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels/DynamicCrawler.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels/DynamicCrawler.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels/DynamicCrawler.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels/FixedCrawler.bytes b/unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels/FixedCrawler.bytes similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels/FixedCrawler.bytes rename to unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels/FixedCrawler.bytes diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels/FixedCrawler.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels/FixedCrawler.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Crawler/TFModels/FixedCrawler.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Crawler/TFModels/FixedCrawler.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/Floor.mat b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/Floor.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/Floor.mat rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/Floor.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/Floor.mat.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/Floor.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/Floor.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/Floor.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/goalMaterial.mat b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/goalMaterial.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/goalMaterial.mat rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/goalMaterial.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/goalMaterial.mat.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/goalMaterial.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/goalMaterial.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/goalMaterial.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/pitMaterial.mat b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/pitMaterial.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/pitMaterial.mat rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/pitMaterial.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/pitMaterial.mat.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/pitMaterial.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Materials/pitMaterial.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Materials/pitMaterial.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/agent.prefab b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/agent.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/agent.prefab rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/agent.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/agent.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/agent.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/agent.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/agent.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/goal.prefab b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/goal.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/goal.prefab rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/goal.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/goal.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/goal.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/goal.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/goal.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/pit.prefab b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/pit.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/pit.prefab rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/pit.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/pit.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/pit.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Resources/pit.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Resources/pit.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity similarity index 96% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity index ad8c848227..06475d5d10 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity +++ b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 8 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -39,6 +39,7 @@ RenderSettings: m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0.43668893, g: 0.4842832, b: 0.56452656, a: 1} + m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -54,11 +55,10 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 9 + serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 + m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -88,6 +88,7 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 0 --- !u!196 &4 @@ -109,6 +110,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + debug: + m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &2047662 GameObject: @@ -308,11 +311,11 @@ Camera: m_TargetEye: 3 m_HDR: 0 m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 --- !u!4 &231883447 Transform: m_ObjectHideFlags: 0 @@ -326,6 +329,18 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0} +--- !u!114 &268312203 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 1535917239} --- !u!1 &363761396 GameObject: m_ObjectHideFlags: 0 @@ -513,11 +528,11 @@ Camera: m_TargetEye: 3 m_HDR: 0 m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 --- !u!1 &742849316 GameObject: m_ObjectHideFlags: 0 @@ -580,6 +595,54 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &745466879 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: [] + discretePlayerActions: + - key: 273 + value: 0 + - key: 274 + value: 1 + - key: 276 + value: 2 + - key: 275 + value: 3 + defaultAction: -1 + brain: {fileID: 1535917239} +--- !u!114 &901496886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 0 + graphModel: {fileID: 4900000, guid: 5cf779dc0ed064c7080b9f4a3bfffed8, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: + - visual_observation_0 + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1535917239} --- !u!1 &959566328 GameObject: m_ObjectHideFlags: 0 @@ -607,9 +670,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -622,6 +687,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -689,9 +755,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -704,6 +772,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -771,9 +840,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 8d8e8962a89d44eb28cf1b21b88014ec, type: 2} m_StaticBatchInfo: @@ -786,6 +857,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -803,9 +875,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 0 - serializedVersion: 2 + serializedVersion: 3 m_Convex: 0 - m_InflateMesh: 0 + m_CookingOptions: 14 m_SkinWidth: 0.01 m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &1208586860 @@ -828,30 +900,6 @@ Transform: m_Father: {fileID: 486401524} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1361970090 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 5cf779dc0ed064c7080b9f4a3bfffed8, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: - - visual_observation_0 - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 1535917239} --- !u!1 &1535917237 GameObject: m_ObjectHideFlags: 0 @@ -897,21 +945,38 @@ MonoBehaviour: brainParameters: vectorObservationSize: 0 numStackedVectorObservations: 1 - vectorActionSize: 05000000 + vectorActionSize: 4 cameraResolutions: - width: 84 height: 84 blackAndWhite: 0 vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1611529580} - - {fileID: 2018783381} - - {fileID: 1966678175} - - {fileID: 1361970090} - instanceID: 11288 + - {fileID: 745466879} + - {fileID: 1551192994} + - {fileID: 268312203} + - {fileID: 901496886} + instanceID: 139218 +--- !u!114 &1551192994 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 1535917239} --- !u!1 &1553342942 GameObject: m_ObjectHideFlags: 0 @@ -986,34 +1051,6 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1553342942} ---- !u!114 &1611529580 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 273 - branchIndex: 0 - value: 1 - - key: 274 - branchIndex: 0 - value: 2 - - key: 276 - branchIndex: 0 - value: 3 - - key: 275 - branchIndex: 0 - value: 4 - brain: {fileID: 1535917239} --- !u!1 &1726089810 GameObject: m_ObjectHideFlags: 0 @@ -1041,9 +1078,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -1056,6 +1095,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -1123,9 +1163,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -1138,6 +1180,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -1178,18 +1221,6 @@ Transform: m_Father: {fileID: 486401524} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} ---- !u!114 &1966678175 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 1535917239} --- !u!1001 &2008405821 Prefab: m_ObjectHideFlags: 0 @@ -1256,16 +1287,3 @@ GameObject: m_PrefabParentObject: {fileID: 1657514749044530, guid: 628960e910f094ad1909ecc88cc8016d, type: 2} m_PrefabInternal: {fileID: 2008405821} ---- !u!114 &2018783381 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 1535917239} diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAcademy.cs.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs new file mode 100755 index 0000000000..15c2bd71e1 --- /dev/null +++ b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs @@ -0,0 +1,99 @@ +using UnityEngine; +using System.Linq; +using MLAgents; + +public class GridAgent : Agent +{ + [Header("Specific to GridWorld")] + private GridAcademy academy; + public float timeBetweenDecisionsAtInference; + private float timeSinceDecision; + + public override void InitializeAgent() + { + academy = FindObjectOfType(typeof(GridAcademy)) as GridAcademy; + } + + public override void CollectObservations() + { + + } + + // to be implemented by the developer + public override void AgentAction(float[] vectorAction, string textAction) + { + AddReward(-0.01f); + int action = Mathf.FloorToInt(vectorAction[0]); + + // 0 - Forward, 1 - Backward, 2 - Left, 3 - Right + Vector3 targetPos = transform.position; + if (action == 3) + { + targetPos = transform.position + new Vector3(1f, 0, 0f); + } + + if (action == 2) + { + targetPos = transform.position + new Vector3(-1f, 0, 0f); + } + + if (action == 0) + { + targetPos = transform.position + new Vector3(0f, 0, 1f); + } + + if (action == 1) + { + targetPos = transform.position + new Vector3(0f, 0, -1f); + } + + Collider[] blockTest = Physics.OverlapBox(targetPos, new Vector3(0.3f, 0.3f, 0.3f)); + if (blockTest.Where(col => col.gameObject.tag == "wall").ToArray().Length == 0) + { + transform.position = targetPos; + + if (blockTest.Where(col => col.gameObject.tag == "goal").ToArray().Length == 1) + { + Done(); + SetReward(1f); + } + if (blockTest.Where(col => col.gameObject.tag == "pit").ToArray().Length == 1) + { + Done(); + SetReward(-1f); + } + + } + } + + // to be implemented by the developer + public override void AgentReset() + { + academy.AcademyReset(); + } + + public void FixedUpdate() + { + WaitTimeInference(); + } + + private void WaitTimeInference() + { + if (!academy.GetIsInference()) + { + RequestDecision(); + } + else + { + if (timeSinceDecision >= timeBetweenDecisionsAtInference) + { + timeSinceDecision = 0f; + RequestDecision(); + } + else + { + timeSinceDecision += Time.fixedDeltaTime; + } + } + } +} diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes b/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes new file mode 100644 index 0000000000..56a7624aad Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_3x3.bytes.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes b/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes new file mode 100644 index 0000000000..ae8f962c33 Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld_5x5.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Goal.mat b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Goal.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Goal.mat rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Goal.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Goal.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Goal.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Goal.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Goal.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Orange.mat b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Orange.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Orange.mat rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Orange.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Orange.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Orange.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Orange.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Orange.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/PrototypeCheckerAlbedo.png b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material/PrototypeCheckerAlbedo.png similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/PrototypeCheckerAlbedo.png rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material/PrototypeCheckerAlbedo.png diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/PrototypeCheckerAlbedo.png.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material/PrototypeCheckerAlbedo.png.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/PrototypeCheckerAlbedo.png.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material/PrototypeCheckerAlbedo.png.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Red.mat b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Red.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Red.mat rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Red.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Red.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Red.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Material/Red.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Material/Red.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/HallwayArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/VisualHallwayArea.prefab b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/VisualHallwayArea.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/VisualHallwayArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/VisualHallwayArea.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/VisualHallwayArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/VisualHallwayArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/VisualHallwayArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/VisualHallwayArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/orangeBlock.prefab b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/orangeBlock.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/orangeBlock.prefab rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/orangeBlock.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/orangeBlock.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/orangeBlock.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/orangeBlock.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/orangeBlock.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/violetBlock.prefab b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/violetBlock.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/violetBlock.prefab rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/violetBlock.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/violetBlock.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/violetBlock.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Prefabs/violetBlock.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Prefabs/violetBlock.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity index ff23272fe8..7bdeb818e3 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 8 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -39,6 +39,7 @@ RenderSettings: m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -54,11 +55,10 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 9 + serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 + m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -77,15 +77,18 @@ LightmapSettings: m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 - m_PVRFiltering: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousColorSigma: 1 - m_PVRFilteringAtrousNormalSigma: 1 - m_PVRFilteringAtrousPositionSigma: 1 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 112000002, guid: 03723c7f910c3423aa1974f1b9ce8392, type: 2} m_UseShadowmask: 1 @@ -108,6 +111,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + debug: + m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &255077123 GameObject: @@ -171,29 +176,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &270118486 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 265c12afa8d894124b2c0ec39c670e7e, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 1658294317} --- !u!1 &318490716 GameObject: m_ObjectHideFlags: 1 @@ -473,6 +455,19 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: f3a451555dc514f46a69319857762eda, type: 2} m_IsPrefabParent: 0 +--- !u!114 &730290150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 1658294317} --- !u!1 &762086410 GameObject: m_ObjectHideFlags: 0 @@ -521,20 +516,6 @@ Light: m_Lightmapping: 4 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 - m_FalloffTable: - m_Table[0]: 0 - m_Table[1]: 0 - m_Table[2]: 0 - m_Table[3]: 0 - m_Table[4]: 0 - m_Table[5]: 0 - m_Table[6]: 0 - m_Table[7]: 0 - m_Table[8]: 0 - m_Table[9]: 0 - m_Table[10]: 0 - m_Table[11]: 0 - m_Table[12]: 0 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 @@ -607,58 +588,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: f3a451555dc514f46a69319857762eda, type: 2} m_IsPrefabParent: 0 ---- !u!114 &780649180 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 1658294317} ---- !u!114 &985721817 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 1 - value: -1 - - key: 100 - index: 1 - value: 1 - - key: 119 - index: 0 - value: 1 - - key: 115 - index: 0 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - brain: {fileID: 1658294317} --- !u!1001 &1034826137 Prefab: m_ObjectHideFlags: 0 @@ -872,11 +801,11 @@ Camera: m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 --- !u!4 &1319872503 Transform: m_ObjectHideFlags: 0 @@ -945,6 +874,55 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: f3a451555dc514f46a69319857762eda, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1383636458 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 1658294317} +--- !u!114 &1425604919 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 97 + index: 1 + value: -1 + - key: 100 + index: 1 + value: 1 + - key: 119 + index: 0 + value: 1 + - key: 115 + index: 0 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 97 + value: 3 + - key: 100 + value: 2 + - key: 119 + value: 0 + - key: 115 + value: 1 + defaultAction: -1 + brain: {fileID: 1658294317} --- !u!1001 &1494668070 Prefab: m_ObjectHideFlags: 0 @@ -1162,18 +1140,22 @@ MonoBehaviour: brainParameters: vectorObservationSize: 36 numStackedVectorObservations: 1 - vectorActionSize: 05000000 + vectorActionSize: 4 cameraResolutions: [] vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 985721817} - - {fileID: 1706868225} - - {fileID: 780649180} - - {fileID: 270118486} - instanceID: 24864 + - {fileID: 1425604919} + - {fileID: 730290150} + - {fileID: 1383636458} + - {fileID: 1995808789} + instanceID: 59832 --- !u!1001 &1682929897 Prefab: m_ObjectHideFlags: 0 @@ -1284,19 +1266,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: f3a451555dc514f46a69319857762eda, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1706868225 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 1658294317} --- !u!1001 &1738175949 Prefab: m_ObjectHideFlags: 0 @@ -1399,6 +1368,29 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: f3a451555dc514f46a69319857762eda, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1995808789 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 207e5dbbeeca8431d8f57fd1c96280af, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1658294317} --- !u!1001 &2014171623 Prefab: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity similarity index 96% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity index 1a819b673a..1332739068 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 8 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -39,6 +39,7 @@ RenderSettings: m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -54,11 +55,10 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 9 + serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 + m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -77,15 +77,18 @@ LightmapSettings: m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 - m_PVRFiltering: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousColorSigma: 1 - m_PVRFilteringAtrousNormalSigma: 1 - m_PVRFilteringAtrousPositionSigma: 1 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 112000002, guid: 03723c7f910c3423aa1974f1b9ce8392, type: 2} m_UseShadowmask: 1 @@ -108,20 +111,9 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + debug: + m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!114 &197536283 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 1658294317} --- !u!1 &255077123 GameObject: m_ObjectHideFlags: 0 @@ -254,18 +246,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &323600358 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 1033456770} --- !u!1 &365376270 GameObject: m_ObjectHideFlags: 0 @@ -295,6 +275,54 @@ Transform: m_Father: {fileID: 318490717} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &387144605 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 1 + value: -1 + - key: 100 + index: 1 + value: 1 + - key: 119 + index: 0 + value: 1 + - key: 115 + index: 0 + value: -1 + discretePlayerActions: + - key: 97 + value: 3 + - key: 100 + value: 2 + - key: 119 + value: 0 + - key: 115 + value: 1 + defaultAction: -1 + brain: {fileID: 1033456770} +--- !u!114 &410521683 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 1033456770} --- !u!1 &416291007 GameObject: m_ObjectHideFlags: 0 @@ -339,9 +367,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: e810187ce86f44ba1a373ca07a86ea81, type: 2} m_StaticBatchInfo: @@ -354,6 +384,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -427,9 +458,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: e810187ce86f44ba1a373ca07a86ea81, type: 2} m_StaticBatchInfo: @@ -442,6 +475,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -514,9 +548,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} m_StaticBatchInfo: @@ -529,6 +565,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -658,9 +695,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: fd56382c5d1a049b6a909c184a4c6d42, type: 2} m_StaticBatchInfo: @@ -673,6 +712,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -746,9 +786,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: e810187ce86f44ba1a373ca07a86ea81, type: 2} m_StaticBatchInfo: @@ -761,6 +803,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -790,7 +833,7 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 577668885} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &594398718 +--- !u!114 &581581753 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -798,9 +841,33 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 1 + value: -1 + - key: 100 + index: 1 + value: 1 + - key: 119 + index: 0 + value: 1 + - key: 115 + index: 0 + value: -1 + discretePlayerActions: + - key: 97 + value: 3 + - key: 100 + value: 2 + - key: 119 + value: 0 + - key: 115 + value: 1 + defaultAction: -1 brain: {fileID: 1658294317} --- !u!1 &597914579 GameObject: @@ -845,9 +912,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: ea4e6e61f90ae46daaf643b945c080ed, type: 2} m_StaticBatchInfo: @@ -860,6 +929,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -932,9 +1002,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} m_StaticBatchInfo: @@ -947,6 +1019,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -976,46 +1049,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 614388869} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &621733075 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 1 - value: -1 - - key: 100 - index: 1 - value: 1 - - key: 119 - index: 0 - value: 1 - - key: 115 - index: 0 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - brain: {fileID: 1658294317} --- !u!1 &622756922 GameObject: m_ObjectHideFlags: 0 @@ -1119,9 +1152,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 260483cdfc6b14e26823a02f23bd8baa, type: 2} m_StaticBatchInfo: @@ -1134,6 +1169,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -1176,6 +1212,29 @@ MonoBehaviour: m_EditorClassIdentifier: recordKey: 114 resetKey: 99 +--- !u!114 &643012456 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 207e5dbbeeca8431d8f57fd1c96280af, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1658294317} --- !u!1 &762086410 GameObject: m_ObjectHideFlags: 0 @@ -1224,20 +1283,6 @@ Light: m_Lightmapping: 4 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 - m_FalloffTable: - m_Table[0]: 0 - m_Table[1]: 0 - m_Table[2]: 0 - m_Table[3]: 0 - m_Table[4]: 0 - m_Table[5]: 0 - m_Table[6]: 0 - m_Table[7]: 0 - m_Table[8]: 0 - m_Table[9]: 0 - m_Table[10]: 0 - m_Table[11]: 0 - m_Table[12]: 0 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 @@ -1315,9 +1360,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 14324848a330c4217817001de3315e6e, type: 2} m_StaticBatchInfo: @@ -1330,6 +1377,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -1415,9 +1463,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -1430,6 +1480,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -1502,9 +1553,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -1517,6 +1570,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -1576,9 +1630,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 14324848a330c4217817001de3315e6e, type: 2} m_StaticBatchInfo: @@ -1591,6 +1647,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -1620,29 +1677,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 866873732} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &878406077 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 265c12afa8d894124b2c0ec39c670e7e, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 1658294317} --- !u!1 &1007891785 GameObject: m_ObjectHideFlags: 0 @@ -1745,9 +1779,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 260483cdfc6b14e26823a02f23bd8baa, type: 2} m_StaticBatchInfo: @@ -1760,6 +1796,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -1835,17 +1872,22 @@ MonoBehaviour: brainParameters: vectorObservationSize: 36 numStackedVectorObservations: 1 - vectorActionSize: + vectorActionSize: 4 cameraResolutions: [] - vectorActionDescriptions: [] + vectorActionDescriptions: + - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 2 CoreBrains: - - {fileID: 1856618571} - - {fileID: 2073540943} - - {fileID: 323600358} - - {fileID: 1756886652} - instanceID: 33276 + - {fileID: 387144605} + - {fileID: 1164873684} + - {fileID: 410521683} + - {fileID: 1799405310} + instanceID: 19088 --- !u!1 &1085144394 GameObject: m_ObjectHideFlags: 0 @@ -1909,11 +1951,11 @@ Camera: m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 --- !u!1 &1116803907 GameObject: m_ObjectHideFlags: 0 @@ -1970,9 +2012,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -1985,6 +2029,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -2044,9 +2089,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: fd56382c5d1a049b6a909c184a4c6d42, type: 2} m_StaticBatchInfo: @@ -2059,6 +2106,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -2088,6 +2136,19 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1150355053} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1164873684 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 1033456770} --- !u!1 &1177434027 GameObject: m_ObjectHideFlags: 0 @@ -2144,9 +2205,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -2159,6 +2222,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -2231,6 +2295,19 @@ Transform: m_Father: {fileID: 318490717} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1291045783 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 1658294317} --- !u!1 &1310732130 GameObject: m_ObjectHideFlags: 0 @@ -2287,9 +2364,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -2302,6 +2381,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -2365,11 +2445,11 @@ Camera: m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 --- !u!4 &1319872503 Transform: m_ObjectHideFlags: 0 @@ -2426,9 +2506,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 14324848a330c4217817001de3315e6e, type: 2} m_StaticBatchInfo: @@ -2441,6 +2523,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -2513,9 +2596,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: ea4e6e61f90ae46daaf643b945c080ed, type: 2} m_StaticBatchInfo: @@ -2528,6 +2613,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -2601,9 +2687,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: e810187ce86f44ba1a373ca07a86ea81, type: 2} m_StaticBatchInfo: @@ -2616,6 +2704,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -2705,9 +2794,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: fd56382c5d1a049b6a909c184a4c6d42, type: 2} m_StaticBatchInfo: @@ -2720,6 +2811,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -2857,18 +2949,22 @@ MonoBehaviour: brainParameters: vectorObservationSize: 36 numStackedVectorObservations: 1 - vectorActionSize: 05000000 + vectorActionSize: 4 cameraResolutions: [] vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 621733075} - - {fileID: 197536283} - - {fileID: 594398718} - - {fileID: 878406077} - instanceID: 33394 + - {fileID: 581581753} + - {fileID: 1291045783} + - {fileID: 1949646799} + - {fileID: 643012456} + instanceID: 19208 --- !u!1 &1662922128 GameObject: m_ObjectHideFlags: 0 @@ -2925,9 +3021,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -2940,6 +3038,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -3012,9 +3111,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -3027,6 +3128,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -3103,9 +3205,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 14324848a330c4217817001de3315e6e, type: 2} m_StaticBatchInfo: @@ -3118,6 +3222,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -3147,7 +3252,7 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1747738424} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1756886652 +--- !u!114 &1799405310 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -3156,10 +3261,10 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - graphModel: {fileID: 4900000, guid: 265c12afa8d894124b2c0ec39c670e7e, type: 3} + graphModel: {fileID: 4900000, guid: 207e5dbbeeca8431d8f57fd1c96280af, type: 3} graphScope: graphPlaceholders: [] BatchSizePlaceholderName: batch_size @@ -3169,7 +3274,7 @@ MonoBehaviour: VisualObservationPlaceholderName: [] ActionPlaceholderName: action PreviousActionPlaceholderName: prev_action - brain: {fileID: 1033456770} + brain: {fileID: 1658294317} --- !u!1 &1836777191 GameObject: m_ObjectHideFlags: 0 @@ -3213,9 +3318,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: fd56382c5d1a049b6a909c184a4c6d42, type: 2} m_StaticBatchInfo: @@ -3228,6 +3335,7 @@ MeshRenderer: m_PreserveUVs: 1 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -3257,7 +3365,7 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1836777191} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1856618571 +--- !u!114 &1949646799 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -3265,38 +3373,10 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 1 - value: -1 - - key: 100 - index: 1 - value: 1 - - key: 119 - index: 0 - value: 1 - - key: 115 - index: 0 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 3 - - key: 100 - branchIndex: 0 - value: 2 - - key: 119 - branchIndex: 0 - value: 0 - - key: 115 - branchIndex: 0 - value: 1 - brain: {fileID: 1033456770} + brain: {fileID: 1658294317} --- !u!1 &1965235869 GameObject: m_ObjectHideFlags: 0 @@ -3360,11 +3440,11 @@ Camera: m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 --- !u!1 &2060226396 GameObject: m_ObjectHideFlags: 0 @@ -3421,9 +3501,11 @@ MeshRenderer: m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 214660f4189b04cada2137381f5c3607, type: 2} m_StaticBatchInfo: @@ -3436,6 +3518,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -3452,16 +3535,3 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 2060226396} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &2073540943 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 1033456770} diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/HallwayIL.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity index 18dd166cda..a5c47b851a 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity @@ -114,7 +114,7 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!114 &221111213 +--- !u!114 &86349088 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -123,7 +123,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 keyContinuousPlayerActions: @@ -142,17 +142,14 @@ MonoBehaviour: axisContinuousPlayerActions: [] discretePlayerActions: - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 value: 3 + - key: 100 + value: 2 - key: 119 - branchIndex: 0 - value: 1 + value: 0 - key: 115 - branchIndex: 0 - value: 2 + value: 1 + defaultAction: -1 brain: {fileID: 1658294317} --- !u!1 &255077123 GameObject: @@ -246,19 +243,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &347550197 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 1658294317} --- !u!1 &365376270 GameObject: m_ObjectHideFlags: 0 @@ -339,6 +323,30 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 7cb742e1326b447128356a50bb09cd89, type: 2} m_IsPrefabParent: 0 +--- !u!114 &631482400 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 0} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: + - visual_observation_0 + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1658294317} --- !u!1001 &676514743 Prefab: m_ObjectHideFlags: 0 @@ -441,18 +449,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 7cb742e1326b447128356a50bb09cd89, type: 2} m_IsPrefabParent: 0 ---- !u!114 &725049701 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 1658294317} --- !u!1 &762086410 GameObject: m_ObjectHideFlags: 0 @@ -950,23 +946,26 @@ MonoBehaviour: brainParameters: vectorObservationSize: 0 numStackedVectorObservations: 1 - vectorActionSize: 05000000 - test: 010000000200000003000000 + vectorActionSize: 4 cameraResolutions: - width: 84 height: 84 blackAndWhite: 0 vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 221111213} - - {fileID: 347550197} - - {fileID: 725049701} - - {fileID: 1788278707} - instanceID: 104046 ---- !u!114 &1788278707 + - {fileID: 86349088} + - {fileID: 1682823487} + - {fileID: 1925367146} + - {fileID: 631482400} + instanceID: 16058 +--- !u!114 &1682823487 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -974,21 +973,10 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - graphModel: {fileID: 0} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: - - visual_observation_0 - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action brain: {fileID: 1658294317} --- !u!1001 &1890749824 Prefab: @@ -1037,3 +1025,15 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 7cb742e1326b447128356a50bb09cd89, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1925367146 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 1658294317} diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs index 3f3d7b98df..ad4339e3a8 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs +++ b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs @@ -65,16 +65,16 @@ public void MoveAgent(float[] act) int action = Mathf.FloorToInt(act[0]); switch (action) { - case 1: + case 0: dirToGo = transform.forward * 1f; break; - case 2: + case 1: dirToGo = transform.forward * -1f; break; - case 3: + case 2: rotateDir = transform.up * 1f; break; - case 4: + case 3: rotateDir = transform.up * -1f; break; } diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/TFModels.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes b/unity-environment/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes new file mode 100644 index 0000000000..8c1a3e32a7 Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes.meta similarity index 64% rename from UnitySDK/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes.meta index 48f86f0719..e491833e37 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes.meta +++ b/unity-environment/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.bytes.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 265c12afa8d894124b2c0ec39c670e7e -timeCreated: 1535560516 +guid: 207e5dbbeeca8431d8f57fd1c96280af +timeCreated: 1520904091 licenseType: Free TextScriptImporter: userData: diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/PushBlockArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs/VisualArea.prefab b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/VisualArea.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs/VisualArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/VisualArea.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs/VisualArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/VisualArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Prefabs/VisualArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Prefabs/VisualArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity index e0ee904578..00a3b9fa46 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity +++ b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 8 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -39,6 +39,7 @@ RenderSettings: m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -54,11 +55,10 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 9 + serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 + m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -168,7 +168,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -227,7 +227,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -286,7 +286,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -345,7 +345,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -404,7 +404,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -438,18 +438,24 @@ MonoBehaviour: brainParameters: vectorObservationSize: 70 numStackedVectorObservations: 3 - vectorActionSize: 07000000 + vectorActionSize: 6 cameraResolutions: [] vectorActionDescriptions: - + - + - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 361601992} - - {fileID: 1563314878} - - {fileID: 1377743342} - - {fileID: 357423589} - instanceID: 79418 + - {fileID: 1774808999} + - {fileID: 966937467} + - {fileID: 1078689134} + - {fileID: 626804319} + instanceID: 23980 --- !u!1 &255077123 GameObject: m_ObjectHideFlags: 0 @@ -566,7 +572,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -625,7 +631,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -714,80 +720,11 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} m_IsPrefabParent: 0 ---- !u!114 &357423589 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: e70166483fb114a9ebeb380f724db21d, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 226584073} ---- !u!114 &361601992 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 1 - value: 1 - - key: 115 - index: 1 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 113 - branchIndex: 0 - value: 5 - - key: 101 - branchIndex: 0 - value: 6 - brain: {fileID: 226584073} --- !u!1 &365376270 GameObject: m_ObjectHideFlags: 0 @@ -871,7 +808,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -930,7 +867,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -989,7 +926,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1011,6 +948,29 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &626804319 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 2e1836ea047144568b39370292aa8a6e, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 226584073} --- !u!1001 &756777950 Prefab: m_ObjectHideFlags: 0 @@ -1065,7 +1025,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1189,7 +1149,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1248,7 +1208,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1307,7 +1267,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1366,11 +1326,24 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} m_IsPrefabParent: 0 +--- !u!114 &966937467 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1 &1009000883 GameObject: m_ObjectHideFlags: 0 @@ -1490,11 +1463,23 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1078689134 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 226584073} --- !u!1001 &1082394721 Prefab: m_ObjectHideFlags: 0 @@ -1549,7 +1534,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1608,7 +1593,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1667,7 +1652,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1726,7 +1711,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1841,23 +1826,11 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1377743342 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 226584073} --- !u!1001 &1488759065 Prefab: m_ObjectHideFlags: 0 @@ -1912,7 +1885,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -1971,24 +1944,11 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1563314878 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} --- !u!1 &1574236047 GameObject: m_ObjectHideFlags: 0 @@ -2018,8 +1978,8 @@ MonoBehaviour: m_EditorClassIdentifier: maxSteps: 0 trainingConfiguration: - width: 400 - height: 300 + width: 1280 + height: 720 qualityLevel: 0 timeScale: 15 targetFrameRate: 60 @@ -2105,7 +2065,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -2164,7 +2124,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -2223,11 +2183,52 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1774808999 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 1 + value: 1 + - key: 115 + index: 1 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 97 + value: 3 + - key: 100 + value: 2 + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 113 + value: 4 + - key: 101 + value: 5 + defaultAction: -1 + brain: {fileID: 226584073} --- !u!1001 &1783815898 Prefab: m_ObjectHideFlags: 0 @@ -2282,7 +2283,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -2341,7 +2342,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -2451,7 +2452,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} @@ -2510,7 +2511,7 @@ Prefab: objectReference: {fileID: 226584073} - target: {fileID: 1125452240183160, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 03bcc81e249714a22bb411dddcc5d15e, type: 2} diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity index 94e450dea9..b6d0338a89 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity +++ b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity @@ -114,7 +114,7 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!114 &122371995 +--- !u!114 &68064276 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -123,7 +123,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: brain: {fileID: 226584073} --- !u!1 &140941579 @@ -400,19 +400,24 @@ MonoBehaviour: brainParameters: vectorObservationSize: 70 numStackedVectorObservations: 3 - vectorActionSize: 07000000 - test: 010000000200000003000000 + vectorActionSize: 6 cameraResolutions: [] vectorActionDescriptions: - + - + - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1618757549} - - {fileID: 515487994} - - {fileID: 122371995} - - {fileID: 576523379} - instanceID: 104710 + - {fileID: 1144686933} + - {fileID: 1742914792} + - {fileID: 68064276} + - {fileID: 2057545714} + instanceID: 20330 --- !u!1 &255077123 GameObject: m_ObjectHideFlags: 0 @@ -694,7 +699,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &515487994 +--- !u!114 &573304656 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -702,12 +707,39 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - brain: {fileID: 0} ---- !u!114 &576523379 + continuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 1 + value: 1 + - key: 115 + index: 1 + value: -1 + discretePlayerActions: + - key: 97 + value: 3 + - key: 100 + value: 2 + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 113 + value: 4 + - key: 101 + value: 5 + defaultAction: -1 + brain: {fileID: 1028784201} +--- !u!114 &599861783 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -715,21 +747,10 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 2e1836ea047144568b39370292aa8a6e, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 226584073} + brain: {fileID: 1028784201} --- !u!1 &612607732 GameObject: m_ObjectHideFlags: 0 @@ -837,52 +858,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 626941425} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &667729014 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 1 - value: 1 - - key: 115 - index: 1 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 113 - branchIndex: 0 - value: 5 - - key: 101 - branchIndex: 0 - value: 6 - brain: {fileID: 1028784201} --- !u!1 &670477230 GameObject: m_ObjectHideFlags: 0 @@ -973,18 +948,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 670477230} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &713617733 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 1028784201} --- !u!1 &762086410 GameObject: m_ObjectHideFlags: 0 @@ -1431,18 +1394,24 @@ MonoBehaviour: brainParameters: vectorObservationSize: 70 numStackedVectorObservations: 3 - vectorActionSize: - test: 010000000200000003000000 + vectorActionSize: 6 cameraResolutions: [] - vectorActionDescriptions: [] + vectorActionDescriptions: + - + - + - + - + - + - vectorActionSpaceType: 0 - brainType: 0 + vectorObservationSpaceType: 1 + brainType: 2 CoreBrains: - - {fileID: 667729014} - - {fileID: 1952556136} - - {fileID: 713617733} - - {fileID: 1908539207} - instanceID: 104774 + - {fileID: 573304656} + - {fileID: 1402975311} + - {fileID: 599861783} + - {fileID: 1089233659} + instanceID: 20398 --- !u!1 &1073797087 GameObject: m_ObjectHideFlags: 0 @@ -1533,6 +1502,69 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1073797087} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1089233659 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 2e1836ea047144568b39370292aa8a6e, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 226584073} +--- !u!114 &1144686933 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 1 + value: 1 + - key: 115 + index: 1 + value: -1 + discretePlayerActions: + - key: 97 + value: 3 + - key: 100 + value: 2 + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 113 + value: 4 + - key: 101 + value: 5 + defaultAction: -1 + brain: {fileID: 226584073} --- !u!1 &1172383915 GameObject: m_ObjectHideFlags: 0 @@ -1713,6 +1745,19 @@ Transform: m_Father: {fileID: 318490717} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1402975311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1 &1534309169 GameObject: m_ObjectHideFlags: 0 @@ -1987,52 +2032,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1602283231} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1618757549 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 1 - value: 1 - - key: 115 - index: 1 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 113 - branchIndex: 0 - value: 5 - - key: 101 - branchIndex: 0 - value: 6 - brain: {fileID: 226584073} --- !u!1 &1654921131 GameObject: m_ObjectHideFlags: 0 @@ -2467,6 +2466,19 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1704727628} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1742914792 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1 &1875058293 GameObject: m_ObjectHideFlags: 0 @@ -2617,42 +2629,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1875058293} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1908539207 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 2e1836ea047144568b39370292aa8a6e, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 226584073} ---- !u!114 &1952556136 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} --- !u!1 &2026139990 GameObject: m_ObjectHideFlags: 0 @@ -2743,3 +2719,26 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 2026139990} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &2057545714 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 2e1836ea047144568b39370292aa8a6e, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 226584073} diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlockIL.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity index 52d4dcd91a..5d763f75d4 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity +++ b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity @@ -143,22 +143,27 @@ MonoBehaviour: brainParameters: vectorObservationSize: 0 numStackedVectorObservations: 1 - vectorActionSize: 07000000 - test: 010000000200000003000000 + vectorActionSize: 6 cameraResolutions: - width: 84 height: 84 blackAndWhite: 0 vectorActionDescriptions: - + - + - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1253109105} - - {fileID: 1246870854} - - {fileID: 482798761} - - {fileID: 908759860} - instanceID: 105260 + - {fileID: 584235696} + - {fileID: 1778961493} + - {fileID: 786489761} + - {fileID: 1899799191} + instanceID: 16260 --- !u!1001 &240929210 Prefab: m_ObjectHideFlags: 0 @@ -378,7 +383,7 @@ Transform: m_Father: {fileID: 318490717} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &482798761 +--- !u!114 &584235696 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -386,9 +391,38 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 1 + value: 1 + - key: 115 + index: 1 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 97 + value: 3 + - key: 100 + value: 2 + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 113 + value: 4 + - key: 101 + value: 5 + defaultAction: -1 brain: {fileID: 226584073} --- !u!1 &612607732 GameObject: @@ -472,6 +506,18 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 45, y: -45, z: 0} +--- !u!114 &786489761 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 226584073} --- !u!1001 &860552447 Prefab: m_ObjectHideFlags: 0 @@ -523,30 +569,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ac5f949973dd649959b04f3c41021a80, type: 2} m_IsPrefabParent: 0 ---- !u!114 &908759860 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 0} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: - - visual_observation_0 - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 226584073} --- !u!1 &1009000883 GameObject: m_ObjectHideFlags: 0 @@ -612,65 +634,6 @@ Camera: m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 ---- !u!114 &1246870854 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} ---- !u!114 &1253109105 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 1 - value: 1 - - key: 115 - index: 1 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 113 - branchIndex: 0 - value: 5 - - key: 101 - branchIndex: 0 - value: 6 - brain: {fileID: 226584073} --- !u!1 &1257687048 GameObject: m_ObjectHideFlags: 0 @@ -891,6 +854,19 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ac5f949973dd649959b04f3c41021a80, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1778961493 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1001 &1821931456 Prefab: m_ObjectHideFlags: 0 @@ -993,6 +969,30 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ac5f949973dd649959b04f3c41021a80, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1899799191 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 0} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: + - visual_observation_0 + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 226584073} --- !u!1001 &2115248951 Prefab: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/GoalDetect.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs index 1001bbe8e0..1dfd1fd527 100755 --- a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs +++ b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs @@ -148,22 +148,22 @@ public void MoveAgent(float[] act) // Goalies and Strikers have slightly different action spaces. switch (action) { - case 1: + case 0: dirToGo = transform.forward * 1f; break; - case 2: + case 1: dirToGo = transform.forward * -1f; break; - case 3: + case 2: rotateDir = transform.up * 1f; break; - case 4: + case 3: rotateDir = transform.up * -1f; break; - case 5: + case 4: dirToGo = transform.right * -0.75f; break; - case 6: + case 5: dirToGo = transform.right * 0.75f; break; } diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/TFModels.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes b/unity-environment/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes new file mode 100644 index 0000000000..1cb30bb19a Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes.meta similarity index 75% rename from UnitySDK/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes.meta index 39b98c3790..fa7c77e7ee 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes.meta +++ b/unity-environment/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.bytes.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e70166483fb114a9ebeb380f724db21d +guid: 2e1836ea047144568b39370292aa8a6e TextScriptImporter: externalObjects: {} userData: diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/Brick.mat b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/Brick.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/Brick.mat rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/Brick.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/Brick.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/Brick.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/Brick.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/Brick.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/Gold.mat b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/Gold.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/Gold.mat rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/Gold.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/Gold.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/Gold.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/Gold.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/Gold.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/agent.mat b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/agent.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/agent.mat rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/agent.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/agent.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/agent.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/agent.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/agent.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/black.mat b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/black.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/black.mat rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/black.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/black.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/black.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/black.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/black.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/ground.mat b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/ground.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/ground.mat rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/ground.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/ground.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/ground.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/ground.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/ground.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/red.mat b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/red.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/red.mat rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/red.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/red.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/red.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/red.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/red.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/white.mat b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/white.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/white.mat rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/white.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/white.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/white.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Materials/white.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Materials/white.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/AreaPB.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/BrickPyramid.prefab b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/BrickPyramid.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/BrickPyramid.prefab rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/BrickPyramid.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/BrickPyramid.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/BrickPyramid.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/BrickPyramid.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/BrickPyramid.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/StonePyramid.prefab b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/StonePyramid.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/StonePyramid.prefab rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/StonePyramid.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/StonePyramid.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/StonePyramid.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/StonePyramid.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/StonePyramid.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/VisualAreaPB.prefab b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/VisualAreaPB.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/VisualAreaPB.prefab rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/VisualAreaPB.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/VisualAreaPB.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/VisualAreaPB.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Prefabs/VisualAreaPB.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Prefabs/VisualAreaPB.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity index b87d5db351..01e6852fcc 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity @@ -157,19 +157,22 @@ MonoBehaviour: brainParameters: vectorObservationSize: 172 numStackedVectorObservations: 1 - vectorActionSize: 05000000 - test: 010000000200000003000000 + vectorActionSize: 4 cameraResolutions: [] vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 493211727} - - {fileID: 2079983037} - - {fileID: 559056792} - - {fileID: 389805331} - instanceID: 15350 + - {fileID: 719369990} + - {fileID: 696311630} + - {fileID: 1700719683} + - {fileID: 1602944013} + instanceID: 40746 --- !u!1001 &14183653 Prefab: m_ObjectHideFlags: 0 @@ -478,29 +481,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 2} m_IsPrefabParent: 0 ---- !u!114 &389805331 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 97f59608051e548d9a79803894260d13, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 7561199} --- !u!1001 &418198956 Prefab: m_ObjectHideFlags: 0 @@ -655,46 +635,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 2} m_IsPrefabParent: 0 ---- !u!114 &493211727 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 119 - index: 0 - value: 1 - - key: 97 - index: 1 - value: -1 - - key: 100 - index: 1 - value: 1 - - key: 115 - index: 0 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - brain: {fileID: 7561199} --- !u!1 &499540684 GameObject: m_ObjectHideFlags: 0 @@ -834,7 +774,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 2} m_IsPrefabParent: 0 ---- !u!114 &559056792 +--- !u!114 &696311630 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -842,9 +782,47 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 7561199} +--- !u!114 &719369990 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 119 + index: 0 + value: 1 + - key: 97 + index: 1 + value: -1 + - key: 100 + index: 1 + value: 1 + - key: 115 + index: 0 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 97 + value: 3 + - key: 100 + value: 2 + defaultAction: -1 brain: {fileID: 7561199} --- !u!1 &762086410 GameObject: @@ -1554,6 +1532,29 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1602944013 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 97f59608051e548d9a79803894260d13, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 7561199} --- !u!1001 &1613855850 Prefab: m_ObjectHideFlags: 0 @@ -1631,7 +1632,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 2} m_IsPrefabParent: 0 ---- !u!114 &2079983037 +--- !u!114 &1700719683 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1639,10 +1640,9 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 1 brain: {fileID: 7561199} --- !u!1001 &2127934646 Prefab: diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity similarity index 94% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity index 9946a7a6fc..86d2fbb17a 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity @@ -247,19 +247,22 @@ MonoBehaviour: brainParameters: vectorObservationSize: 172 numStackedVectorObservations: 1 - vectorActionSize: 05000000 - test: 010000000200000003000000 + vectorActionSize: 4 cameraResolutions: [] vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 - brainType: 0 + vectorObservationSpaceType: 1 + brainType: 2 CoreBrains: - - {fileID: 2109415761} - - {fileID: 798237483} - - {fileID: 1937257520} - - {fileID: 198921508} - instanceID: 108650 + - {fileID: 1692947229} + - {fileID: 1779903057} + - {fileID: 2095727363} + - {fileID: 1658420969} + instanceID: 16576 --- !u!1 &13245493 GameObject: m_ObjectHideFlags: 0 @@ -875,19 +878,22 @@ MonoBehaviour: brainParameters: vectorObservationSize: 172 numStackedVectorObservations: 1 - vectorActionSize: 05000000 - test: 010000000200000003000000 + vectorActionSize: 4 cameraResolutions: [] vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 883259096} - - {fileID: 271612966} - - {fileID: 515086752} - - {fileID: 744022447} - instanceID: 108720 + - {fileID: 385073549} + - {fileID: 807738415} + - {fileID: 1672738730} + - {fileID: 1299142495} + instanceID: 16648 --- !u!1 &160842170 GameObject: m_ObjectHideFlags: 0 @@ -1100,29 +1106,6 @@ Transform: m_Father: {fileID: 1160284414} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &198921508 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 0} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 0} --- !u!1 &229985674 GameObject: m_ObjectHideFlags: 0 @@ -1213,19 +1196,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 229985674} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &271612966 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} --- !u!1 &296844252 GameObject: m_ObjectHideFlags: 0 @@ -1619,6 +1589,43 @@ Transform: m_Father: {fileID: 1275719199} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &385073549 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 119 + index: 0 + value: 1 + - key: 97 + index: 1 + value: -1 + - key: 100 + index: 1 + value: 1 + - key: 115 + index: 0 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 97 + value: 3 + - key: 100 + value: 2 + defaultAction: -1 + brain: {fileID: 147991571} --- !u!1 &400726917 GameObject: m_ObjectHideFlags: 0 @@ -2454,18 +2461,6 @@ MonoBehaviour: m_EditorClassIdentifier: recordKey: 114 resetKey: 99 ---- !u!114 &515086752 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 0} --- !u!1 &581471863 GameObject: m_ObjectHideFlags: 0 @@ -3250,29 +3245,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 732972912} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &744022447 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 0} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 0} --- !u!1 &747960325 GameObject: m_ObjectHideFlags: 0 @@ -3621,19 +3593,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 792467096} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &798237483 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} --- !u!1 &804779913 GameObject: m_ObjectHideFlags: 0 @@ -3724,6 +3683,19 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 804779913} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &807738415 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 7561199} --- !u!1 &821673624 GameObject: m_ObjectHideFlags: 0 @@ -3756,34 +3728,6 @@ Transform: m_Father: {fileID: 1160284414} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &883259096 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 100 - branchIndex: 0 - value: 3 - - key: 97 - branchIndex: 0 - value: 4 - brain: {fileID: 147991571} --- !u!1 &885035859 GameObject: m_ObjectHideFlags: 0 @@ -5764,6 +5708,29 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1284949582} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1299142495 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 97f59608051e548d9a79803894260d13, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 7561199} --- !u!1 &1316512230 GameObject: m_ObjectHideFlags: 0 @@ -7290,6 +7257,29 @@ Transform: m_Father: {fileID: 790516554} m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1658420969 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 97f59608051e548d9a79803894260d13, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 7561199} --- !u!1 &1663678488 GameObject: m_ObjectHideFlags: 0 @@ -7380,6 +7370,18 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1663678488} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1672738730 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 7561199} --- !u!1 &1677139734 GameObject: m_ObjectHideFlags: 0 @@ -7689,6 +7691,56 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1690832524} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1692947229 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 119 + index: 0 + value: 1 + - key: 97 + index: 1 + value: -1 + - key: 100 + index: 1 + value: 1 + - key: 115 + index: 0 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 97 + value: 3 + - key: 100 + value: 2 + defaultAction: -1 + brain: {fileID: 7561199} +--- !u!114 &1779903057 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 7561199} --- !u!1 &1785096101 GameObject: m_ObjectHideFlags: 0 @@ -8091,18 +8143,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1900869768} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1937257520 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 0} --- !u!1 &2036081216 GameObject: m_ObjectHideFlags: 0 @@ -8407,7 +8447,7 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 2083963321} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &2109415761 +--- !u!114 &2095727363 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -8415,25 +8455,9 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 100 - branchIndex: 0 - value: 3 - - key: 97 - branchIndex: 0 - value: 4 brain: {fileID: 7561199} --- !u!1 &2111403376 GameObject: diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/PyramidsIL.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity index 7504f43fa5..922045e36a 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity @@ -157,22 +157,38 @@ MonoBehaviour: brainParameters: vectorObservationSize: 0 numStackedVectorObservations: 1 - vectorActionSize: 05000000 - test: 010000000200000003000000 + vectorActionSize: 4 cameraResolutions: - width: 84 height: 84 blackAndWhite: 0 vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 849224587} - - {fileID: 1233918208} - - {fileID: 1685332511} - - {fileID: 659077902} - instanceID: 110560 + - {fileID: 1020885529} + - {fileID: 347506130} + - {fileID: 1494751466} + - {fileID: 1911771706} + instanceID: 16396 +--- !u!114 &347506130 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 7561199} --- !u!1001 &434549037 Prefab: m_ObjectHideFlags: 0 @@ -290,30 +306,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &659077902 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 0} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: - - visual_observation_0 - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 7561199} --- !u!1 &762086410 GameObject: m_ObjectHideFlags: 0 @@ -379,46 +371,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 45, y: 45, z: 0} ---- !u!114 &849224587 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 119 - index: 0 - value: 1 - - key: 97 - index: 1 - value: -1 - - key: 100 - index: 1 - value: 1 - - key: 115 - index: 0 - value: -1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - brain: {fileID: 7561199} --- !u!1001 &867028106 Prefab: m_ObjectHideFlags: 0 @@ -539,7 +491,7 @@ Camera: m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 ---- !u!114 &1233918208 +--- !u!114 &1020885529 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -547,10 +499,34 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 + keyContinuousPlayerActions: + - key: 119 + index: 0 + value: 1 + - key: 97 + index: 1 + value: -1 + - key: 100 + index: 1 + value: 1 + - key: 115 + index: 0 + value: -1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 97 + value: 3 + - key: 100 + value: 2 + defaultAction: -1 brain: {fileID: 7561199} --- !u!1001 &1301203062 Prefab: @@ -662,6 +638,18 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 85206c30964c245ee92be7d0ed13b3b8, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1494751466 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 7561199} --- !u!1001 &1520029673 Prefab: m_ObjectHideFlags: 0 @@ -828,7 +816,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 85206c30964c245ee92be7d0ed13b3b8, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1685332511 +--- !u!114 &1911771706 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -836,9 +824,21 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 0} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: + - visual_observation_0 + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action brain: {fileID: 7561199} --- !u!1001 &1942885600 Prefab: diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs index d9ee5b22c8..f14059ea58 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs +++ b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs @@ -58,16 +58,16 @@ public void MoveAgent(float[] act) var action = Mathf.FloorToInt(act[0]); switch (action) { - case 1: + case 0: dirToGo = transform.forward * 1f; break; - case 2: + case 1: dirToGo = transform.forward * -1f; break; - case 3: + case 2: rotateDir = transform.up * 1f; break; - case 4: + case 3: rotateDir = transform.up * -1f; break; } diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidArea.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidSwitch.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/TFModels.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes b/unity-environment/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes new file mode 100644 index 0000000000..11a55dca0b Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Goal.mat b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Goal.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Goal.mat rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Goal.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Goal.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Goal.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Goal.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Goal.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Goal_on.mat b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Goal_on.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Goal_on.mat rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Goal_on.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Goal_on.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Goal_on.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Goal_on.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Goal_on.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker.mat b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker.mat rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker1.mat b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker1.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker1.mat rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker1.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker1.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker1.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker1.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Materials/Materials/checker1.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab b/unity-environment/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Prefabs/Agent.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity index 4fd7c54e5d..435caf4e2d 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 762086411} - m_IndirectSpecularColor: {r: 0.4465785, g: 0.49641252, b: 0.574817, a: 1} + m_IndirectSpecularColor: {r: 0.4465934, g: 0.49642956, b: 0.5748249, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -313,6 +313,29 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 2f13abef2db804f96bdc7692a1dcf2b2, type: 2} m_IsPrefabParent: 0 +--- !u!114 &273826241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 6eda13e905c504296ab2533939a59646, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 846768605} --- !u!1 &330647278 GameObject: m_ObjectHideFlags: 0 @@ -398,19 +421,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &528306545 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 846768605} ---- !u!114 &589219526 +--- !u!114 &371770121 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -419,35 +430,12 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] + continuousPlayerActions: [] discretePlayerActions: [] - brain: {fileID: 846768605} ---- !u!114 &608621039 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 6eda13e905c504296ab2533939a59646, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action + defaultAction: -1 brain: {fileID: 846768605} --- !u!1001 &624846107 Prefab: @@ -500,7 +488,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 2f13abef2db804f96bdc7692a1dcf2b2, type: 2} m_IsPrefabParent: 0 ---- !u!114 &640077483 +--- !u!114 &699600799 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -508,11 +496,10 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 0} + brain: {fileID: 846768605} --- !u!1001 &716814932 Prefab: m_ObjectHideFlags: 0 @@ -723,8 +710,7 @@ MonoBehaviour: brainParameters: vectorObservationSize: 33 numStackedVectorObservations: 1 - vectorActionSize: 04000000 - test: 010000000200000003000000 + vectorActionSize: 4 cameraResolutions: [] vectorActionDescriptions: - @@ -732,13 +718,14 @@ MonoBehaviour: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 589219526} - - {fileID: 640077483} - - {fileID: 528306545} - - {fileID: 608621039} - instanceID: 110728 + - {fileID: 371770121} + - {fileID: 1931636486} + - {fileID: 699600799} + - {fileID: 273826241} + instanceID: 45202 --- !u!1001 &987691372 Prefab: m_ObjectHideFlags: 0 @@ -1427,6 +1414,19 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0} +--- !u!114 &1931636486 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1001 &2041964764 Prefab: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherDecision.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherGoal.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/TFModels.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.bytes b/unity-environment/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.bytes similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.bytes rename to unity-environment/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.bytes diff --git a/UnitySDK/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Reacher/TFModels/Reacher.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Agent.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Agent.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Agent.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Agent.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Agent.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Agent.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Agent.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Agent.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Ball.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Ball.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Ball.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Ball.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Ball.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Ball.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Ball.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Ball.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Block.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Block.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Block.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Block.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Block.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Block.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Block.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Block.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/BlueAgent.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/BlueAgent.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/BlueAgent.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/BlueAgent.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/BlueAgent.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/BlueAgent.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/BlueAgent.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/BlueAgent.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerGoal.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerGoal.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerGoal.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerGoal.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerGoal.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerGoal.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerGoal.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerGoal.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerMany.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerMany.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerMany.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerMany.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerMany.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerMany.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerMany.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerMany.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerRectangle.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerRectangle.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerRectangle.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerRectangle.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerRectangle.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerRectangle.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerRectangle.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerRectangle.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerSquare.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerSquare.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerSquare.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerSquare.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerSquare.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerSquare.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerSquare.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerSquare.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerTexture.png b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerTexture.png similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerTexture.png rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerTexture.png diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerTexture.png.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerTexture.png.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerTexture.png.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/CheckerTexture.png.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/DarkGridFloor.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/DarkGridFloor.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/DarkGridFloor.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/DarkGridFloor.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/DarkGridFloor.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/DarkGridFloor.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/DarkGridFloor.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/DarkGridFloor.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/FailGround.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/FailGround.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/FailGround.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/FailGround.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/FailGround.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/FailGround.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/FailGround.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/FailGround.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Goal.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Goal.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Goal.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Goal.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Goal.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Goal.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Goal.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Goal.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Grass.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Grass.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Grass.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Grass.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Grass.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Grass.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Grass.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Grass.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/GrassTexture.png b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/GrassTexture.png similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/GrassTexture.png rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/GrassTexture.png diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/GrassTexture.png.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/GrassTexture.png.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/GrassTexture.png.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/GrassTexture.png.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Ground.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Ground.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Ground.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Ground.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Ground.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Ground.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Ground.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Ground.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloor.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloor.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloor.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloor.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloor.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloor.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloor.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloor.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloorSquare.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloorSquare.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloorSquare.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloorSquare.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloorSquare.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloorSquare.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloorSquare.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/LightGridFloorSquare.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Obstacle.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Obstacle.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Obstacle.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Obstacle.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Obstacle.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Obstacle.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Obstacle.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Obstacle.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/RedAgent.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/RedAgent.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/RedAgent.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/RedAgent.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/RedAgent.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/RedAgent.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/RedAgent.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/RedAgent.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/SuccessGround.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/SuccessGround.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/SuccessGround.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/SuccessGround.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/SuccessGround.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/SuccessGround.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/SuccessGround.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/SuccessGround.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Wall.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Wall.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Wall.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Wall.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Wall.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Wall.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/Wall.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/Wall.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/White.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/White.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/White.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/White.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/White.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/White.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/White.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/White.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTexture.png b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTexture.png similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTexture.png rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTexture.png diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTexture.png.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTexture.png.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTexture.png.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTexture.png.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTextureWhite.psd b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTextureWhite.psd similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTextureWhite.psd rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTextureWhite.psd diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTextureWhite.psd.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTextureWhite.psd.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTextureWhite.psd.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/gridTextureWhite.psd.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGreen.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGreen.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGreen.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGreen.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGreen.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGreen.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGreen.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGreen.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGrey.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGrey.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGrey.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGrey.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGrey.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGrey.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGrey.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundGrey.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundRed.mat b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundRed.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundRed.mat rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundRed.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundRed.mat.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundRed.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Materials/groundRed.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Materials/groundRed.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/AdjustTrainingTimescale.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/Area.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/CameraFollow.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/FlyCamera.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/GroundContact.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs similarity index 73% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs index a8856042a5..8745395d01 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs +++ b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs @@ -9,12 +9,14 @@ public class RandomDecision : MonoBehaviour, Decision { BrainParameters brainParameters; SpaceType actionSpaceType; + int actionSpaceSize; public void Awake() { brainParameters = gameObject.GetComponent().brainParameters; actionSpaceType = brainParameters.vectorActionSpaceType; + actionSpaceSize = brainParameters.vectorActionSize; } public float[] Decide( @@ -28,22 +30,15 @@ public float[] Decide( { List act = new List(); - for (int i = 0; i < brainParameters.vectorActionSize[0]; i++) + for (int i = 0; i < actionSpaceSize; i++) { act.Add(2 * Random.value - 1); } return act.ToArray(); } - else - { - float[] act = new float[brainParameters.vectorActionSize.Length]; - for (int i = 0; i < brainParameters.vectorActionSize.Length; i++) - { - act[i]=Random.Range(0, brainParameters.vectorActionSize[i]); - } - return act; - } + + return new float[1] {Random.Range(0, actionSpaceSize)}; } public List MakeMemory( diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RandomDecision.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/RayPerception.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs.meta b/unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetContact.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/Bouncy.physicMaterial b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/Bouncy.physicMaterial similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/Bouncy.physicMaterial rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/Bouncy.physicMaterial diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/Bouncy.physicMaterial.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/Bouncy.physicMaterial.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/Bouncy.physicMaterial.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/Bouncy.physicMaterial.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/Clear.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/Clear.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/Clear.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/Clear.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/Clear.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/Clear.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/Clear.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/Clear.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/ClearWall.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/ClearWall.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/ClearWall.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/ClearWall.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/ClearWall.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/ClearWall.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/ClearWall.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/ClearWall.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/NoFriction.physicMaterial b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/NoFriction.physicMaterial similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/NoFriction.physicMaterial rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/NoFriction.physicMaterial diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/NoFriction.physicMaterial.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/NoFriction.physicMaterial.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/NoFriction.physicMaterial.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/NoFriction.physicMaterial.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/black.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/black.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/black.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/black.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/black.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/black.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/black.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/black.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/blueGoal.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/blueGoal.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/blueGoal.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/blueGoal.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/blueGoal.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/blueGoal.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/blueGoal.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/blueGoal.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/grass.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/grass.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/grass.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/grass.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/grass.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/grass.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/grass.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/grass.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/redGoal.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/redGoal.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/redGoal.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/redGoal.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/redGoal.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/redGoal.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/redGoal.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/redGoal.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/reducedFriction.physicMaterial b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/reducedFriction.physicMaterial similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/reducedFriction.physicMaterial rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/reducedFriction.physicMaterial diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/reducedFriction.physicMaterial.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/reducedFriction.physicMaterial.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/reducedFriction.physicMaterial.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/reducedFriction.physicMaterial.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/rollyCubeFriction.physicMaterial b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/rollyCubeFriction.physicMaterial similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/rollyCubeFriction.physicMaterial rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/rollyCubeFriction.physicMaterial diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/rollyCubeFriction.physicMaterial.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/rollyCubeFriction.physicMaterial.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/rollyCubeFriction.physicMaterial.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/rollyCubeFriction.physicMaterial.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/swatch.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/swatch.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/swatch.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/swatch.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/swatch.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/swatch.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/swatch.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/swatch.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/swatchMaster.psd b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/swatchMaster.psd similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/swatchMaster.psd rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/swatchMaster.psd diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/swatchMaster.psd.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/swatchMaster.psd.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/swatchMaster.psd.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/swatchMaster.psd.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/white.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/white.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/white.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/white.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/white.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/white.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/white.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/white.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/zeroFriction.physicMaterial b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/zeroFriction.physicMaterial similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/zeroFriction.physicMaterial rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/zeroFriction.physicMaterial diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/zeroFriction.physicMaterial.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/zeroFriction.physicMaterial.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Materials/zeroFriction.physicMaterial.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Materials/zeroFriction.physicMaterial.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/Black-Ball-Material.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/Black-Ball-Material.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/Black-Ball-Material.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/Black-Ball-Material.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/Black-Ball-Material.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/Black-Ball-Material.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/Black-Ball-Material.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/Black-Ball-Material.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/White-Ball-Material.mat b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/White-Ball-Material.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/White-Ball-Material.mat rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/White-Ball-Material.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/White-Ball-Material.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/White-Ball-Material.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/White-Ball-Material.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Materials/White-Ball-Material.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes/SoccerBallMesh.fbx b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes/SoccerBallMesh.fbx similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes/SoccerBallMesh.fbx rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes/SoccerBallMesh.fbx diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes/SoccerBallMesh.fbx.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes/SoccerBallMesh.fbx.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes/SoccerBallMesh.fbx.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Meshes/SoccerBallMesh.fbx.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs/SoccerBall.prefab b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs/SoccerBall.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs/SoccerBall.prefab rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs/SoccerBall.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs/SoccerBall.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs/SoccerBall.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs/SoccerBall.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Prefabs/SoccerBall.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures/SoccerBallNormalMap.png b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures/SoccerBallNormalMap.png similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures/SoccerBallNormalMap.png rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures/SoccerBallNormalMap.png diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures/SoccerBallNormalMap.png.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures/SoccerBallNormalMap.png.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures/SoccerBallNormalMap.png.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerBall/Textures/SoccerBallNormalMap.png.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity similarity index 97% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity index 85b4699862..a7f031a2dd 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 8 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -39,6 +39,7 @@ RenderSettings: m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -54,11 +55,10 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 9 + serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 + m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -416,7 +416,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ab518b4d19ded4d9dbe6fec8239e88b8, type: 2} m_IsPrefabParent: 0 ---- !u!114 &314802124 +--- !u!114 &471582580 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -424,20 +424,22 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 0 - graphModel: {fileID: 4900000, guid: 4856a334c6d4a4984ba1cc6610f31b20, type: 3} - graphScope: GoalieBrain - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action + brain: {fileID: 1379650626} +--- !u!114 &509362302 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 brain: {fileID: 1379650626} --- !u!1001 &647042012 Prefab: @@ -584,7 +586,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 30, y: -129.808, z: -374.526} ---- !u!114 &770251649 +--- !u!114 &799939212 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -592,20 +594,9 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 0 - graphModel: {fileID: 4900000, guid: 4856a334c6d4a4984ba1cc6610f31b20, type: 3} - graphScope: StrikerBrain - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action brain: {fileID: 1890643319} --- !u!1 &859908934 GameObject: @@ -672,55 +663,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 152.6, y: -129.808, z: -374.526} ---- !u!114 &968475264 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 1 - value: 1 - - key: 115 - index: 1 - value: -1 - - key: 32 - index: 2 - value: 1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 4 - - key: 100 - branchIndex: 0 - value: 3 - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 113 - branchIndex: 0 - value: 5 - - key: 101 - branchIndex: 0 - value: 6 - brain: {fileID: 1890643319} --- !u!1 &1009000883 GameObject: m_ObjectHideFlags: 0 @@ -786,7 +728,7 @@ Camera: m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 ---- !u!114 &1075281392 +--- !u!114 &1224943134 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -794,11 +736,12 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - brain: {fileID: 1379650626} ---- !u!114 &1342836196 + broadcast: 1 + brain: {fileID: 1890643319} +--- !u!114 &1368352903 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -807,10 +750,10 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - keyContinuousPlayerActions: + continuousPlayerActions: - key: 97 index: 0 value: -1 @@ -823,21 +766,24 @@ MonoBehaviour: - key: 115 index: 1 value: -1 - axisContinuousPlayerActions: [] + - key: 32 + index: 2 + value: 1 discretePlayerActions: + - key: 97 + value: 3 + - key: 100 + value: 2 - key: 119 - branchIndex: 0 - value: 1 + value: 0 - key: 115 - branchIndex: 0 - value: 2 - - key: 97 - branchIndex: 0 + value: 1 + - key: 113 value: 4 - - key: 100 - branchIndex: 0 - value: 3 - brain: {fileID: 1379650626} + - key: 101 + value: 5 + defaultAction: -1 + brain: {fileID: 1890643319} --- !u!1 &1379650624 GameObject: m_ObjectHideFlags: 0 @@ -884,18 +830,45 @@ MonoBehaviour: brainParameters: vectorObservationSize: 112 numStackedVectorObservations: 3 - vectorActionSize: 05000000 + vectorActionSize: 4 cameraResolutions: [] vectorActionDescriptions: - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1342836196} - - {fileID: 1692750958} - - {fileID: 1075281392} - - {fileID: 314802124} - instanceID: 12158 + - {fileID: 2029276189} + - {fileID: 509362302} + - {fileID: 471582580} + - {fileID: 1510064988} + instanceID: 30588 +--- !u!114 &1510064988 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 0 + graphModel: {fileID: 4900000, guid: b9906fad056824da9b9eddb0e5f983ba, type: 3} + graphScope: GoalieBrain + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1379650626} --- !u!1001 &1566111957 Prefab: m_ObjectHideFlags: 0 @@ -1047,44 +1020,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1588701606 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 1890643319} ---- !u!114 &1692750958 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 1379650626} ---- !u!114 &1846345745 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 1890643319} --- !u!1001 &1870405447 Prefab: m_ObjectHideFlags: 0 @@ -1147,6 +1082,29 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ab518b4d19ded4d9dbe6fec8239e88b8, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1888187443 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 0 + graphModel: {fileID: 4900000, guid: b9906fad056824da9b9eddb0e5f983ba, type: 3} + graphScope: StrikerBrain + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1890643319} --- !u!1 &1890643317 GameObject: m_ObjectHideFlags: 0 @@ -1193,18 +1151,24 @@ MonoBehaviour: brainParameters: vectorObservationSize: 112 numStackedVectorObservations: 3 - vectorActionSize: 07000000 + vectorActionSize: 6 cameraResolutions: [] vectorActionDescriptions: - + - + - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 968475264} - - {fileID: 1846345745} - - {fileID: 1588701606} - - {fileID: 770251649} - instanceID: 12174 + - {fileID: 1368352903} + - {fileID: 1224943134} + - {fileID: 799939212} + - {fileID: 1888187443} + instanceID: 30610 --- !u!1001 &1937312405 Prefab: m_ObjectHideFlags: 0 @@ -1365,3 +1329,39 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: ab518b4d19ded4d9dbe6fec8239e88b8, type: 2} m_IsPrefabParent: 0 +--- !u!114 &2029276189 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 1 + value: 1 + - key: 115 + index: 1 + value: -1 + discretePlayerActions: + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 97 + value: 3 + - key: 100 + value: 2 + defaultAction: -1 + brain: {fileID: 1379650626} diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs index 035b966359..9d5c3c6ee4 100755 --- a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs +++ b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs @@ -94,17 +94,17 @@ public void MoveAgent(float[] act) kickPower = 0f; switch (action) { - case 1: + case 0: dirToGo = transform.forward * 1f; kickPower = 1f; break; - case 2: + case 1: dirToGo = transform.forward * -1f; break; - case 4: + case 3: dirToGo = transform.right * -1f; break; - case 3: + case 2: dirToGo = transform.right * 1f; break; } @@ -114,23 +114,23 @@ public void MoveAgent(float[] act) kickPower = 0f; switch (action) { - case 1: + case 0: dirToGo = transform.forward * 1f; kickPower = 1f; break; - case 2: + case 1: dirToGo = transform.forward * -1f; break; - case 3: + case 2: rotateDir = transform.up * 1f; break; - case 4: + case 3: rotateDir = transform.up * -1f; break; - case 5: + case 4: dirToGo = transform.right * -0.75f; break; - case 6: + case 5: dirToGo = transform.right * 0.75f; break; } diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerBallController.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Soccer/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/TFModels.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/Soccer/TFModels/Soccer.bytes b/unity-environment/Assets/ML-Agents/Examples/Soccer/TFModels/Soccer.bytes new file mode 100644 index 0000000000..df1123166b Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/Soccer/TFModels/Soccer.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Soccer/TFModels/Soccer.bytes.meta similarity index 75% rename from UnitySDK/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Soccer/TFModels/Soccer.bytes.meta index c41dbfdc7e..3b76d5ba57 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Basic/TFModels/Basic.bytes.meta +++ b/unity-environment/Assets/ML-Agents/Examples/Soccer/TFModels/Soccer.bytes.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 781e74f5e76a543ec90032529776c2d1 +guid: b9906fad056824da9b9eddb0e5f983ba TextScriptImporter: externalObjects: {} userData: diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template.meta b/unity-environment/Assets/ML-Agents/Examples/Template.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template.meta rename to unity-environment/Assets/ML-Agents/Examples/Template.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scene.unity b/unity-environment/Assets/ML-Agents/Examples/Template/Scene.unity similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scene.unity rename to unity-environment/Assets/ML-Agents/Examples/Template/Scene.unity diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scene.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Template/Scene.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scene.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Template/Scene.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Template/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Template/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs b/unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs rename to unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Template/Scripts/TemplateDecision.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/NetMat.mat b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/NetMat.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/NetMat.mat rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/NetMat.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/NetMat.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/NetMat.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/NetMat.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/NetMat.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/ballMat.physicMaterial b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/ballMat.physicMaterial similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/ballMat.physicMaterial rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/ballMat.physicMaterial diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/ballMat.physicMaterial.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/ballMat.physicMaterial.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/ballMat.physicMaterial.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/ballMat.physicMaterial.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/bounce.physicMaterial b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/bounce.physicMaterial similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/bounce.physicMaterial rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/bounce.physicMaterial diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/bounce.physicMaterial.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/bounce.physicMaterial.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/bounce.physicMaterial.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/bounce.physicMaterial.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/invisible.mat b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/invisible.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/invisible.mat rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/invisible.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/invisible.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/invisible.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/invisible.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/invisible.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/racketMat.physicMaterial b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/racketMat.physicMaterial similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/racketMat.physicMaterial rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/racketMat.physicMaterial diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/racketMat.physicMaterial.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/racketMat.physicMaterial.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/racketMat.physicMaterial.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/racketMat.physicMaterial.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/sand.mat b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/sand.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/sand.mat rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/sand.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/sand.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/sand.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Materials/sand.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Materials/sand.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab b/unity-environment/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Racket.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Racket.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Racket.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Racket.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Racket/Racket.obj b/unity-environment/Assets/ML-Agents/Examples/Tennis/Racket/Racket.obj similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Racket/Racket.obj rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Racket/Racket.obj diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Racket/Racket.obj.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Racket/Racket.obj.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Racket/Racket.obj.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Racket/Racket.obj.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity index a2b7b47c20..91d1d73886 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 9 + serializedVersion: 8 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -39,7 +39,6 @@ RenderSettings: m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -55,10 +54,11 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 10 + serializedVersion: 9 m_Resolution: 2 m_BakeResolution: 40 - m_AtlasSize: 1024 + m_TextureWidth: 1024 + m_TextureHeight: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -175,19 +175,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &243302851 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 459283648} --- !u!1001 &258257356 Prefab: m_ObjectHideFlags: 0 @@ -328,6 +315,18 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 812997c7bc2544b6f927ff684c03450f, type: 2} m_IsPrefabParent: 0 +--- !u!114 &367165405 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 459283648} --- !u!1001 &393884112 Prefab: m_ObjectHideFlags: 0 @@ -441,20 +440,33 @@ MonoBehaviour: brainParameters: vectorObservationSize: 8 numStackedVectorObservations: 3 - vectorActionSize: 02000000 - test: 010000000200000003000000 + vectorActionSize: 2 cameraResolutions: [] vectorActionDescriptions: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 2 CoreBrains: - - {fileID: 2079325999} - - {fileID: 243302851} - - {fileID: 2128861920} - - {fileID: 2122871904} - instanceID: 111616 + - {fileID: 1449936913} + - {fileID: 1617489615} + - {fileID: 367165405} + - {fileID: 1779483614} + instanceID: 67242 +--- !u!114 &464350449 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1001 &530994421 Prefab: m_ObjectHideFlags: 0 @@ -595,18 +607,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 812997c7bc2544b6f927ff684c03450f, type: 2} m_IsPrefabParent: 0 ---- !u!114 &640502179 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone) - m_EditorClassIdentifier: - brain: {fileID: 1948813725} --- !u!1001 &667349971 Prefab: m_ObjectHideFlags: 0 @@ -677,22 +677,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 812997c7bc2544b6f927ff684c03450f, type: 2} m_IsPrefabParent: 0 ---- !u!114 &683400721 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] - discretePlayerActions: [] - brain: {fileID: 0} --- !u!1001 &699067963 Prefab: m_ObjectHideFlags: 0 @@ -763,7 +747,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 812997c7bc2544b6f927ff684c03450f, type: 2} m_IsPrefabParent: 0 ---- !u!114 &740907580 +--- !u!114 &800428885 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -771,10 +755,14 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone) + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: m_EditorClassIdentifier: broadcast: 1 + keyContinuousPlayerActions: [] + axisContinuousPlayerActions: [] + discretePlayerActions: [] + defaultAction: 0 brain: {fileID: 0} --- !u!1001 &861437242 Prefab: @@ -893,7 +881,6 @@ Camera: m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 @@ -981,6 +968,41 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 812997c7bc2544b6f927ff684c03450f, type: 2} m_IsPrefabParent: 0 +--- !u!114 &982417201 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 0} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 0} +--- !u!114 &1008001834 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: + m_EditorClassIdentifier: + brain: {fileID: 1948813725} --- !u!1 &1022397856 GameObject: m_ObjectHideFlags: 0 @@ -1413,29 +1435,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} ---- !u!114 &1190772550 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 0} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 0} --- !u!1001 &1193061827 Prefab: m_ObjectHideFlags: 0 @@ -1506,6 +1505,53 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 812997c7bc2544b6f927ff684c03450f, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1449936913 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 32 + index: 1 + value: 1 + axisContinuousPlayerActions: [] + discretePlayerActions: + - key: 276 + value: 0 + - key: 275 + value: 1 + - key: 0 + value: 3 + - key: 273 + value: 2 + defaultAction: 3 + brain: {fileID: 459283648} +--- !u!114 &1617489615 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 459283648} --- !u!1001 &1667694556 Prefab: m_ObjectHideFlags: 0 @@ -1633,6 +1679,29 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 60, y: 30, z: 0} +--- !u!114 &1779483614 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: c428950472279436d97dd5fa123febc4, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 459283648} --- !u!1001 &1834785653 Prefab: m_ObjectHideFlags: 0 @@ -1890,20 +1959,20 @@ MonoBehaviour: brainParameters: vectorObservationSize: 8 numStackedVectorObservations: 3 - vectorActionSize: 02000000 - test: 010000000200000003000000 + vectorActionSize: 2 cameraResolutions: [] vectorActionDescriptions: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 2 CoreBrains: - - {fileID: 683400721} - - {fileID: 740907580} - - {fileID: 640502179} - - {fileID: 1190772550} - instanceID: 111700 + - {fileID: 800428885} + - {fileID: 464350449} + - {fileID: 1008001834} + - {fileID: 982417201} + instanceID: 67322 --- !u!1001 &1965335106 Prefab: m_ObjectHideFlags: 0 @@ -2048,75 +2117,3 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 2073469450} ---- !u!114 &2079325999 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 32 - index: 1 - value: 1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 276 - branchIndex: 0 - value: 0 - - key: 275 - branchIndex: 0 - value: 1 - - key: 0 - branchIndex: 0 - value: 3 - - key: 273 - branchIndex: 0 - value: 2 - brain: {fileID: 459283648} ---- !u!114 &2122871904 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: c428950472279436d97dd5fa123febc4, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 459283648} ---- !u!114 &2128861920 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 459283648} diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity similarity index 98% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity index 8219085867..a6ac741fac 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity @@ -113,29 +113,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!114 &12604319 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 57cd436ad0d12422ba379708e135815b, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 1948813725} --- !u!1 &32822935 GameObject: m_ObjectHideFlags: 0 @@ -198,6 +175,39 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &54563437 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 32 + index: 1 + value: 1 + discretePlayerActions: + - key: 276 + value: 0 + - key: 275 + value: 1 + - key: 0 + value: 3 + - key: 273 + value: 2 + defaultAction: 3 + brain: {fileID: 459283648} --- !u!1 &74527003 GameObject: m_ObjectHideFlags: 0 @@ -249,29 +259,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &218779520 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: c428950472279436d97dd5fa123febc4, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 459283648} --- !u!1 &252416403 GameObject: m_ObjectHideFlags: 0 @@ -362,46 +349,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 252416403} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &257206622 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -3 - - key: 100 - index: 0 - value: 3 - - key: 119 - index: 1 - value: 3 - - key: 115 - index: 1 - value: -3 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 97 - branchIndex: 0 - value: 0 - - key: 100 - branchIndex: 0 - value: 1 - - key: 0 - branchIndex: 0 - value: 3 - - key: 32 - branchIndex: 0 - value: 2 - brain: {fileID: 1948813725} --- !u!1 &348265181 GameObject: m_ObjectHideFlags: 0 @@ -513,6 +460,18 @@ MonoBehaviour: m_EditorClassIdentifier: recordKey: 114 resetKey: 99 +--- !u!114 &363101488 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 1948813725} --- !u!1 &384135573 GameObject: m_ObjectHideFlags: 0 @@ -722,20 +681,20 @@ MonoBehaviour: brainParameters: vectorObservationSize: 8 numStackedVectorObservations: 3 - vectorActionSize: 02000000 - test: 010000000200000003000000 + vectorActionSize: 2 cameraResolutions: [] vectorActionDescriptions: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1303570715} - - {fileID: 1736880876} - - {fileID: 1266831202} - - {fileID: 218779520} - instanceID: 112040 + - {fileID: 54563437} + - {fileID: 1388474283} + - {fileID: 1169085825} + - {fileID: 1934981926} + instanceID: 20914 --- !u!1 &574731321 GameObject: m_ObjectHideFlags: 0 @@ -916,6 +875,19 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 651249246} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &943061462 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1 &957430531 GameObject: m_ObjectHideFlags: 0 @@ -1160,6 +1132,18 @@ Transform: m_Father: {fileID: 74527005} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1169085825 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 459283648} --- !u!1 &1169291193 GameObject: m_ObjectHideFlags: 0 @@ -1246,6 +1230,42 @@ Transform: m_Father: {fileID: 74527005} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1181934634 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 0 + value: -3 + - key: 100 + index: 0 + value: 3 + - key: 119 + index: 1 + value: 3 + - key: 115 + index: 1 + value: -3 + discretePlayerActions: + - key: 97 + value: 0 + - key: 100 + value: 1 + - key: 0 + value: 3 + - key: 32 + value: 2 + defaultAction: 3 + brain: {fileID: 1948813725} --- !u!1 &1184319689 GameObject: m_ObjectHideFlags: 0 @@ -1431,7 +1451,7 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1186016253} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1187859618 +--- !u!114 &1388474283 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1440,23 +1460,11 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - brain: {fileID: 0} ---- !u!114 &1266831202 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: brain: {fileID: 459283648} ---- !u!114 &1303570715 +--- !u!114 &1417428423 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1464,35 +1472,21 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 32 - index: 1 - value: 1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 276 - branchIndex: 0 - value: 0 - - key: 275 - branchIndex: 0 - value: 1 - - key: 0 - branchIndex: 0 - value: 3 - - key: 273 - branchIndex: 0 - value: 2 - brain: {fileID: 459283648} + graphModel: {fileID: 4900000, guid: 57cd436ad0d12422ba379708e135815b, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 1948813725} --- !u!1 &1506037367 GameObject: m_ObjectHideFlags: 0 @@ -1583,19 +1577,6 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1506037367} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1736880876 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 459283648} --- !u!1 &1749132593 GameObject: m_ObjectHideFlags: 0 @@ -1942,7 +1923,7 @@ Transform: m_Father: {fileID: 74527005} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: -55} ---- !u!114 &1941356316 +--- !u!114 &1934981926 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1950,10 +1931,21 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - brain: {fileID: 1948813725} + broadcast: 1 + graphModel: {fileID: 4900000, guid: c428950472279436d97dd5fa123febc4, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 459283648} --- !u!1 &1948813723 GameObject: m_ObjectHideFlags: 0 @@ -1997,20 +1989,20 @@ MonoBehaviour: brainParameters: vectorObservationSize: 8 numStackedVectorObservations: 3 - vectorActionSize: 02000000 - test: 010000000200000003000000 + vectorActionSize: 2 cameraResolutions: [] vectorActionDescriptions: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 2 CoreBrains: - - {fileID: 257206622} - - {fileID: 1187859618} - - {fileID: 1941356316} - - {fileID: 12604319} - instanceID: 112184 + - {fileID: 1181934634} + - {fileID: 943061462} + - {fileID: 363101488} + - {fileID: 1417428423} + instanceID: 21056 --- !u!1 &2073469450 GameObject: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scenes/TennisIL.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/TFModels.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.bytes b/unity-environment/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.bytes similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.bytes rename to unity-environment/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.bytes diff --git a/UnitySDK/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Tennis/TFModels/Tennis.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker.meta b/unity-environment/Assets/ML-Agents/Examples/Walker.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Materials.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Materials.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Materials.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Materials.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Materials/LightGridFloorWalker.mat b/unity-environment/Assets/ML-Agents/Examples/Walker/Materials/LightGridFloorWalker.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Materials/LightGridFloorWalker.mat rename to unity-environment/Assets/ML-Agents/Examples/Walker/Materials/LightGridFloorWalker.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Materials/LightGridFloorWalker.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Materials/LightGridFloorWalker.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Materials/LightGridFloorWalker.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Materials/LightGridFloorWalker.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Materials/WalkerHeadband.mat b/unity-environment/Assets/ML-Agents/Examples/Walker/Materials/WalkerHeadband.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Materials/WalkerHeadband.mat rename to unity-environment/Assets/ML-Agents/Examples/Walker/Materials/WalkerHeadband.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Materials/WalkerHeadband.mat.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Materials/WalkerHeadband.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Materials/WalkerHeadband.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Materials/WalkerHeadband.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/TARGET.prefab b/unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/TARGET.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/TARGET.prefab rename to unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/TARGET.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/TARGET.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/TARGET.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/TARGET.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/TARGET.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerAgent.prefab b/unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerAgent.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerAgent.prefab rename to unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerAgent.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerAgent.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerAgent.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerAgent.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerAgent.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab b/unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab rename to unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerPair.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity b/unity-environment/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity similarity index 99% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity rename to unity-environment/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity index 2e03d0158c..6b2711ff41 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity +++ b/unity-environment/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity @@ -207,8 +207,7 @@ MonoBehaviour: brainParameters: vectorObservationSize: 212 numStackedVectorObservations: 1 - vectorActionSize: 27000000 - test: 010000000200000003000000 + vectorActionSize: 39 cameraResolutions: [] vectorActionDescriptions: - @@ -251,13 +250,14 @@ MonoBehaviour: - - vectorActionSpaceType: 1 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1232371314} - - {fileID: 1957528905} - - {fileID: 347738039} - - {fileID: 2085630447} - instanceID: 112440 + - {fileID: 245734037} + - {fileID: 1489685079} + - {fileID: 944836540} + - {fileID: 404442764} + instanceID: 44496 --- !u!1001 &155890235 Prefab: m_ObjectHideFlags: 0 @@ -309,12 +309,29 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 94dced9d2186d4a76b970fb18ef6d7a6, type: 2} m_IsPrefabParent: 0 +--- !u!114 &245734037 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + keyContinuousPlayerActions: [] + axisContinuousPlayerActions: [] + discretePlayerActions: [] + defaultAction: 0 + brain: {fileID: 48753806} --- !u!4 &251893594 stripped Transform: m_PrefabParentObject: {fileID: 4333477265252406, guid: 94dced9d2186d4a76b970fb18ef6d7a6, type: 2} m_PrefabInternal: {fileID: 1821407821} ---- !u!114 &347738039 +--- !u!114 &404442764 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -322,9 +339,20 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: 8d3f9a4b927984343b18c82559165047, type: 3} + graphScope: + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action brain: {fileID: 48753806} --- !u!1 &459314944 GameObject: @@ -715,6 +743,18 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 94dced9d2186d4a76b970fb18ef6d7a6, type: 2} m_IsPrefabParent: 0 +--- !u!114 &944836540 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + brain: {fileID: 48753806} --- !u!1001 &952648926 Prefab: m_ObjectHideFlags: 0 @@ -921,22 +961,6 @@ Transform: m_Father: {fileID: 528661459} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} ---- !u!114 &1232371314 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: [] - axisContinuousPlayerActions: [] - discretePlayerActions: [] - brain: {fileID: 48753806} --- !u!1 &1409355320 GameObject: m_ObjectHideFlags: 0 @@ -1126,6 +1150,19 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 94dced9d2186d4a76b970fb18ef6d7a6, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1489685079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 48753806} --- !u!1001 &1518272637 Prefab: m_ObjectHideFlags: 0 @@ -1675,19 +1712,6 @@ Transform: m_Father: {fileID: 528661459} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1957528905 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 48753806} --- !u!1 &1966767183 GameObject: m_ObjectHideFlags: 0 @@ -1959,26 +1983,3 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 94dced9d2186d4a76b970fb18ef6d7a6, type: 2} m_IsPrefabParent: 0 ---- !u!114 &2085630447 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: 8d3f9a4b927984343b18c82559165047, type: 3} - graphScope: - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action - brain: {fileID: 48753806} diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs b/unity-environment/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/TFModels.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/TFModels/Walker.bytes b/unity-environment/Assets/ML-Agents/Examples/Walker/TFModels/Walker.bytes similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/TFModels/Walker.bytes rename to unity-environment/Assets/ML-Agents/Examples/Walker/TFModels/Walker.bytes diff --git a/UnitySDK/Assets/ML-Agents/Examples/Walker/TFModels/Walker.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/Walker/TFModels/Walker.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/Walker/TFModels/Walker.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/Walker/TFModels/Walker.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Material.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Material.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Material.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Material.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Material/TransparentWall.mat b/unity-environment/Assets/ML-Agents/Examples/WallJump/Material/TransparentWall.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Material/TransparentWall.mat rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Material/TransparentWall.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Material/TransparentWall.mat.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Material/TransparentWall.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Material/TransparentWall.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Material/TransparentWall.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Material/spawnVolumeMaterial.mat b/unity-environment/Assets/ML-Agents/Examples/WallJump/Material/spawnVolumeMaterial.mat similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Material/spawnVolumeMaterial.mat rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Material/spawnVolumeMaterial.mat diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Material/spawnVolumeMaterial.mat.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Material/spawnVolumeMaterial.mat.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Material/spawnVolumeMaterial.mat.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Material/spawnVolumeMaterial.mat.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Prefabs.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Prefabs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Prefabs.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Prefabs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab b/unity-environment/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Prefabs/WallJumpArea.prefab.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scenes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Scenes.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity similarity index 95% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity index 1746c9a35f..4e07146167 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity +++ b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 8 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -39,6 +39,7 @@ RenderSettings: m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -54,11 +55,10 @@ LightmapSettings: m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 9 + serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 + m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -179,52 +179,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 54e3af627216447f790531de496099f0, type: 2} m_IsPrefabParent: 0 ---- !u!114 &161534442 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - keyContinuousPlayerActions: - - key: 97 - index: 0 - value: -1 - - key: 100 - index: 0 - value: 1 - - key: 119 - index: 1 - value: 1 - - key: 115 - index: 1 - value: -1 - - key: 32 - index: 2 - value: 1 - axisContinuousPlayerActions: [] - discretePlayerActions: - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 - value: 2 - - key: 100 - branchIndex: 1 - value: 2 - - key: 97 - branchIndex: 1 - value: 1 - - key: 32 - branchIndex: 3 - value: 1 - brain: {fileID: 532941885} --- !u!1001 &236193370 Prefab: m_ObjectHideFlags: 0 @@ -544,7 +498,7 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 54e3af627216447f790531de496099f0, type: 2} m_IsPrefabParent: 0 ---- !u!114 &496265275 +--- !u!114 &462177941 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -552,20 +506,9 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: fae11f80dd25b4bc4918ce5223fd8e5b, type: 3} - graphScope: BigWallBrain - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action brain: {fileID: 532941885} --- !u!1 &532941884 GameObject: @@ -599,21 +542,25 @@ MonoBehaviour: brainParameters: vectorObservationSize: 74 numStackedVectorObservations: 6 - vectorActionSize: 03000000030000000300000002000000 + vectorActionSize: 7 cameraResolutions: [] vectorActionDescriptions: - - - - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 161534442} - - {fileID: 1751070445} - - {fileID: 1126530365} - - {fileID: 496265275} - instanceID: 11672 + - {fileID: 1034383426} + - {fileID: 601795285} + - {fileID: 462177941} + - {fileID: 1189544216} + instanceID: 55828 --- !u!4 &532941886 Transform: m_ObjectHideFlags: 0 @@ -628,6 +575,19 @@ Transform: m_Father: {fileID: 1574236049} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &601795285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + brain: {fileID: 0} --- !u!1 &681747649 GameObject: m_ObjectHideFlags: 0 @@ -674,21 +634,25 @@ MonoBehaviour: brainParameters: vectorObservationSize: 74 numStackedVectorObservations: 6 - vectorActionSize: 03000000030000000300000002000000 + vectorActionSize: 7 cameraResolutions: [] vectorActionDescriptions: - - - - + - + - + - vectorActionSpaceType: 0 + vectorObservationSpaceType: 1 brainType: 0 CoreBrains: - - {fileID: 1102504163} - - {fileID: 1318475610} - - {fileID: 1609558548} - - {fileID: 927708501} - instanceID: 11682 + - {fileID: 1779094028} + - {fileID: 1823054523} + - {fileID: 980883234} + - {fileID: 1136019759} + instanceID: 55838 --- !u!1001 &684891805 Prefab: m_ObjectHideFlags: 0 @@ -890,15 +854,10 @@ Prefab: value: objectReference: {fileID: 13400000, guid: 2053f160e462a428ab794446c043b144, type: 2} - - target: {fileID: 114925928594762506, guid: 54e3af627216447f790531de496099f0, - type: 2} - propertyPath: brain - value: - objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 54e3af627216447f790531de496099f0, type: 2} m_IsPrefabParent: 0 ---- !u!114 &927708501 +--- !u!114 &980883234 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -906,20 +865,9 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} - m_Name: (Clone)(Clone) + m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: - broadcast: 1 - graphModel: {fileID: 4900000, guid: fae11f80dd25b4bc4918ce5223fd8e5b, type: 3} - graphScope: SmallWallBrain - graphPlaceholders: [] - BatchSizePlaceholderName: batch_size - VectorObservationPlacholderName: vector_observation - RecurrentInPlaceholderName: recurrent_in - RecurrentOutPlaceholderName: recurrent_out - VisualObservationPlaceholderName: [] - ActionPlaceholderName: action - PreviousActionPlaceholderName: prev_action brain: {fileID: 681747651} --- !u!1 &1009000883 GameObject: @@ -986,7 +934,7 @@ Camera: m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 ---- !u!114 &1102504163 +--- !u!114 &1034383426 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -995,10 +943,10 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - keyContinuousPlayerActions: + continuousPlayerActions: - key: 97 index: 0 value: -1 @@ -1014,24 +962,19 @@ MonoBehaviour: - key: 32 index: 2 value: 1 - axisContinuousPlayerActions: [] discretePlayerActions: - - key: 119 - branchIndex: 0 - value: 1 - - key: 115 - branchIndex: 0 + - key: 97 value: 2 - key: 100 - branchIndex: 1 - value: 2 - - key: 97 - branchIndex: 1 + value: 3 + - key: 119 + value: 0 + - key: 115 value: 1 - key: 32 - branchIndex: 3 - value: 1 - brain: {fileID: 681747651} + value: 6 + defaultAction: -1 + brain: {fileID: 532941885} --- !u!1001 &1121924008 Prefab: m_ObjectHideFlags: 0 @@ -1097,18 +1040,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 54e3af627216447f790531de496099f0, type: 2} m_IsPrefabParent: 0 ---- !u!114 &1126530365 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - brain: {fileID: 532941885} --- !u!1001 &1127039166 Prefab: m_ObjectHideFlags: 0 @@ -1174,6 +1105,52 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 54e3af627216447f790531de496099f0, type: 2} m_IsPrefabParent: 0 +--- !u!114 &1136019759 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: fae11f80dd25b4bc4918ce5223fd8e5b, type: 3} + graphScope: SmallWallBrain + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 681747651} +--- !u!114 &1189544216 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b23992c8eb17439887f5e944bf04a40, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_EditorClassIdentifier: + broadcast: 1 + graphModel: {fileID: 4900000, guid: fae11f80dd25b4bc4918ce5223fd8e5b, type: 3} + graphScope: BigWallBrain + graphPlaceholders: [] + BatchSizePlaceholderName: batch_size + VectorObservationPlacholderName: vector_observation + RecurrentInPlaceholderName: recurrent_in + RecurrentOutPlaceholderName: recurrent_out + VisualObservationPlaceholderName: [] + ActionPlaceholderName: action + PreviousActionPlaceholderName: prev_action + brain: {fileID: 532941885} --- !u!1001 &1192162776 Prefab: m_ObjectHideFlags: 0 @@ -1490,19 +1467,6 @@ Transform: m_Father: {fileID: 318490717} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1318475610 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) - m_EditorClassIdentifier: - broadcast: 1 - brain: {fileID: 681747651} --- !u!1001 &1374385438 Prefab: m_ObjectHideFlags: 0 @@ -1740,7 +1704,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 50b93afe82bc647b581a706891913e7f, type: 3} m_Name: m_EditorClassIdentifier: - maxSteps: 0 + maxSteps: 10000 trainingConfiguration: width: 80 height: 80 @@ -1770,7 +1734,7 @@ MonoBehaviour: gravityMultiplier: 2.5 agentJumpVelocity: 777 agentJumpVelocityMaxChange: 10 ---- !u!114 &1609558548 +--- !u!114 &1779094028 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1778,11 +1742,40 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 35813a1be64e144f887d7d5f15b963fa, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Script: {fileID: 11500000, guid: 41e9bda8f3cf1492fa74926a530f6f70, type: 3} + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: + broadcast: 1 + continuousPlayerActions: + - key: 97 + index: 0 + value: -1 + - key: 100 + index: 0 + value: 1 + - key: 119 + index: 1 + value: 1 + - key: 115 + index: 1 + value: -1 + - key: 32 + index: 2 + value: 1 + discretePlayerActions: + - key: 97 + value: 2 + - key: 100 + value: 3 + - key: 119 + value: 0 + - key: 115 + value: 1 + - key: 32 + value: 6 + defaultAction: -1 brain: {fileID: 681747651} ---- !u!114 &1751070445 +--- !u!114 &1823054523 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} @@ -1791,10 +1784,10 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 943466ab374444748a364f9d6c3e2fe2, type: 3} - m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) + m_Name: (Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone)(Clone) m_EditorClassIdentifier: broadcast: 1 - brain: {fileID: 0} + brain: {fileID: 681747651} --- !u!1001 &1839574406 Prefab: m_ObjectHideFlags: 0 diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAcademy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs similarity index 78% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs index 824af9e349..60056548cd 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs +++ b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs @@ -76,49 +76,28 @@ public void Jump() /// false otherwise. /// The width of the box used to perform /// the ground check. - public bool DoGroundCheck(bool smallCheck) + public bool DoGroundCheck(float boxWidth) { - if (!smallCheck) + hitGroundColliders = new Collider[3]; + Physics.OverlapBoxNonAlloc( + gameObject.transform.position + new Vector3(0, -0.05f, 0), + new Vector3(boxWidth / 2f, 0.5f, boxWidth / 2f), + hitGroundColliders, + gameObject.transform.rotation); + bool grounded = false; + foreach (Collider col in hitGroundColliders) { - hitGroundColliders = new Collider[3]; - Physics.OverlapBoxNonAlloc( - gameObject.transform.position + new Vector3(0, -0.05f, 0), - new Vector3(0.95f / 2f, 0.5f, 0.95f / 2f), - hitGroundColliders, - gameObject.transform.rotation); - bool grounded = false; - foreach (Collider col in hitGroundColliders) - { - - if (col != null && col.transform != this.transform && - (col.CompareTag("walkableSurface") || - col.CompareTag("block") || - col.CompareTag("wall"))) - { - grounded = true; //then we're grounded - break; - } - } - return grounded; - } - else - { - - RaycastHit hit; - Physics.Raycast(transform.position + new Vector3(0, -0.05f, 0), -Vector3.up, out hit, - 1f); - if (hit.collider != null && - (hit.collider.CompareTag("walkableSurface") || - hit.collider.CompareTag("block") || - hit.collider.CompareTag("wall")) - && hit.normal.y > 0.95f) + if (col != null && col.transform != this.transform && + (col.CompareTag("walkableSurface") || + col.CompareTag("block") || + col.CompareTag("wall"))) { - return true; + grounded = true; //then we're grounded + break; } - - return false; } + return grounded; } @@ -153,7 +132,7 @@ public override void CollectObservations() Vector3 agentPos = agentRB.position - ground.transform.position; AddVectorObs(agentPos / 20f); - AddVectorObs(DoGroundCheck(true) ? 1 : 0); + AddVectorObs(DoGroundCheck(0.4f) ? 1 : 0); } /// @@ -191,33 +170,41 @@ public void MoveAgent(float[] act) { AddReward(-0.0005f); - bool smallGrounded = DoGroundCheck(true); - bool largeGrounded = DoGroundCheck(false); + bool smallGrounded = DoGroundCheck(0.4f); + bool largeGrounded = DoGroundCheck(1.0f); Vector3 dirToGo = Vector3.zero; Vector3 rotateDir = Vector3.zero; - int dirToGoForwardAction = (int) act[0]; - int rotateDirAction = (int) act[1]; - int dirToGoSideAction = (int) act[2]; - int jumpAction = (int) act[3]; - - if (dirToGoForwardAction==1) - dirToGo = transform.forward * 1f * (largeGrounded ? 1f : 0.5f); - else if (dirToGoForwardAction==2) - dirToGo = transform.forward * -1f * (largeGrounded ? 1f : 0.5f); - if (rotateDirAction==1) - rotateDir = transform.up * -1f; - else if (rotateDirAction==2) - rotateDir = transform.up * 1f; - if (dirToGoSideAction==1) - dirToGo = transform.right * -0.6f * (largeGrounded ? 1f : 0.5f); - else if (dirToGoSideAction==2) - dirToGo = transform.right * 0.6f * (largeGrounded ? 1f : 0.5f); - if (jumpAction == 1) - if ((jumpingTime <= 0f) && smallGrounded) - { - Jump(); - } + + int action = Mathf.FloorToInt(act[0]); + switch (action) + { + case 0: + dirToGo = transform.forward * 1f * (largeGrounded ? 1f : 0.5f); + break; + case 1: + dirToGo = transform.forward * -1f * (largeGrounded ? 1f : 0.5f); + break; + case 2: + + rotateDir = transform.up * -1f; + break; + case 3: + rotateDir = transform.up * 1f; + break; + case 4: + dirToGo = transform.right * -0.6f * (largeGrounded ? 1f : 0.5f); + break; + case 5: + dirToGo = transform.right * 0.6f * (largeGrounded ? 1f : 0.5f); + break; + case 6: + if ((jumpingTime <= 0f) && smallGrounded) + { + Jump(); + } + break; + } transform.Rotate(rotateDir, Time.fixedDeltaTime * 300f); agentRB.AddForce(dirToGo * academy.agentRunSpeed, @@ -259,7 +246,7 @@ public override void AgentAction(float[] vectorAction, string textAction) // Detect when the agent hits the goal void OnTriggerStay(Collider col) { - if (col.gameObject.CompareTag("goal") && DoGroundCheck(true)) + if (col.gameObject.CompareTag("goal") && DoGroundCheck(0.4f)) { SetReward(1f); Done(); diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/TFModels.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/TFModels.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/TFModels.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/TFModels.meta diff --git a/unity-environment/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes b/unity-environment/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes new file mode 100644 index 0000000000..66539d5dae Binary files /dev/null and b/unity-environment/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes differ diff --git a/UnitySDK/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes.meta b/unity-environment/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes.meta rename to unity-environment/Assets/ML-Agents/Examples/WallJump/TFModels/WallJump.bytes.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins.meta b/unity-environment/Assets/ML-Agents/Plugins.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins.meta rename to unity-environment/Assets/ML-Agents/Plugins.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Google.Protobuf.dll.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/Grpc.Core.dll.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/System.Interactive.Async.dll.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x64.so.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/linux/native/libgrpc_csharp_ext.x86.so.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle diff --git a/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta new file mode 100644 index 0000000000..61d5f98127 --- /dev/null +++ b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta @@ -0,0 +1,106 @@ +fileFormatVersion: 2 +guid: 7eeb863bd08ba4388829c23da03a714f +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXUniversal: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + '': OSXIntel + second: + enabled: 1 + settings: {} + - first: + '': OSXIntel64 + second: + enabled: 1 + settings: {} + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86_64 + DefaultValueInitialized: true + OS: OSX + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x64.dll.meta diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll diff --git a/UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll.meta b/unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll.meta rename to unity-environment/Assets/ML-Agents/Plugins/ProtoBuffer/runtimes/win/native/grpc_csharp_ext.x86.dll.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts.meta b/unity-environment/Assets/ML-Agents/Scripts.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts.meta rename to unity-environment/Assets/ML-Agents/Scripts.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs b/unity-environment/Assets/ML-Agents/Scripts/Academy.cs similarity index 97% rename from UnitySDK/Assets/ML-Agents/Scripts/Academy.cs rename to unity-environment/Assets/ML-Agents/Scripts/Academy.cs index dc7db49223..cbcc5dcc38 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/Academy.cs @@ -92,7 +92,7 @@ public EnvironmentConfiguration( "docs/Learning-Environment-Design-Academy.md")] public abstract class Academy : MonoBehaviour { - private const string kApiVersion = "API-5"; + private const string kApiVersion = "API-4"; // Fields provided in the Inspector @@ -306,7 +306,6 @@ private void InitializeEnvironment() (MLAgents.CommunicatorObjects.BrainTypeProto) brain.brainType)); } - academyParameters.EnvironmentParameters = new MLAgents.CommunicatorObjects.EnvironmentParametersProto(); @@ -320,7 +319,7 @@ private void InitializeEnvironment() var pythonParameters = brainBatcher.SendAcademyParameters(academyParameters); Random.InitState(pythonParameters.Seed); Application.logMessageReceived += HandleLog; - logPath = Path.GetFullPath(".") + "/UnitySDK.log"; + logPath = Path.GetFullPath(".") + "/unity-environment.log"; logWriter = new StreamWriter(logPath, false); logWriter.WriteLine(System.DateTime.Now.ToString()); logWriter.WriteLine(" "); @@ -345,18 +344,6 @@ private void InitializeEnvironment() ConfigureEnvironment(); } - private void UpdateResetParameters() - { - var newResetParameters = brainBatcher.GetEnvironmentParameters(); - if (newResetParameters != null) - { - foreach (var kv in newResetParameters.FloatParameters) - { - resetParameters[kv.Key] = kv.Value; - } - } - } - void HandleLog(string logString, string stackTrace, LogType type) { logWriter = new StreamWriter(logPath, true); @@ -539,7 +526,15 @@ void EnvironmentStep() if (brainBatcher.GetCommand() == MLAgents.CommunicatorObjects.CommandProto.Reset) { - UpdateResetParameters(); + // Update reset parameters. + var newResetParameters = brainBatcher.GetEnvironmentParameters(); + if (newResetParameters != null) + { + foreach (var kv in newResetParameters.FloatParameters) + { + resetParameters[kv.Key] = kv.Value; + } + } SetIsInference(!brainBatcher.GetIsTraining()); @@ -558,7 +553,6 @@ void EnvironmentStep() } else if (!firstAcademyReset) { - UpdateResetParameters(); ForcedFullReset(); } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/Academy.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Academy.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/Academy.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Agent.cs b/unity-environment/Assets/ML-Agents/Scripts/Agent.cs similarity index 86% rename from UnitySDK/Assets/ML-Agents/Scripts/Agent.cs rename to unity-environment/Assets/ML-Agents/Scripts/Agent.cs index c9d458045d..273a43b921 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/Agent.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/Agent.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; using UnityEngine; @@ -43,12 +42,6 @@ public struct AgentInfo /// public string storedTextActions; - /// - /// For discrete control, specifies the actions that the agent cannot take. Is true if - /// the action is masked. - /// - public bool[] actionMasks; - /// /// Used by the Trainer to store information about the agent. This data /// structure is not consumed or modified by the agent directly, they are @@ -88,7 +81,6 @@ public struct AgentAction public float[] vectorActions; public string textActions; public List memories; - public float value; } /// @@ -256,9 +248,6 @@ public abstract class Agent : MonoBehaviour /// to separate between different agents in the environment. int id; - /// Keeps track of the actions that are masked at each step. - private ActionMasker actionMasker; - /// Array of Texture2D used to render to from render buffer before /// transforming into float tensor. Texture2D[] textureArray; @@ -466,16 +455,15 @@ void ResetData() } BrainParameters param = brain.brainParameters; - actionMasker = new ActionMasker(param); if (param.vectorActionSpaceType == SpaceType.continuous) { - action.vectorActions = new float[param.vectorActionSize[0]]; - info.storedVectorActions = new float[param.vectorActionSize[0]]; + action.vectorActions = new float[param.vectorActionSize]; + info.storedVectorActions = new float[param.vectorActionSize]; } else { - action.vectorActions = new float[param.vectorActionSize.Length]; - info.storedVectorActions = new float[param.vectorActionSize.Length]; + action.vectorActions = new float[1]; + info.storedVectorActions = new float[1]; } if (info.textObservation == null) @@ -483,14 +471,25 @@ void ResetData() action.textActions = ""; info.memories = new List(); action.memories = new List(); - info.vectorObservation = - new List(param.vectorObservationSize); - info.stackedVectorObservation = - new List(param.vectorObservationSize - * brain.brainParameters.numStackedVectorObservations); - info.stackedVectorObservation.AddRange( - new float[param.vectorObservationSize - * param.numStackedVectorObservations]); + if (param.vectorObservationSpaceType == SpaceType.continuous) + { + info.vectorObservation = + new List(param.vectorObservationSize); + info.stackedVectorObservation = + new List(param.vectorObservationSize + * brain.brainParameters.numStackedVectorObservations); + info.stackedVectorObservation.AddRange( + new float[param.vectorObservationSize + * param.numStackedVectorObservations]); + } + else + { + info.vectorObservation = new List(1); + info.stackedVectorObservation = + new List(param.numStackedVectorObservations); + info.stackedVectorObservation.AddRange( + new float[param.numStackedVectorObservations]); + } info.visualObservations = new List(); } @@ -523,25 +522,40 @@ void SendInfoToBrain() info.storedVectorActions = action.vectorActions; info.storedTextActions = action.textActions; info.vectorObservation.Clear(); - actionMasker.ResetMask(); CollectObservations(); - info.actionMasks = actionMasker.GetMask(); BrainParameters param = brain.brainParameters; - if (info.vectorObservation.Count != param.vectorObservationSize) + if (param.vectorObservationSpaceType == SpaceType.continuous) { - throw new UnityAgentsException(string.Format( - "Vector Observation size mismatch between continuous " + - "agent {0} and brain {1}. " + - "Was Expecting {2} but received {3}. ", - gameObject.name, brain.gameObject.name, - brain.brainParameters.vectorObservationSize, - info.vectorObservation.Count)); + if (info.vectorObservation.Count != param.vectorObservationSize) + { + throw new UnityAgentsException(string.Format( + "Vector Observation size mismatch between continuous " + + "agent {0} and brain {1}. " + + "Was Expecting {2} but received {3}. ", + gameObject.name, brain.gameObject.name, + brain.brainParameters.vectorObservationSize, + info.vectorObservation.Count)); + } + + info.stackedVectorObservation.RemoveRange( + 0, param.vectorObservationSize); + info.stackedVectorObservation.AddRange(info.vectorObservation); } + else + { + if (info.vectorObservation.Count != 1) + { + throw new UnityAgentsException(string.Format( + "Vector Observation size mismatch between discrete agent" + + " {0} and brain {1}. Was Expecting {2} but received {3}. ", + gameObject.name, brain.gameObject.name, + 1, info.vectorObservation.Count)); + } - info.stackedVectorObservation.RemoveRange( - 0, param.vectorObservationSize); - info.stackedVectorObservation.AddRange(info.vectorObservation); + info.stackedVectorObservation.RemoveRange(0, 1); + info.stackedVectorObservation.AddRange(info.vectorObservation); + } info.visualObservations.Clear(); if (param.cameraResolutions.Length > agentParameters.agentCameras.Count) @@ -592,8 +606,6 @@ void SendInfoToBrain() /// - /// - /// - - /// - - /// - /// Depending on your environment, any combination of these helpers can /// be used. They just need to be used in the exact same order each time /// this method is called and the resulting size of the vector observation @@ -608,57 +620,6 @@ public virtual void CollectObservations() } - /// - /// Sets an action mask for discrete control agents. When used, the agent will not be - /// able to perform the action passed as argument at the next decision. If no branch is - /// specified, the default branch will be 0. The actionIndex or actionIndices correspond - /// to the action the agent will be unable to perform. - /// - /// The indices of the masked actions on branch 0 - protected void SetActionMask(IEnumerable actionIndices) - { - actionMasker.SetActionMask(0, actionIndices); - } - - /// - /// Sets an action mask for discrete control agents. When used, the agent will not be - /// able to perform the action passed as argument at the next decision. If no branch is - /// specified, the default branch will be 0. The actionIndex or actionIndices correspond - /// to the action the agent will be unable to perform. - /// - /// The index of the masked action on branch 0 - protected void SetActionMask(int actionIndex) - { - actionMasker.SetActionMask(0, new int[1]{actionIndex}); - } - - /// - /// Sets an action mask for discrete control agents. When used, the agent will not be - /// able to perform the action passed as argument at the next decision. If no branch is - /// specified, the default branch will be 0. The actionIndex or actionIndices correspond - /// to the action the agent will be unable to perform. - /// - /// The branch for which the actions will be masked - /// The index of the masked action - protected void SetActionMask(int branch, int actionIndex) - { - actionMasker.SetActionMask(branch, new int[1]{actionIndex}); - } - - /// - /// Modifies an action mask for discrete control agents. When used, the agent will not be - /// able to perform the action passed as argument at the next decision. If no branch is - /// specified, the default branch will be 0. The actionIndex or actionIndices correspond - /// to the action the agent will be unable to perform. - /// - /// The branch for which the actions will be masked - /// The indices of the masked actions - protected void SetActionMask(int branch, IEnumerable actionIndices) - { - actionMasker.SetActionMask(branch, actionIndices); - } - - /// /// Adds a float observation to the vector observations of the agent. /// Increases the size of the agents vector observation by 1. @@ -676,7 +637,7 @@ protected void AddVectorObs(float observation) /// Observation. protected void AddVectorObs(int observation) { - info.vectorObservation.Add(observation); + info.vectorObservation.Add((float) observation); } /// @@ -745,13 +706,6 @@ protected void AddVectorObs(bool observation) info.vectorObservation.Add(observation ? 1f : 0f); } - protected void AddVectorObs(int observation, int range) - { - float[] oneHotVector = new float[range]; - oneHotVector[observation] = 1; - info.vectorObservation.AddRange(oneHotVector); - } - /// /// Sets the text observation. /// @@ -832,20 +786,6 @@ public void UpdateTextAction(string textActions) { action.textActions = textActions; } - - /// - /// Updates the value of the agent. - /// - /// Text actions. - public void UpdateValueAction(float value) - { - action.value = value; - } - - protected float GetValueEstimate() - { - return action.value; - } /// /// Scales continous action from [-1, 1] to arbitrary range. @@ -868,7 +808,6 @@ protected float ScaleAction(float rawAction, float min, float max) /// The agent must set maxStepReached. /// If set to true /// The agent must set done. - /// Number of current steps in episode void SetStatus(bool academyMaxStep, bool academyDone, int academyStepCounter) { if (academyDone) diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Agent.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/Agent.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Agent.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/Agent.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/BCTeacherHelper.cs b/unity-environment/Assets/ML-Agents/Scripts/BCTeacherHelper.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/BCTeacherHelper.cs rename to unity-environment/Assets/ML-Agents/Scripts/BCTeacherHelper.cs diff --git a/UnitySDK/Assets/ML-Agents/Scripts/BCTeacherHelper.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/BCTeacherHelper.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/BCTeacherHelper.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/BCTeacherHelper.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs b/unity-environment/Assets/ML-Agents/Scripts/Batcher.cs similarity index 96% rename from UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs rename to unity-environment/Assets/ML-Agents/Scripts/Batcher.cs index e3b6d4e3c9..a994974d6c 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/Batcher.cs @@ -167,6 +167,7 @@ public static CommunicatorObjects.AgentInfoProto { StackedVectorObservation = { info.stackedVectorObservation }, StoredVectorActions = { info.storedVectorActions }, + Memories = { info.memories }, StoredTextActions = info.storedTextActions, TextObservation = info.textObservation, Reward = info.reward, @@ -174,18 +175,10 @@ public static CommunicatorObjects.AgentInfoProto Done = info.done, Id = info.id, }; - if (info.memories != null) - { - agentInfoProto.Memories.Add(info.memories); - } - if (info.actionMasks != null) - { - agentInfoProto.ActionMask.AddRange(info.actionMasks); - } foreach (Texture2D obs in info.visualObservations) { agentInfoProto.VisualObservations.Add( - ByteString.CopyFrom(obs.EncodeToPNG()) + ByteString.CopyFrom(obs.EncodeToJPG()) ); } return agentInfoProto; @@ -206,9 +199,11 @@ public static CommunicatorObjects.BrainParametersProto BrainParametersConvertor( { VectorObservationSize = brainParameters.vectorObservationSize, NumStackedVectorObservations = brainParameters.numStackedVectorObservations, - VectorActionSize = {brainParameters.vectorActionSize}, + VectorActionSize = brainParameters.vectorActionSize, VectorActionSpaceType = (CommunicatorObjects.SpaceTypeProto)brainParameters.vectorActionSpaceType, + VectorObservationSpaceType = + (CommunicatorObjects.SpaceTypeProto)brainParameters.vectorObservationSpaceType, BrainName = name, BrainType = type }; @@ -345,8 +340,6 @@ void SendBatchedMessageHelper() action.Memories.ToList()); agent.UpdateTextAction( action.TextActions); - agent.UpdateValueAction( - action.Value); } } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/Batcher.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Batcher.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/Batcher.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Brain.cs b/unity-environment/Assets/ML-Agents/Scripts/Brain.cs similarity index 89% rename from UnitySDK/Assets/ML-Agents/Scripts/Brain.cs rename to unity-environment/Assets/ML-Agents/Scripts/Brain.cs index b9e8219529..1546ab60b5 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/Brain.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/Brain.cs @@ -59,7 +59,7 @@ public class BrainParameters [Range(1, 50)] public int numStackedVectorObservations = 1; - public int[] vectorActionSize = new int[1]{1}; + public int vectorActionSize = 1; /**< \brief If continuous : The length of the float vector that represents * the action *
If discrete : The number of possible values the action can take*/ @@ -72,6 +72,9 @@ public class BrainParameters public SpaceType vectorActionSpaceType = SpaceType.discrete; /**< \brief Defines if the action is discrete or continuous */ + + public SpaceType vectorObservationSpaceType = SpaceType.continuous; + /**< \brief Defines if the state is discrete or continuous */ } [HelpURL("https://github.com/Unity-Technologies/ml-agents/blob/master/" + @@ -85,7 +88,7 @@ public class BrainParameters */ public class Brain : MonoBehaviour { - private bool isInitialized; + private bool isInitialized = false; private Dictionary agentInfos = new Dictionary(1024); @@ -101,7 +104,7 @@ public class Brain : MonoBehaviour public BrainType brainType; //[HideInInspector] - /// Keeps track of the agents which subscribe to this brain*/ + ///**< \brief Keeps track of the agents which subscribe to this brain*/ // public Dictionary agents = new Dictionary(); [SerializeField] ScriptableObject[] CoreBrains; @@ -183,11 +186,12 @@ public void UpdateCoreBrains() { CoreBrains[(int) bt] = ScriptableObject.CreateInstance( - "CoreBrain" + bt); + "CoreBrain" + bt.ToString()); } else { - CoreBrains[(int) bt] = Instantiate(CoreBrains[(int) bt]); + CoreBrains[(int) bt] = + ScriptableObject.Instantiate(CoreBrains[(int) bt]); } } @@ -216,14 +220,16 @@ public void SendState(Agent agent, AgentInfo info) if (!gameObject.activeSelf) { throw new UnityAgentsException( - $"Agent {agent.gameObject.name} tried to request an action " + - $"from brain {gameObject.name} but it is not active."); + string.Format("Agent {0} tried to request an action " + + "from brain {1} but it is not active.", + agent.gameObject.name, gameObject.name)); } else if (!isInitialized) { throw new UnityAgentsException( - $"Agent {agent.gameObject.name} tried to request an action " + - $"from brain {gameObject.name} but it was not initialized."); + string.Format("Agent {0} tried to request an action " + + "from brain {1} but it was not initialized.", + agent.gameObject.name, gameObject.name)); } else { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Brain.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/Brain.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Brain.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/Brain.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Communicator.cs b/unity-environment/Assets/ML-Agents/Scripts/Communicator.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Communicator.cs rename to unity-environment/Assets/ML-Agents/Scripts/Communicator.cs diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Communicator.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/Communicator.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Communicator.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/Communicator.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs similarity index 82% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs index 35682e9078..3096b50fdb 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/agent_action_proto.proto +// source: communicator_objects/agent_action_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/agent_action_proto.proto + /// Holder for reflection information generated from communicator_objects/agent_action_proto.proto public static partial class AgentActionProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/agent_action_proto.proto + /// File descriptor for communicator_objects/agent_action_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,15 +24,15 @@ public static partial class AgentActionProtoReflection { static AgentActionProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjttbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2FnZW50X2Fj", - "dGlvbl9wcm90by5wcm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMiYQoQQWdl", - "bnRBY3Rpb25Qcm90bxIWCg52ZWN0b3JfYWN0aW9ucxgBIAMoAhIUCgx0ZXh0", - "X2FjdGlvbnMYAiABKAkSEAoIbWVtb3JpZXMYAyADKAISDQoFdmFsdWUYBCAB", - "KAJCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); + "Ci1jb21tdW5pY2F0b3Jfb2JqZWN0cy9hZ2VudF9hY3Rpb25fcHJvdG8ucHJv", + "dG8SFGNvbW11bmljYXRvcl9vYmplY3RzIlIKEEFnZW50QWN0aW9uUHJvdG8S", + "FgoOdmVjdG9yX2FjdGlvbnMYASADKAISFAoMdGV4dF9hY3Rpb25zGAIgASgJ", + "EhAKCG1lbW9yaWVzGAMgAygCQh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JP", + "YmplY3RzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.AgentActionProto), global::MLAgents.CommunicatorObjects.AgentActionProto.Parser, new[]{ "VectorActions", "TextActions", "Memories", "Value" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.AgentActionProto), global::MLAgents.CommunicatorObjects.AgentActionProto.Parser, new[]{ "VectorActions", "TextActions", "Memories" }, null, null, null) })); } #endregion @@ -67,7 +67,6 @@ public AgentActionProto(AgentActionProto other) : this() { vectorActions_ = other.vectorActions_.Clone(); textActions_ = other.textActions_; memories_ = other.memories_.Clone(); - value_ = other.value_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -107,17 +106,6 @@ public string TextActions { get { return memories_; } } - /// Field number for the "value" field. - public const int ValueFieldNumber = 4; - private float value_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float Value { - get { return value_; } - set { - value_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as AgentActionProto); @@ -134,7 +122,6 @@ public bool Equals(AgentActionProto other) { if(!vectorActions_.Equals(other.vectorActions_)) return false; if (TextActions != other.TextActions) return false; if(!memories_.Equals(other.memories_)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Value, other.Value)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -144,7 +131,6 @@ public override int GetHashCode() { hash ^= vectorActions_.GetHashCode(); if (TextActions.Length != 0) hash ^= TextActions.GetHashCode(); hash ^= memories_.GetHashCode(); - if (Value != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Value); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -164,10 +150,6 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteString(TextActions); } memories_.WriteTo(output, _repeated_memories_codec); - if (Value != 0F) { - output.WriteRawTag(37); - output.WriteFloat(Value); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -181,9 +163,6 @@ public int CalculateSize() { size += 1 + pb::CodedOutputStream.ComputeStringSize(TextActions); } size += memories_.CalculateSize(_repeated_memories_codec); - if (Value != 0F) { - size += 1 + 4; - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -200,9 +179,6 @@ public void MergeFrom(AgentActionProto other) { TextActions = other.TextActions; } memories_.Add(other.memories_); - if (other.Value != 0F) { - Value = other.Value; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -228,10 +204,6 @@ public void MergeFrom(pb::CodedInputStream input) { memories_.AddEntriesFrom(input, _repeated_memories_codec); break; } - case 37: { - Value = input.ReadFloat(); - break; - } } } } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs.meta index 3f09aabf4f..1a1eda6552 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentActionProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4482f127d4a874cf8a11da2b2cc27dc9 +guid: 93eec67e32dc3484ca9b8e3ea98909c7 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs similarity index 88% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs index 9711fbe8b2..d85a8a7a0d 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/agent_info_proto.proto +// source: communicator_objects/agent_info_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/agent_info_proto.proto + /// Holder for reflection information generated from communicator_objects/agent_info_proto.proto public static partial class AgentInfoProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/agent_info_proto.proto + /// File descriptor for communicator_objects/agent_info_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,19 +24,19 @@ public static partial class AgentInfoProtoReflection { static AgentInfoProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjltbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2FnZW50X2lu", - "Zm9fcHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzIpICCg5BZ2Vu", - "dEluZm9Qcm90bxIiChpzdGFja2VkX3ZlY3Rvcl9vYnNlcnZhdGlvbhgBIAMo", - "AhIbChN2aXN1YWxfb2JzZXJ2YXRpb25zGAIgAygMEhgKEHRleHRfb2JzZXJ2", - "YXRpb24YAyABKAkSHQoVc3RvcmVkX3ZlY3Rvcl9hY3Rpb25zGAQgAygCEhsK", - "E3N0b3JlZF90ZXh0X2FjdGlvbnMYBSABKAkSEAoIbWVtb3JpZXMYBiADKAIS", - "DgoGcmV3YXJkGAcgASgCEgwKBGRvbmUYCCABKAgSGAoQbWF4X3N0ZXBfcmVh", - "Y2hlZBgJIAEoCBIKCgJpZBgKIAEoBRITCgthY3Rpb25fbWFzaxgLIAMoCEIf", - "qgIcTUxBZ2VudHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IGcHJvdG8z")); + "Citjb21tdW5pY2F0b3Jfb2JqZWN0cy9hZ2VudF9pbmZvX3Byb3RvLnByb3Rv", + "EhRjb21tdW5pY2F0b3Jfb2JqZWN0cyL9AQoOQWdlbnRJbmZvUHJvdG8SIgoa", + "c3RhY2tlZF92ZWN0b3Jfb2JzZXJ2YXRpb24YASADKAISGwoTdmlzdWFsX29i", + "c2VydmF0aW9ucxgCIAMoDBIYChB0ZXh0X29ic2VydmF0aW9uGAMgASgJEh0K", + "FXN0b3JlZF92ZWN0b3JfYWN0aW9ucxgEIAMoAhIbChNzdG9yZWRfdGV4dF9h", + "Y3Rpb25zGAUgASgJEhAKCG1lbW9yaWVzGAYgAygCEg4KBnJld2FyZBgHIAEo", + "AhIMCgRkb25lGAggASgIEhgKEG1heF9zdGVwX3JlYWNoZWQYCSABKAgSCgoC", + "aWQYCiABKAVCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnBy", + "b3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.AgentInfoProto), global::MLAgents.CommunicatorObjects.AgentInfoProto.Parser, new[]{ "StackedVectorObservation", "VisualObservations", "TextObservation", "StoredVectorActions", "StoredTextActions", "Memories", "Reward", "Done", "MaxStepReached", "Id", "ActionMask" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.AgentInfoProto), global::MLAgents.CommunicatorObjects.AgentInfoProto.Parser, new[]{ "StackedVectorObservation", "VisualObservations", "TextObservation", "StoredVectorActions", "StoredTextActions", "Memories", "Reward", "Done", "MaxStepReached", "Id" }, null, null, null) })); } #endregion @@ -78,7 +78,6 @@ public AgentInfoProto(AgentInfoProto other) : this() { done_ = other.done_; maxStepReached_ = other.maxStepReached_; id_ = other.id_; - actionMask_ = other.actionMask_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -193,16 +192,6 @@ public int Id { } } - /// Field number for the "action_mask" field. - public const int ActionMaskFieldNumber = 11; - private static readonly pb::FieldCodec _repeated_actionMask_codec - = pb::FieldCodec.ForBool(90); - private readonly pbc::RepeatedField actionMask_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField ActionMask { - get { return actionMask_; } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as AgentInfoProto); @@ -226,7 +215,6 @@ public bool Equals(AgentInfoProto other) { if (Done != other.Done) return false; if (MaxStepReached != other.MaxStepReached) return false; if (Id != other.Id) return false; - if(!actionMask_.Equals(other.actionMask_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -243,7 +231,6 @@ public override int GetHashCode() { if (Done != false) hash ^= Done.GetHashCode(); if (MaxStepReached != false) hash ^= MaxStepReached.GetHashCode(); if (Id != 0) hash ^= Id.GetHashCode(); - hash ^= actionMask_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -285,7 +272,6 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(80); output.WriteInt32(Id); } - actionMask_.WriteTo(output, _repeated_actionMask_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -316,7 +302,6 @@ public int CalculateSize() { if (Id != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); } - size += actionMask_.CalculateSize(_repeated_actionMask_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -350,7 +335,6 @@ public void MergeFrom(AgentInfoProto other) { if (other.Id != 0) { Id = other.Id; } - actionMask_.Add(other.actionMask_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -405,11 +389,6 @@ public void MergeFrom(pb::CodedInputStream input) { Id = input.ReadInt32(); break; } - case 90: - case 88: { - actionMask_.AddEntriesFrom(input, _repeated_actionMask_codec); - break; - } } } } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs.meta index a663228813..2888079b08 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/AgentInfoProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 791522439b8324bff85f84309db90ecc +guid: 9a2cd47d5b7a84d45b66748c405edf5a MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs similarity index 77% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs index eeb67390e9..31755e34fe 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/brain_parameters_proto.proto +// source: communicator_objects/brain_parameters_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/brain_parameters_proto.proto + /// Holder for reflection information generated from communicator_objects/brain_parameters_proto.proto public static partial class BrainParametersProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/brain_parameters_proto.proto + /// File descriptor for communicator_objects/brain_parameters_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,26 +24,26 @@ public static partial class BrainParametersProtoReflection { static BrainParametersProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cj9tbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2JyYWluX3Bh", - "cmFtZXRlcnNfcHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGjlt", - "bGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3Jlc29sdXRpb25f", - "cHJvdG8ucHJvdG8aOW1sYWdlbnRzL2VudnMvY29tbXVuaWNhdG9yX29iamVj", - "dHMvYnJhaW5fdHlwZV9wcm90by5wcm90bxo5bWxhZ2VudHMvZW52cy9jb21t", - "dW5pY2F0b3Jfb2JqZWN0cy9zcGFjZV90eXBlX3Byb3RvLnByb3RvIvkCChRC", - "cmFpblBhcmFtZXRlcnNQcm90bxIfChd2ZWN0b3Jfb2JzZXJ2YXRpb25fc2l6", - "ZRgBIAEoBRInCh9udW1fc3RhY2tlZF92ZWN0b3Jfb2JzZXJ2YXRpb25zGAIg", - "ASgFEhoKEnZlY3Rvcl9hY3Rpb25fc2l6ZRgDIAMoBRJBChJjYW1lcmFfcmVz", - "b2x1dGlvbnMYBCADKAsyJS5jb21tdW5pY2F0b3Jfb2JqZWN0cy5SZXNvbHV0", - "aW9uUHJvdG8SIgoadmVjdG9yX2FjdGlvbl9kZXNjcmlwdGlvbnMYBSADKAkS", - "RgoYdmVjdG9yX2FjdGlvbl9zcGFjZV90eXBlGAYgASgOMiQuY29tbXVuaWNh", - "dG9yX29iamVjdHMuU3BhY2VUeXBlUHJvdG8SEgoKYnJhaW5fbmFtZRgHIAEo", - "CRI4CgpicmFpbl90eXBlGAggASgOMiQuY29tbXVuaWNhdG9yX29iamVjdHMu", - "QnJhaW5UeXBlUHJvdG9CH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVj", - "dHNiBnByb3RvMw==")); + "CjFjb21tdW5pY2F0b3Jfb2JqZWN0cy9icmFpbl9wYXJhbWV0ZXJzX3Byb3Rv", + "LnByb3RvEhRjb21tdW5pY2F0b3Jfb2JqZWN0cxorY29tbXVuaWNhdG9yX29i", + "amVjdHMvcmVzb2x1dGlvbl9wcm90by5wcm90bxorY29tbXVuaWNhdG9yX29i", + "amVjdHMvYnJhaW5fdHlwZV9wcm90by5wcm90bxorY29tbXVuaWNhdG9yX29i", + "amVjdHMvc3BhY2VfdHlwZV9wcm90by5wcm90byLGAwoUQnJhaW5QYXJhbWV0", + "ZXJzUHJvdG8SHwoXdmVjdG9yX29ic2VydmF0aW9uX3NpemUYASABKAUSJwof", + "bnVtX3N0YWNrZWRfdmVjdG9yX29ic2VydmF0aW9ucxgCIAEoBRIaChJ2ZWN0", + "b3JfYWN0aW9uX3NpemUYAyABKAUSQQoSY2FtZXJhX3Jlc29sdXRpb25zGAQg", + "AygLMiUuY29tbXVuaWNhdG9yX29iamVjdHMuUmVzb2x1dGlvblByb3RvEiIK", + "GnZlY3Rvcl9hY3Rpb25fZGVzY3JpcHRpb25zGAUgAygJEkYKGHZlY3Rvcl9h", + "Y3Rpb25fc3BhY2VfdHlwZRgGIAEoDjIkLmNvbW11bmljYXRvcl9vYmplY3Rz", + "LlNwYWNlVHlwZVByb3RvEksKHXZlY3Rvcl9vYnNlcnZhdGlvbl9zcGFjZV90", + "eXBlGAcgASgOMiQuY29tbXVuaWNhdG9yX29iamVjdHMuU3BhY2VUeXBlUHJv", + "dG8SEgoKYnJhaW5fbmFtZRgIIAEoCRI4CgpicmFpbl90eXBlGAkgASgOMiQu", + "Y29tbXVuaWNhdG9yX29iamVjdHMuQnJhaW5UeXBlUHJvdG9CH6oCHE1MQWdl", + "bnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.ResolutionProtoReflection.Descriptor, global::MLAgents.CommunicatorObjects.BrainTypeProtoReflection.Descriptor, global::MLAgents.CommunicatorObjects.SpaceTypeProtoReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.BrainParametersProto), global::MLAgents.CommunicatorObjects.BrainParametersProto.Parser, new[]{ "VectorObservationSize", "NumStackedVectorObservations", "VectorActionSize", "CameraResolutions", "VectorActionDescriptions", "VectorActionSpaceType", "BrainName", "BrainType" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::MLAgents.CommunicatorObjects.BrainParametersProto), global::MLAgents.CommunicatorObjects.BrainParametersProto.Parser, new[]{ "VectorObservationSize", "NumStackedVectorObservations", "VectorActionSize", "CameraResolutions", "VectorActionDescriptions", "VectorActionSpaceType", "VectorObservationSpaceType", "BrainName", "BrainType" }, null, null, null) })); } #endregion @@ -77,10 +77,11 @@ public BrainParametersProto() { public BrainParametersProto(BrainParametersProto other) : this() { vectorObservationSize_ = other.vectorObservationSize_; numStackedVectorObservations_ = other.numStackedVectorObservations_; - vectorActionSize_ = other.vectorActionSize_.Clone(); + vectorActionSize_ = other.vectorActionSize_; cameraResolutions_ = other.cameraResolutions_.Clone(); vectorActionDescriptions_ = other.vectorActionDescriptions_.Clone(); vectorActionSpaceType_ = other.vectorActionSpaceType_; + vectorObservationSpaceType_ = other.vectorObservationSpaceType_; brainName_ = other.brainName_; brainType_ = other.brainType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -115,12 +116,13 @@ public int NumStackedVectorObservations { /// Field number for the "vector_action_size" field. public const int VectorActionSizeFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_vectorActionSize_codec - = pb::FieldCodec.ForInt32(26); - private readonly pbc::RepeatedField vectorActionSize_ = new pbc::RepeatedField(); + private int vectorActionSize_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField VectorActionSize { + public int VectorActionSize { get { return vectorActionSize_; } + set { + vectorActionSize_ = value; + } } /// Field number for the "camera_resolutions" field. @@ -154,8 +156,19 @@ public int NumStackedVectorObservations { } } + /// Field number for the "vector_observation_space_type" field. + public const int VectorObservationSpaceTypeFieldNumber = 7; + private global::MLAgents.CommunicatorObjects.SpaceTypeProto vectorObservationSpaceType_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::MLAgents.CommunicatorObjects.SpaceTypeProto VectorObservationSpaceType { + get { return vectorObservationSpaceType_; } + set { + vectorObservationSpaceType_ = value; + } + } + /// Field number for the "brain_name" field. - public const int BrainNameFieldNumber = 7; + public const int BrainNameFieldNumber = 8; private string brainName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string BrainName { @@ -166,7 +179,7 @@ public string BrainName { } /// Field number for the "brain_type" field. - public const int BrainTypeFieldNumber = 8; + public const int BrainTypeFieldNumber = 9; private global::MLAgents.CommunicatorObjects.BrainTypeProto brainType_ = 0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public global::MLAgents.CommunicatorObjects.BrainTypeProto BrainType { @@ -191,10 +204,11 @@ public bool Equals(BrainParametersProto other) { } if (VectorObservationSize != other.VectorObservationSize) return false; if (NumStackedVectorObservations != other.NumStackedVectorObservations) return false; - if(!vectorActionSize_.Equals(other.vectorActionSize_)) return false; + if (VectorActionSize != other.VectorActionSize) return false; if(!cameraResolutions_.Equals(other.cameraResolutions_)) return false; if(!vectorActionDescriptions_.Equals(other.vectorActionDescriptions_)) return false; if (VectorActionSpaceType != other.VectorActionSpaceType) return false; + if (VectorObservationSpaceType != other.VectorObservationSpaceType) return false; if (BrainName != other.BrainName) return false; if (BrainType != other.BrainType) return false; return Equals(_unknownFields, other._unknownFields); @@ -205,10 +219,11 @@ public override int GetHashCode() { int hash = 1; if (VectorObservationSize != 0) hash ^= VectorObservationSize.GetHashCode(); if (NumStackedVectorObservations != 0) hash ^= NumStackedVectorObservations.GetHashCode(); - hash ^= vectorActionSize_.GetHashCode(); + if (VectorActionSize != 0) hash ^= VectorActionSize.GetHashCode(); hash ^= cameraResolutions_.GetHashCode(); hash ^= vectorActionDescriptions_.GetHashCode(); if (VectorActionSpaceType != 0) hash ^= VectorActionSpaceType.GetHashCode(); + if (VectorObservationSpaceType != 0) hash ^= VectorObservationSpaceType.GetHashCode(); if (BrainName.Length != 0) hash ^= BrainName.GetHashCode(); if (BrainType != 0) hash ^= BrainType.GetHashCode(); if (_unknownFields != null) { @@ -232,19 +247,26 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(16); output.WriteInt32(NumStackedVectorObservations); } - vectorActionSize_.WriteTo(output, _repeated_vectorActionSize_codec); + if (VectorActionSize != 0) { + output.WriteRawTag(24); + output.WriteInt32(VectorActionSize); + } cameraResolutions_.WriteTo(output, _repeated_cameraResolutions_codec); vectorActionDescriptions_.WriteTo(output, _repeated_vectorActionDescriptions_codec); if (VectorActionSpaceType != 0) { output.WriteRawTag(48); output.WriteEnum((int) VectorActionSpaceType); } + if (VectorObservationSpaceType != 0) { + output.WriteRawTag(56); + output.WriteEnum((int) VectorObservationSpaceType); + } if (BrainName.Length != 0) { - output.WriteRawTag(58); + output.WriteRawTag(66); output.WriteString(BrainName); } if (BrainType != 0) { - output.WriteRawTag(64); + output.WriteRawTag(72); output.WriteEnum((int) BrainType); } if (_unknownFields != null) { @@ -261,12 +283,17 @@ public int CalculateSize() { if (NumStackedVectorObservations != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumStackedVectorObservations); } - size += vectorActionSize_.CalculateSize(_repeated_vectorActionSize_codec); + if (VectorActionSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(VectorActionSize); + } size += cameraResolutions_.CalculateSize(_repeated_cameraResolutions_codec); size += vectorActionDescriptions_.CalculateSize(_repeated_vectorActionDescriptions_codec); if (VectorActionSpaceType != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) VectorActionSpaceType); } + if (VectorObservationSpaceType != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) VectorObservationSpaceType); + } if (BrainName.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(BrainName); } @@ -290,12 +317,17 @@ public void MergeFrom(BrainParametersProto other) { if (other.NumStackedVectorObservations != 0) { NumStackedVectorObservations = other.NumStackedVectorObservations; } - vectorActionSize_.Add(other.vectorActionSize_); + if (other.VectorActionSize != 0) { + VectorActionSize = other.VectorActionSize; + } cameraResolutions_.Add(other.cameraResolutions_); vectorActionDescriptions_.Add(other.vectorActionDescriptions_); if (other.VectorActionSpaceType != 0) { VectorActionSpaceType = other.VectorActionSpaceType; } + if (other.VectorObservationSpaceType != 0) { + VectorObservationSpaceType = other.VectorObservationSpaceType; + } if (other.BrainName.Length != 0) { BrainName = other.BrainName; } @@ -321,9 +353,8 @@ public void MergeFrom(pb::CodedInputStream input) { NumStackedVectorObservations = input.ReadInt32(); break; } - case 26: case 24: { - vectorActionSize_.AddEntriesFrom(input, _repeated_vectorActionSize_codec); + VectorActionSize = input.ReadInt32(); break; } case 34: { @@ -338,11 +369,15 @@ public void MergeFrom(pb::CodedInputStream input) { vectorActionSpaceType_ = (global::MLAgents.CommunicatorObjects.SpaceTypeProto) input.ReadEnum(); break; } - case 58: { + case 56: { + vectorObservationSpaceType_ = (global::MLAgents.CommunicatorObjects.SpaceTypeProto) input.ReadEnum(); + break; + } + case 66: { BrainName = input.ReadString(); break; } - case 64: { + case 72: { brainType_ = (global::MLAgents.CommunicatorObjects.BrainTypeProto) input.ReadEnum(); break; } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs.meta index e3ee7bcab6..3a620addce 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainParametersProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7b41acc4d406e4a3c94df3399b2a6471 +guid: 91e3353985a4c4c08a8004648a81de4f MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs similarity index 68% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs index 7b25b454a1..4b36687c3b 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/brain_type_proto.proto +// source: communicator_objects/brain_type_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/brain_type_proto.proto + /// Holder for reflection information generated from communicator_objects/brain_type_proto.proto public static partial class BrainTypeProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/brain_type_proto.proto + /// File descriptor for communicator_objects/brain_type_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,12 +24,12 @@ public static partial class BrainTypeProtoReflection { static BrainTypeProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjltbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2JyYWluX3R5", - "cGVfcHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGjltbGFnZW50", - "cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3Jlc29sdXRpb25fcHJvdG8u", - "cHJvdG8qRwoOQnJhaW5UeXBlUHJvdG8SCgoGUGxheWVyEAASDQoJSGV1cmlz", - "dGljEAESDAoIRXh0ZXJuYWwQAhIMCghJbnRlcm5hbBADQh+qAhxNTEFnZW50", - "cy5Db21tdW5pY2F0b3JPYmplY3RzYgZwcm90bzM=")); + "Citjb21tdW5pY2F0b3Jfb2JqZWN0cy9icmFpbl90eXBlX3Byb3RvLnByb3Rv", + "EhRjb21tdW5pY2F0b3Jfb2JqZWN0cxorY29tbXVuaWNhdG9yX29iamVjdHMv", + "cmVzb2x1dGlvbl9wcm90by5wcm90bypHCg5CcmFpblR5cGVQcm90bxIKCgZQ", + "bGF5ZXIQABINCglIZXVyaXN0aWMQARIMCghFeHRlcm5hbBACEgwKCEludGVy", + "bmFsEANCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3Rv", + "Mw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.ResolutionProtoReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.BrainTypeProto), }, null)); diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs.meta index 7ee271ffa8..5a1ee111f1 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/BrainTypeProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8a44faf5235584f06ae45eb976a247a9 +guid: d2e4f3cea300049b7a4cd65fbee2ee95 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs similarity index 71% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs index c1738800da..3f9a5c4ee2 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/command_proto.proto +// source: communicator_objects/command_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/command_proto.proto + /// Holder for reflection information generated from communicator_objects/command_proto.proto public static partial class CommandProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/command_proto.proto + /// File descriptor for communicator_objects/command_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,10 +24,10 @@ public static partial class CommandProtoReflection { static CommandProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjZtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2NvbW1hbmRf", - "cHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzKi0KDENvbW1hbmRQ", - "cm90bxIICgRTVEVQEAASCQoFUkVTRVQQARIICgRRVUlUEAJCH6oCHE1MQWdl", - "bnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); + "Cihjb21tdW5pY2F0b3Jfb2JqZWN0cy9jb21tYW5kX3Byb3RvLnByb3RvEhRj", + "b21tdW5pY2F0b3Jfb2JqZWN0cyotCgxDb21tYW5kUHJvdG8SCAoEU1RFUBAA", + "EgkKBVJFU0VUEAESCAoEUVVJVBACQh+qAhxNTEFnZW50cy5Db21tdW5pY2F0", + "b3JPYmplY3RzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.CommandProto), }, null)); diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs.meta index 6443336bad..2098f9b95b 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/CommandProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6b2ff9fe2c38b4e79aba78908cc5492c +guid: 19e8be280f78249c188fde36f0855094 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs similarity index 92% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs index d48b55e59b..489064a245 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/engine_configuration_proto.proto +// source: communicator_objects/engine_configuration_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/engine_configuration_proto.proto + /// Holder for reflection information generated from communicator_objects/engine_configuration_proto.proto public static partial class EngineConfigurationProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/engine_configuration_proto.proto + /// File descriptor for communicator_objects/engine_configuration_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,13 +24,12 @@ public static partial class EngineConfigurationProtoReflection { static EngineConfigurationProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CkNtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2VuZ2luZV9j", - "b25maWd1cmF0aW9uX3Byb3RvLnByb3RvEhRjb21tdW5pY2F0b3Jfb2JqZWN0", - "cyKVAQoYRW5naW5lQ29uZmlndXJhdGlvblByb3RvEg0KBXdpZHRoGAEgASgF", - "Eg4KBmhlaWdodBgCIAEoBRIVCg1xdWFsaXR5X2xldmVsGAMgASgFEhIKCnRp", - "bWVfc2NhbGUYBCABKAISGQoRdGFyZ2V0X2ZyYW1lX3JhdGUYBSABKAUSFAoM", - "c2hvd19tb25pdG9yGAYgASgIQh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JP", - "YmplY3RzYgZwcm90bzM=")); + "CjVjb21tdW5pY2F0b3Jfb2JqZWN0cy9lbmdpbmVfY29uZmlndXJhdGlvbl9w", + "cm90by5wcm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMilQEKGEVuZ2luZUNv", + "bmZpZ3VyYXRpb25Qcm90bxINCgV3aWR0aBgBIAEoBRIOCgZoZWlnaHQYAiAB", + "KAUSFQoNcXVhbGl0eV9sZXZlbBgDIAEoBRISCgp0aW1lX3NjYWxlGAQgASgC", + "EhkKEXRhcmdldF9mcmFtZV9yYXRlGAUgASgFEhQKDHNob3dfbW9uaXRvchgG", + "IAEoCEIfqgIcTUxBZ2VudHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs.meta index 613b83d39d..fcd861ce95 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EngineConfigurationProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2cebeb1263d7846b4b3c7c6e5d5e193f +guid: fac934345fc664df8823b494ea9b1ca8 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs similarity index 87% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs index 007928e54c..b340a79b9e 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/environment_parameters_proto.proto +// source: communicator_objects/environment_parameters_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/environment_parameters_proto.proto + /// Holder for reflection information generated from communicator_objects/environment_parameters_proto.proto public static partial class EnvironmentParametersProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/environment_parameters_proto.proto + /// File descriptor for communicator_objects/environment_parameters_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,14 +24,13 @@ public static partial class EnvironmentParametersProtoReflection { static EnvironmentParametersProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CkVtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2Vudmlyb25t", - "ZW50X3BhcmFtZXRlcnNfcHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmpl", - "Y3RzIrUBChpFbnZpcm9ubWVudFBhcmFtZXRlcnNQcm90bxJfChBmbG9hdF9w", - "YXJhbWV0ZXJzGAEgAygLMkUuY29tbXVuaWNhdG9yX29iamVjdHMuRW52aXJv", - "bm1lbnRQYXJhbWV0ZXJzUHJvdG8uRmxvYXRQYXJhbWV0ZXJzRW50cnkaNgoU", - "RmxvYXRQYXJhbWV0ZXJzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIg", - "ASgCOgI4AUIfqgIcTUxBZ2VudHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IGcHJv", - "dG8z")); + "Cjdjb21tdW5pY2F0b3Jfb2JqZWN0cy9lbnZpcm9ubWVudF9wYXJhbWV0ZXJz", + "X3Byb3RvLnByb3RvEhRjb21tdW5pY2F0b3Jfb2JqZWN0cyK1AQoaRW52aXJv", + "bm1lbnRQYXJhbWV0ZXJzUHJvdG8SXwoQZmxvYXRfcGFyYW1ldGVycxgBIAMo", + "CzJFLmNvbW11bmljYXRvcl9vYmplY3RzLkVudmlyb25tZW50UGFyYW1ldGVy", + "c1Byb3RvLkZsb2F0UGFyYW1ldGVyc0VudHJ5GjYKFEZsb2F0UGFyYW1ldGVy", + "c0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoAjoCOAFCH6oCHE1M", + "QWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs.meta index ba521fb57f..a1f4ceb10f 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/EnvironmentParametersProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: be8c5f75bdcff41488a8e85748541100 +guid: 312dc062dfab44416a31b8b273cda29a MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs similarity index 92% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs index 46bd73b2c1..c932d5e970 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/header.proto +// source: communicator_objects/header.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/header.proto + /// Holder for reflection information generated from communicator_objects/header.proto public static partial class HeaderReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/header.proto + /// File descriptor for communicator_objects/header.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,10 +24,10 @@ public static partial class HeaderReflection { static HeaderReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Ci9tbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL2hlYWRlci5w", - "cm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMiKQoGSGVhZGVyEg4KBnN0YXR1", - "cxgBIAEoBRIPCgdtZXNzYWdlGAIgASgJQh+qAhxNTEFnZW50cy5Db21tdW5p", - "Y2F0b3JPYmplY3RzYgZwcm90bzM=")); + "CiFjb21tdW5pY2F0b3Jfb2JqZWN0cy9oZWFkZXIucHJvdG8SFGNvbW11bmlj", + "YXRvcl9vYmplY3RzIikKBkhlYWRlchIOCgZzdGF0dXMYASABKAUSDwoHbWVz", + "c2FnZRgCIAEoCUIfqgIcTUxBZ2VudHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IG", + "cHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs.meta index 63d91fcc8a..956bcafadb 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/Header.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8bb8aabfab48b408381733bccccd5af9 +guid: e582b089dfedc438d9cbce9d4017b807 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs similarity index 92% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs index da862cf256..1de1ecdcfe 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/resolution_proto.proto +// source: communicator_objects/resolution_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/resolution_proto.proto + /// Holder for reflection information generated from communicator_objects/resolution_proto.proto public static partial class ResolutionProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/resolution_proto.proto + /// File descriptor for communicator_objects/resolution_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,11 +24,10 @@ public static partial class ResolutionProtoReflection { static ResolutionProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjltbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3Jlc29sdXRp", - "b25fcHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzIkQKD1Jlc29s", - "dXRpb25Qcm90bxINCgV3aWR0aBgBIAEoBRIOCgZoZWlnaHQYAiABKAUSEgoK", - "Z3JheV9zY2FsZRgDIAEoCEIfqgIcTUxBZ2VudHMuQ29tbXVuaWNhdG9yT2Jq", - "ZWN0c2IGcHJvdG8z")); + "Citjb21tdW5pY2F0b3Jfb2JqZWN0cy9yZXNvbHV0aW9uX3Byb3RvLnByb3Rv", + "EhRjb21tdW5pY2F0b3Jfb2JqZWN0cyJECg9SZXNvbHV0aW9uUHJvdG8SDQoF", + "d2lkdGgYASABKAUSDgoGaGVpZ2h0GAIgASgFEhIKCmdyYXlfc2NhbGUYAyAB", + "KAhCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs.meta index b019d860af..2e06dd6f21 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/ResolutionProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: eae234f817240444a9d18b3d7366f260 +guid: ca2454611610e4136a412b5cd6afee4d MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs similarity index 67% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs index 8990b9390c..c46430f8c5 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/space_type_proto.proto +// source: communicator_objects/space_type_proto.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/space_type_proto.proto + /// Holder for reflection information generated from communicator_objects/space_type_proto.proto public static partial class SpaceTypeProtoReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/space_type_proto.proto + /// File descriptor for communicator_objects/space_type_proto.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,12 +24,11 @@ public static partial class SpaceTypeProtoReflection { static SpaceTypeProtoReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjltbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3NwYWNlX3R5", - "cGVfcHJvdG8ucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGjltbGFnZW50", - "cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3Jlc29sdXRpb25fcHJvdG8u", - "cHJvdG8qLgoOU3BhY2VUeXBlUHJvdG8SDAoIZGlzY3JldGUQABIOCgpjb250", - "aW51b3VzEAFCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnBy", - "b3RvMw==")); + "Citjb21tdW5pY2F0b3Jfb2JqZWN0cy9zcGFjZV90eXBlX3Byb3RvLnByb3Rv", + "EhRjb21tdW5pY2F0b3Jfb2JqZWN0cxorY29tbXVuaWNhdG9yX29iamVjdHMv", + "cmVzb2x1dGlvbl9wcm90by5wcm90byouCg5TcGFjZVR5cGVQcm90bxIMCghk", + "aXNjcmV0ZRAAEg4KCmNvbnRpbnVvdXMQAUIfqgIcTUxBZ2VudHMuQ29tbXVu", + "aWNhdG9yT2JqZWN0c2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.ResolutionProtoReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MLAgents.CommunicatorObjects.SpaceTypeProto), }, null)); diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs.meta index dcf5954210..2eefdf17e5 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/SpaceTypeProto.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3e61637749b07412284363ff304da763 +guid: bf7e44e20999448ef846526541819077 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs similarity index 87% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs index e27cd84530..fdee29b8a5 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_input.proto +// source: communicator_objects/unity_input.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/unity_input.proto + /// Holder for reflection information generated from communicator_objects/unity_input.proto public static partial class UnityInputReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/unity_input.proto + /// File descriptor for communicator_objects/unity_input.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,15 +24,14 @@ public static partial class UnityInputReflection { static UnityInputReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjRtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X2lu", - "cHV0LnByb3RvEhRjb21tdW5pY2F0b3Jfb2JqZWN0cxo3bWxhZ2VudHMvZW52", - "cy9jb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9ybF9pbnB1dC5wcm90bxpG", - "bWxhZ2VudHMvZW52cy9jb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9ybF9p", - "bml0aWFsaXphdGlvbl9pbnB1dC5wcm90byKVAQoKVW5pdHlJbnB1dBI0Cghy", - "bF9pbnB1dBgBIAEoCzIiLmNvbW11bmljYXRvcl9vYmplY3RzLlVuaXR5UkxJ", - "bnB1dBJRChdybF9pbml0aWFsaXphdGlvbl9pbnB1dBgCIAEoCzIwLmNvbW11", - "bmljYXRvcl9vYmplY3RzLlVuaXR5UkxJbml0aWFsaXphdGlvbklucHV0Qh+q", - "AhxNTEFnZW50cy5Db21tdW5pY2F0b3JPYmplY3RzYgZwcm90bzM=")); + "CiZjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9pbnB1dC5wcm90bxIUY29t", + "bXVuaWNhdG9yX29iamVjdHMaKWNvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5", + "X3JsX2lucHV0LnByb3RvGjhjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9y", + "bF9pbml0aWFsaXphdGlvbl9pbnB1dC5wcm90byKVAQoKVW5pdHlJbnB1dBI0", + "CghybF9pbnB1dBgBIAEoCzIiLmNvbW11bmljYXRvcl9vYmplY3RzLlVuaXR5", + "UkxJbnB1dBJRChdybF9pbml0aWFsaXphdGlvbl9pbnB1dBgCIAEoCzIwLmNv", + "bW11bmljYXRvcl9vYmplY3RzLlVuaXR5UkxJbml0aWFsaXphdGlvbklucHV0", + "Qh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JPYmplY3RzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.UnityRlInputReflection.Descriptor, global::MLAgents.CommunicatorObjects.UnityRlInitializationInputReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { @@ -68,8 +67,8 @@ public UnityInput() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public UnityInput(UnityInput other) : this() { - rlInput_ = other.rlInput_ != null ? other.rlInput_.Clone() : null; - rlInitializationInput_ = other.rlInitializationInput_ != null ? other.rlInitializationInput_.Clone() : null; + RlInput = other.rlInput_ != null ? other.RlInput.Clone() : null; + RlInitializationInput = other.rlInitializationInput_ != null ? other.RlInitializationInput.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs.meta index 846a8eb53a..3f4456acba 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityInput.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 25e46cd9eca204e19a08fa938802ef9d +guid: c97e6e2cde58d404cba31008c0489454 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs similarity index 86% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs index 6094409391..1653ef76b5 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_message.proto +// source: communicator_objects/unity_message.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/unity_message.proto + /// Holder for reflection information generated from communicator_objects/unity_message.proto public static partial class UnityMessageReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/unity_message.proto + /// File descriptor for communicator_objects/unity_message.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,17 +24,15 @@ public static partial class UnityMessageReflection { static UnityMessageReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjZtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X21l", - "c3NhZ2UucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGjVtbGFnZW50cy9l", - "bnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X291dHB1dC5wcm90bxo0", - "bWxhZ2VudHMvZW52cy9jb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9pbnB1", - "dC5wcm90bxovbWxhZ2VudHMvZW52cy9jb21tdW5pY2F0b3Jfb2JqZWN0cy9o", - "ZWFkZXIucHJvdG8irAEKDFVuaXR5TWVzc2FnZRIsCgZoZWFkZXIYASABKAsy", - "HC5jb21tdW5pY2F0b3Jfb2JqZWN0cy5IZWFkZXISNwoMdW5pdHlfb3V0cHV0", - "GAIgASgLMiEuY29tbXVuaWNhdG9yX29iamVjdHMuVW5pdHlPdXRwdXQSNQoL", - "dW5pdHlfaW5wdXQYAyABKAsyIC5jb21tdW5pY2F0b3Jfb2JqZWN0cy5Vbml0", - "eUlucHV0Qh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JPYmplY3RzYgZwcm90", - "bzM=")); + "Cihjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9tZXNzYWdlLnByb3RvEhRj", + "b21tdW5pY2F0b3Jfb2JqZWN0cxonY29tbXVuaWNhdG9yX29iamVjdHMvdW5p", + "dHlfb3V0cHV0LnByb3RvGiZjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9p", + "bnB1dC5wcm90bxohY29tbXVuaWNhdG9yX29iamVjdHMvaGVhZGVyLnByb3Rv", + "IqwBCgxVbml0eU1lc3NhZ2USLAoGaGVhZGVyGAEgASgLMhwuY29tbXVuaWNh", + "dG9yX29iamVjdHMuSGVhZGVyEjcKDHVuaXR5X291dHB1dBgCIAEoCzIhLmNv", + "bW11bmljYXRvcl9vYmplY3RzLlVuaXR5T3V0cHV0EjUKC3VuaXR5X2lucHV0", + "GAMgASgLMiAuY29tbXVuaWNhdG9yX29iamVjdHMuVW5pdHlJbnB1dEIfqgIc", + "TUxBZ2VudHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.UnityOutputReflection.Descriptor, global::MLAgents.CommunicatorObjects.UnityInputReflection.Descriptor, global::MLAgents.CommunicatorObjects.HeaderReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { @@ -70,9 +68,9 @@ public UnityMessage() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public UnityMessage(UnityMessage other) : this() { - header_ = other.header_ != null ? other.header_.Clone() : null; - unityOutput_ = other.unityOutput_ != null ? other.unityOutput_.Clone() : null; - unityInput_ = other.unityInput_ != null ? other.unityInput_.Clone() : null; + Header = other.header_ != null ? other.Header.Clone() : null; + UnityOutput = other.unityOutput_ != null ? other.UnityOutput.Clone() : null; + UnityInput = other.unityInput_ != null ? other.UnityInput.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs.meta index 6df8c3974f..9fa8d23cfa 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityMessage.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d270bf9ce3d564bb48b2095802c15ff9 +guid: 10dca984632854b079476d5fb6df329c MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs similarity index 86% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs index aefd5cd60d..2fc8a78148 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_output.proto +// source: communicator_objects/unity_output.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/unity_output.proto + /// Holder for reflection information generated from communicator_objects/unity_output.proto public static partial class UnityOutputReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/unity_output.proto + /// File descriptor for communicator_objects/unity_output.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,16 +24,15 @@ public static partial class UnityOutputReflection { static UnityOutputReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjVtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X291", - "dHB1dC5wcm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMaOG1sYWdlbnRzL2Vu", - "dnMvY29tbXVuaWNhdG9yX29iamVjdHMvdW5pdHlfcmxfb3V0cHV0LnByb3Rv", - "GkdtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X3Js", - "X2luaXRpYWxpemF0aW9uX291dHB1dC5wcm90byKaAQoLVW5pdHlPdXRwdXQS", - "NgoJcmxfb3V0cHV0GAEgASgLMiMuY29tbXVuaWNhdG9yX29iamVjdHMuVW5p", - "dHlSTE91dHB1dBJTChhybF9pbml0aWFsaXphdGlvbl9vdXRwdXQYAiABKAsy", - "MS5jb21tdW5pY2F0b3Jfb2JqZWN0cy5Vbml0eVJMSW5pdGlhbGl6YXRpb25P", - "dXRwdXRCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3Rv", - "Mw==")); + "Cidjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9vdXRwdXQucHJvdG8SFGNv", + "bW11bmljYXRvcl9vYmplY3RzGipjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0", + "eV9ybF9vdXRwdXQucHJvdG8aOWNvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5", + "X3JsX2luaXRpYWxpemF0aW9uX291dHB1dC5wcm90byKaAQoLVW5pdHlPdXRw", + "dXQSNgoJcmxfb3V0cHV0GAEgASgLMiMuY29tbXVuaWNhdG9yX29iamVjdHMu", + "VW5pdHlSTE91dHB1dBJTChhybF9pbml0aWFsaXphdGlvbl9vdXRwdXQYAiAB", + "KAsyMS5jb21tdW5pY2F0b3Jfb2JqZWN0cy5Vbml0eVJMSW5pdGlhbGl6YXRp", + "b25PdXRwdXRCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVjdHNiBnBy", + "b3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.UnityRlOutputReflection.Descriptor, global::MLAgents.CommunicatorObjects.UnityRlInitializationOutputReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { @@ -69,8 +68,8 @@ public UnityOutput() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public UnityOutput(UnityOutput other) : this() { - rlOutput_ = other.rlOutput_ != null ? other.rlOutput_.Clone() : null; - rlInitializationOutput_ = other.rlInitializationOutput_ != null ? other.rlInitializationOutput_.Clone() : null; + RlOutput = other.rlOutput_ != null ? other.RlOutput.Clone() : null; + RlInitializationOutput = other.rlInitializationOutput_ != null ? other.RlInitializationOutput.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs.meta index 256098d3b1..1516896ad4 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityOutput.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5b7166f97831f45ef86df5eed0042240 +guid: 546f38fe479d240eabdf11ac55ecf7d4 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs similarity index 90% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs index af1f18a1ea..a8fda8ec9b 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_rl_initialization_input.proto +// source: communicator_objects/unity_rl_initialization_input.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/unity_rl_initialization_input.proto + /// Holder for reflection information generated from communicator_objects/unity_rl_initialization_input.proto public static partial class UnityRlInitializationInputReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/unity_rl_initialization_input.proto + /// File descriptor for communicator_objects/unity_rl_initialization_input.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,10 +24,10 @@ public static partial class UnityRlInitializationInputReflection { static UnityRlInitializationInputReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CkZtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X3Js", - "X2luaXRpYWxpemF0aW9uX2lucHV0LnByb3RvEhRjb21tdW5pY2F0b3Jfb2Jq", - "ZWN0cyIqChpVbml0eVJMSW5pdGlhbGl6YXRpb25JbnB1dBIMCgRzZWVkGAEg", - "ASgFQh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JPYmplY3RzYgZwcm90bzM=")); + "Cjhjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9ybF9pbml0aWFsaXphdGlv", + "bl9pbnB1dC5wcm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMiKgoaVW5pdHlS", + "TEluaXRpYWxpemF0aW9uSW5wdXQSDAoEc2VlZBgBIAEoBUIfqgIcTUxBZ2Vu", + "dHMuQ29tbXVuaWNhdG9yT2JqZWN0c2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs.meta index eb0f1e1c26..4325bd79fc 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationInput.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6c81750abd5a9432babe1834534122c0 +guid: d9c1712ba119a47458082c7190c838b0 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs similarity index 89% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs index 5474156102..2b1cf26b70 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_rl_initialization_output.proto +// source: communicator_objects/unity_rl_initialization_output.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/unity_rl_initialization_output.proto + /// Holder for reflection information generated from communicator_objects/unity_rl_initialization_output.proto public static partial class UnityRlInitializationOutputReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/unity_rl_initialization_output.proto + /// File descriptor for communicator_objects/unity_rl_initialization_output.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,18 +24,17 @@ public static partial class UnityRlInitializationOutputReflection { static UnityRlInitializationOutputReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CkdtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X3Js", - "X2luaXRpYWxpemF0aW9uX291dHB1dC5wcm90bxIUY29tbXVuaWNhdG9yX29i", - "amVjdHMaP21sYWdlbnRzL2VudnMvY29tbXVuaWNhdG9yX29iamVjdHMvYnJh", - "aW5fcGFyYW1ldGVyc19wcm90by5wcm90bxpFbWxhZ2VudHMvZW52cy9jb21t", - "dW5pY2F0b3Jfb2JqZWN0cy9lbnZpcm9ubWVudF9wYXJhbWV0ZXJzX3Byb3Rv", - "LnByb3RvIuYBChtVbml0eVJMSW5pdGlhbGl6YXRpb25PdXRwdXQSDAoEbmFt", - "ZRgBIAEoCRIPCgd2ZXJzaW9uGAIgASgJEhAKCGxvZ19wYXRoGAMgASgJEkQK", - "EGJyYWluX3BhcmFtZXRlcnMYBSADKAsyKi5jb21tdW5pY2F0b3Jfb2JqZWN0", - "cy5CcmFpblBhcmFtZXRlcnNQcm90bxJQChZlbnZpcm9ubWVudF9wYXJhbWV0", - "ZXJzGAYgASgLMjAuY29tbXVuaWNhdG9yX29iamVjdHMuRW52aXJvbm1lbnRQ", - "YXJhbWV0ZXJzUHJvdG9CH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9iamVj", - "dHNiBnByb3RvMw==")); + "Cjljb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9ybF9pbml0aWFsaXphdGlv", + "bl9vdXRwdXQucHJvdG8SFGNvbW11bmljYXRvcl9vYmplY3RzGjFjb21tdW5p", + "Y2F0b3Jfb2JqZWN0cy9icmFpbl9wYXJhbWV0ZXJzX3Byb3RvLnByb3RvGjdj", + "b21tdW5pY2F0b3Jfb2JqZWN0cy9lbnZpcm9ubWVudF9wYXJhbWV0ZXJzX3By", + "b3RvLnByb3RvIuYBChtVbml0eVJMSW5pdGlhbGl6YXRpb25PdXRwdXQSDAoE", + "bmFtZRgBIAEoCRIPCgd2ZXJzaW9uGAIgASgJEhAKCGxvZ19wYXRoGAMgASgJ", + "EkQKEGJyYWluX3BhcmFtZXRlcnMYBSADKAsyKi5jb21tdW5pY2F0b3Jfb2Jq", + "ZWN0cy5CcmFpblBhcmFtZXRlcnNQcm90bxJQChZlbnZpcm9ubWVudF9wYXJh", + "bWV0ZXJzGAYgASgLMjAuY29tbXVuaWNhdG9yX29iamVjdHMuRW52aXJvbm1l", + "bnRQYXJhbWV0ZXJzUHJvdG9CH6oCHE1MQWdlbnRzLkNvbW11bmljYXRvck9i", + "amVjdHNiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.BrainParametersProtoReflection.Descriptor, global::MLAgents.CommunicatorObjects.EnvironmentParametersProtoReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { @@ -78,7 +77,7 @@ public UnityRLInitializationOutput(UnityRLInitializationOutput other) : this() { version_ = other.version_; logPath_ = other.logPath_; brainParameters_ = other.brainParameters_.Clone(); - environmentParameters_ = other.environmentParameters_ != null ? other.environmentParameters_.Clone() : null; + EnvironmentParameters = other.environmentParameters_ != null ? other.EnvironmentParameters.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs.meta index 1afe3779a9..dbe55dd870 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInitializationOutput.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f7ac9dd525a2246688054b2442eda28a +guid: cfac266f05f674dbd8dc50e8e9b29753 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs similarity index 90% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs index ba9ba7c9f0..7e85699428 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_rl_input.proto +// source: communicator_objects/unity_rl_input.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/unity_rl_input.proto + /// Holder for reflection information generated from communicator_objects/unity_rl_input.proto public static partial class UnityRlInputReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/unity_rl_input.proto + /// File descriptor for communicator_objects/unity_rl_input.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,23 +24,22 @@ public static partial class UnityRlInputReflection { static UnityRlInputReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjdtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X3Js", - "X2lucHV0LnByb3RvEhRjb21tdW5pY2F0b3Jfb2JqZWN0cxo7bWxhZ2VudHMv", - "ZW52cy9jb21tdW5pY2F0b3Jfb2JqZWN0cy9hZ2VudF9hY3Rpb25fcHJvdG8u", - "cHJvdG8aRW1sYWdlbnRzL2VudnMvY29tbXVuaWNhdG9yX29iamVjdHMvZW52", - "aXJvbm1lbnRfcGFyYW1ldGVyc19wcm90by5wcm90bxo2bWxhZ2VudHMvZW52", - "cy9jb21tdW5pY2F0b3Jfb2JqZWN0cy9jb21tYW5kX3Byb3RvLnByb3RvIrQD", - "CgxVbml0eVJMSW5wdXQSSwoNYWdlbnRfYWN0aW9ucxgBIAMoCzI0LmNvbW11", - "bmljYXRvcl9vYmplY3RzLlVuaXR5UkxJbnB1dC5BZ2VudEFjdGlvbnNFbnRy", - "eRJQChZlbnZpcm9ubWVudF9wYXJhbWV0ZXJzGAIgASgLMjAuY29tbXVuaWNh", - "dG9yX29iamVjdHMuRW52aXJvbm1lbnRQYXJhbWV0ZXJzUHJvdG8SEwoLaXNf", - "dHJhaW5pbmcYAyABKAgSMwoHY29tbWFuZBgEIAEoDjIiLmNvbW11bmljYXRv", - "cl9vYmplY3RzLkNvbW1hbmRQcm90bxpNChRMaXN0QWdlbnRBY3Rpb25Qcm90", - "bxI1CgV2YWx1ZRgBIAMoCzImLmNvbW11bmljYXRvcl9vYmplY3RzLkFnZW50", - "QWN0aW9uUHJvdG8abAoRQWdlbnRBY3Rpb25zRW50cnkSCwoDa2V5GAEgASgJ", - "EkYKBXZhbHVlGAIgASgLMjcuY29tbXVuaWNhdG9yX29iamVjdHMuVW5pdHlS", - "TElucHV0Lkxpc3RBZ2VudEFjdGlvblByb3RvOgI4AUIfqgIcTUxBZ2VudHMu", - "Q29tbXVuaWNhdG9yT2JqZWN0c2IGcHJvdG8z")); + "Ciljb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9ybF9pbnB1dC5wcm90bxIU", + "Y29tbXVuaWNhdG9yX29iamVjdHMaLWNvbW11bmljYXRvcl9vYmplY3RzL2Fn", + "ZW50X2FjdGlvbl9wcm90by5wcm90bxo3Y29tbXVuaWNhdG9yX29iamVjdHMv", + "ZW52aXJvbm1lbnRfcGFyYW1ldGVyc19wcm90by5wcm90bxooY29tbXVuaWNh", + "dG9yX29iamVjdHMvY29tbWFuZF9wcm90by5wcm90byK0AwoMVW5pdHlSTElu", + "cHV0EksKDWFnZW50X2FjdGlvbnMYASADKAsyNC5jb21tdW5pY2F0b3Jfb2Jq", + "ZWN0cy5Vbml0eVJMSW5wdXQuQWdlbnRBY3Rpb25zRW50cnkSUAoWZW52aXJv", + "bm1lbnRfcGFyYW1ldGVycxgCIAEoCzIwLmNvbW11bmljYXRvcl9vYmplY3Rz", + "LkVudmlyb25tZW50UGFyYW1ldGVyc1Byb3RvEhMKC2lzX3RyYWluaW5nGAMg", + "ASgIEjMKB2NvbW1hbmQYBCABKA4yIi5jb21tdW5pY2F0b3Jfb2JqZWN0cy5D", + "b21tYW5kUHJvdG8aTQoUTGlzdEFnZW50QWN0aW9uUHJvdG8SNQoFdmFsdWUY", + "ASADKAsyJi5jb21tdW5pY2F0b3Jfb2JqZWN0cy5BZ2VudEFjdGlvblByb3Rv", + "GmwKEUFnZW50QWN0aW9uc0VudHJ5EgsKA2tleRgBIAEoCRJGCgV2YWx1ZRgC", + "IAEoCzI3LmNvbW11bmljYXRvcl9vYmplY3RzLlVuaXR5UkxJbnB1dC5MaXN0", + "QWdlbnRBY3Rpb25Qcm90bzoCOAFCH6oCHE1MQWdlbnRzLkNvbW11bmljYXRv", + "ck9iamVjdHNiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.AgentActionProtoReflection.Descriptor, global::MLAgents.CommunicatorObjects.EnvironmentParametersProtoReflection.Descriptor, global::MLAgents.CommunicatorObjects.CommandProtoReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { @@ -78,7 +77,7 @@ public UnityRLInput() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public UnityRLInput(UnityRLInput other) : this() { agentActions_ = other.agentActions_.Clone(); - environmentParameters_ = other.environmentParameters_ != null ? other.environmentParameters_.Clone() : null; + EnvironmentParameters = other.environmentParameters_ != null ? other.EnvironmentParameters.Clone() : null; isTraining_ = other.isTraining_; command_ = other.command_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs.meta index f381783a35..4cdc003df1 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlInput.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 24680ffa432734c09b4660d82303cbd2 +guid: 0283aaaebbbaf4c438db36396a5e3885 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs similarity index 92% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs index 1cba8f68fc..cc63ef9e30 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_rl_output.proto +// source: communicator_objects/unity_rl_output.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/unity_rl_output.proto + /// Holder for reflection information generated from communicator_objects/unity_rl_output.proto public static partial class UnityRlOutputReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/unity_rl_output.proto + /// File descriptor for communicator_objects/unity_rl_output.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,17 +24,16 @@ public static partial class UnityRlOutputReflection { static UnityRlOutputReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjhtbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X3Js", - "X291dHB1dC5wcm90bxIUY29tbXVuaWNhdG9yX29iamVjdHMaOW1sYWdlbnRz", - "L2VudnMvY29tbXVuaWNhdG9yX29iamVjdHMvYWdlbnRfaW5mb19wcm90by5w", - "cm90byKjAgoNVW5pdHlSTE91dHB1dBITCgtnbG9iYWxfZG9uZRgBIAEoCBJH", - "CgphZ2VudEluZm9zGAIgAygLMjMuY29tbXVuaWNhdG9yX29iamVjdHMuVW5p", - "dHlSTE91dHB1dC5BZ2VudEluZm9zRW50cnkaSQoSTGlzdEFnZW50SW5mb1By", - "b3RvEjMKBXZhbHVlGAEgAygLMiQuY29tbXVuaWNhdG9yX29iamVjdHMuQWdl", - "bnRJbmZvUHJvdG8aaQoPQWdlbnRJbmZvc0VudHJ5EgsKA2tleRgBIAEoCRJF", - "CgV2YWx1ZRgCIAEoCzI2LmNvbW11bmljYXRvcl9vYmplY3RzLlVuaXR5UkxP", - "dXRwdXQuTGlzdEFnZW50SW5mb1Byb3RvOgI4AUIfqgIcTUxBZ2VudHMuQ29t", - "bXVuaWNhdG9yT2JqZWN0c2IGcHJvdG8z")); + "Cipjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9ybF9vdXRwdXQucHJvdG8S", + "FGNvbW11bmljYXRvcl9vYmplY3RzGitjb21tdW5pY2F0b3Jfb2JqZWN0cy9h", + "Z2VudF9pbmZvX3Byb3RvLnByb3RvIqMCCg1Vbml0eVJMT3V0cHV0EhMKC2ds", + "b2JhbF9kb25lGAEgASgIEkcKCmFnZW50SW5mb3MYAiADKAsyMy5jb21tdW5p", + "Y2F0b3Jfb2JqZWN0cy5Vbml0eVJMT3V0cHV0LkFnZW50SW5mb3NFbnRyeRpJ", + "ChJMaXN0QWdlbnRJbmZvUHJvdG8SMwoFdmFsdWUYASADKAsyJC5jb21tdW5p", + "Y2F0b3Jfb2JqZWN0cy5BZ2VudEluZm9Qcm90bxppCg9BZ2VudEluZm9zRW50", + "cnkSCwoDa2V5GAEgASgJEkUKBXZhbHVlGAIgASgLMjYuY29tbXVuaWNhdG9y", + "X29iamVjdHMuVW5pdHlSTE91dHB1dC5MaXN0QWdlbnRJbmZvUHJvdG86AjgB", + "Qh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JPYmplY3RzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.AgentInfoProtoReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs.meta index 6d7405ef9e..8a73687116 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityRlOutput.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: af13b8fefefa74a948934dd273f94c4a +guid: a6665911e84e24b7e970f63662f55713 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs similarity index 54% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs index 69560e2cd2..0e7e850417 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs @@ -1,7 +1,5 @@ -// -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_to_external.proto -// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: communicator_objects/unity_to_external.proto #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +9,11 @@ using scg = global::System.Collections.Generic; namespace MLAgents.CommunicatorObjects { - /// Holder for reflection information generated from mlagents/envs/communicator_objects/unity_to_external.proto + /// Holder for reflection information generated from communicator_objects/unity_to_external.proto public static partial class UnityToExternalReflection { #region Descriptor - /// File descriptor for mlagents/envs/communicator_objects/unity_to_external.proto + /// File descriptor for communicator_objects/unity_to_external.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,13 +22,12 @@ public static partial class UnityToExternalReflection { static UnityToExternalReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CjptbGFnZW50cy9lbnZzL2NvbW11bmljYXRvcl9vYmplY3RzL3VuaXR5X3Rv", - "X2V4dGVybmFsLnByb3RvEhRjb21tdW5pY2F0b3Jfb2JqZWN0cxo2bWxhZ2Vu", - "dHMvZW52cy9jb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV9tZXNzYWdlLnBy", - "b3RvMmcKD1VuaXR5VG9FeHRlcm5hbBJUCghFeGNoYW5nZRIiLmNvbW11bmlj", - "YXRvcl9vYmplY3RzLlVuaXR5TWVzc2FnZRoiLmNvbW11bmljYXRvcl9vYmpl", - "Y3RzLlVuaXR5TWVzc2FnZSIAQh+qAhxNTEFnZW50cy5Db21tdW5pY2F0b3JP", - "YmplY3RzYgZwcm90bzM=")); + "Cixjb21tdW5pY2F0b3Jfb2JqZWN0cy91bml0eV90b19leHRlcm5hbC5wcm90", + "bxIUY29tbXVuaWNhdG9yX29iamVjdHMaKGNvbW11bmljYXRvcl9vYmplY3Rz", + "L3VuaXR5X21lc3NhZ2UucHJvdG8yZwoPVW5pdHlUb0V4dGVybmFsElQKCEV4", + "Y2hhbmdlEiIuY29tbXVuaWNhdG9yX29iamVjdHMuVW5pdHlNZXNzYWdlGiIu", + "Y29tbXVuaWNhdG9yX29iamVjdHMuVW5pdHlNZXNzYWdlIgBCH6oCHE1MQWdl", + "bnRzLkNvbW11bmljYXRvck9iamVjdHNiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::MLAgents.CommunicatorObjects.UnityMessageReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null)); diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs.meta index 9354726578..970211f9f0 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternal.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 199e76fc828bc4561abad51402438e07 +guid: 553c6b5d2feba4ef69206f0e0a2a92a3 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs similarity index 88% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs index a5074fcf85..8be5278b27 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs @@ -1,10 +1,13 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mlagents/envs/communicator_objects/unity_to_external.proto +// source: communicator_objects/unity_to_external.proto // -#pragma warning disable 0414, 1591 +#pragma warning disable 1591 #region Designer generated code +using System; +using System.Threading; +using System.Threading.Tasks; using grpc = global::Grpc.Core; namespace MLAgents.CommunicatorObjects { @@ -12,14 +15,14 @@ public static partial class UnityToExternal { static readonly string __ServiceName = "communicator_objects.UnityToExternal"; - static readonly grpc::Marshaller __Marshaller_communicator_objects_UnityMessage = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MLAgents.CommunicatorObjects.UnityMessage.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_UnityMessage = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MLAgents.CommunicatorObjects.UnityMessage.Parser.ParseFrom); static readonly grpc::Method __Method_Exchange = new grpc::Method( grpc::MethodType.Unary, __ServiceName, "Exchange", - __Marshaller_communicator_objects_UnityMessage, - __Marshaller_communicator_objects_UnityMessage); + __Marshaller_UnityMessage, + __Marshaller_UnityMessage); /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor @@ -74,7 +77,7 @@ protected UnityToExternalClient(ClientBaseConfiguration configuration) : base(co /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. - public virtual global::MLAgents.CommunicatorObjects.UnityMessage Exchange(global::MLAgents.CommunicatorObjects.UnityMessage request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + public virtual global::MLAgents.CommunicatorObjects.UnityMessage Exchange(global::MLAgents.CommunicatorObjects.UnityMessage request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return Exchange(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } @@ -96,7 +99,7 @@ protected UnityToExternalClient(ClientBaseConfiguration configuration) : base(co /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. - public virtual grpc::AsyncUnaryCall ExchangeAsync(global::MLAgents.CommunicatorObjects.UnityMessage request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + public virtual grpc::AsyncUnaryCall ExchangeAsync(global::MLAgents.CommunicatorObjects.UnityMessage request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return ExchangeAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs.meta similarity index 83% rename from UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs.meta index 3397b63763..4b7f96a0db 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs.meta +++ b/unity-environment/Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0378b2871a6c649f69c2f32d5c0fb045 +guid: d3ea7da815b0b4d938c13e621f57db04 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrain.cs b/unity-environment/Assets/ML-Agents/Scripts/CoreBrain.cs similarity index 92% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrain.cs rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrain.cs index 893bb1e6b5..b57f68908c 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrain.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CoreBrain.cs @@ -14,7 +14,7 @@ public interface CoreBrain void SetBrain(Brain b); /// Implement this method to initialize CoreBrain - void InitializeCoreBrain(Batcher brainBatcher); + void InitializeCoreBrain(MLAgents.Batcher brainBatcher); /// Implement this method to define the logic for deciding actions void DecideAction(Dictionary agentInfo); diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrain.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CoreBrain.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrain.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrain.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainExternal.cs b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainExternal.cs similarity index 72% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrainExternal.cs rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrainExternal.cs index 1fdf5f75ae..ce878c2823 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainExternal.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainExternal.cs @@ -10,7 +10,7 @@ public class CoreBrainExternal : ScriptableObject, CoreBrain /**< Reference to the brain that uses this CoreBrainExternal */ public Brain brain; - Batcher brainBatcher; + MLAgents.Batcher brainBatcher; /// Creates the reference to the brain public void SetBrain(Brain b) @@ -20,13 +20,16 @@ public void SetBrain(Brain b) /// Generates the communicator for the Academy if none was present and /// subscribe to ExternalCommunicator if it was present. - public void InitializeCoreBrain(Batcher brainBatcher) + public void InitializeCoreBrain(MLAgents.Batcher brainBatcher) { if (brainBatcher == null) { brainBatcher = null; - throw new UnityAgentsException($"The brain {brain.gameObject.name} was set to" + " External mode" + - " but Unity was unable to read the" + " arguments passed at launch."); + throw new UnityAgentsException(string.Format("The brain {0} was set to" + + " External mode" + + " but Unity was unable to read the" + + " arguments passed at launch.", + brain.gameObject.name)); } else { @@ -44,6 +47,8 @@ public void DecideAction(Dictionary agentInfo) { brainBatcher.SendBrainInfo(brain.gameObject.name, agentInfo); } + + return; } /// Nothing needs to appear in the inspector diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainExternal.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainExternal.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrainExternal.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrainExternal.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs similarity index 92% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs index 16d7b5454f..a7d866d8da 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs @@ -16,7 +16,7 @@ public class CoreBrainHeuristic : ScriptableObject, CoreBrain /**< Reference to the brain that uses this CoreBrainHeuristic */ public Brain brain; - Batcher brainBatcher; + MLAgents.Batcher brainBatcher; /**< Reference to the Decision component used to decide the actions */ public Decision decision; @@ -28,7 +28,7 @@ public void SetBrain(Brain b) } /// Create the reference to decision - public void InitializeCoreBrain(Batcher brainBatcher) + public void InitializeCoreBrain(MLAgents.Batcher brainBatcher) { decision = brain.gameObject.GetComponent(); @@ -48,7 +48,10 @@ public void InitializeCoreBrain(Batcher brainBatcher) /// Uses the Decision Component to decide that action to take public void DecideAction(Dictionary agentInfo) { - brainBatcher?.SendBrainInfo(brain.gameObject.name, agentInfo); + if (brainBatcher != null) + { + brainBatcher.SendBrainInfo(brain.gameObject.name, agentInfo); + } if (decision == null) { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs.meta diff --git a/unity-environment/Assets/ML-Agents/Scripts/CoreBrainInternal.cs b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainInternal.cs new file mode 100644 index 0000000000..7ac54c24b8 --- /dev/null +++ b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainInternal.cs @@ -0,0 +1,600 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +using System.Linq; + +#if ENABLE_TENSORFLOW +using TensorFlow; +#endif + +namespace MLAgents +{ + /// CoreBrain which decides actions using internally embedded TensorFlow model. + public class CoreBrainInternal : ScriptableObject, CoreBrain + { + + [SerializeField] + [Tooltip("If checked, the brain will broadcast states and actions to Python.")] +#pragma warning disable + private bool broadcast = true; +#pragma warning restore + + [System.Serializable] + private struct TensorFlowAgentPlaceholder + { + public enum tensorType + { + Integer, + FloatingPoint + }; + + public string name; + public tensorType valueType; + public float minValue; + public float maxValue; + + } + + MLAgents.Batcher brainBatcher; + + [Tooltip("This must be the bytes file corresponding to the pretrained TensorFlow graph.")] + /// Modify only in inspector : Reference to the Graph asset + public TextAsset graphModel; + + /// Modify only in inspector : If a scope was used when training the model, specify it here + public string graphScope; + + [SerializeField] + [Tooltip( + "If your graph takes additional inputs that are fixed (example: noise level) you can specify them here.")] + /// Modify only in inspector : If your graph takes additional inputs that are fixed you can specify them here. + private TensorFlowAgentPlaceholder[] graphPlaceholders; + + /// Modify only in inspector : Name of the placholder of the batch size + public string BatchSizePlaceholderName = "batch_size"; + + /// Modify only in inspector : Name of the state placeholder + public string VectorObservationPlacholderName = "vector_observation"; + + /// Modify only in inspector : Name of the recurrent input + public string RecurrentInPlaceholderName = "recurrent_in"; + + /// Modify only in inspector : Name of the recurrent output + public string RecurrentOutPlaceholderName = "recurrent_out"; + + /// Modify only in inspector : Names of the observations placeholders + public string[] VisualObservationPlaceholderName; + + /// Modify only in inspector : Name of the action node + public string ActionPlaceholderName = "action"; + + /// Modify only in inspector : Name of the previous action node + public string PreviousActionPlaceholderName = "prev_action"; +#if ENABLE_TENSORFLOW + TFGraph graph; + TFSession session; + bool hasRecurrent; + bool hasState; + bool hasBatchSize; + bool hasPrevAction; + float[,] inputState; + int[] inputPrevAction; + List observationMatrixList; + float[,] inputOldMemories; + List texturesHolder; + int memorySize; +#endif + + /// Reference to the brain that uses this CoreBrainInternal + public Brain brain; + + /// Create the reference to the brain + public void SetBrain(Brain b) + { + brain = b; + } + + /// Loads the tensorflow graph model to generate a TFGraph object + public void InitializeCoreBrain(MLAgents.Batcher brainBatcher) + { +#if ENABLE_TENSORFLOW +#if UNITY_ANDROID + // This needs to ba called only once and will raise an exception if + // there are multiple internal brains + try{ + TensorFlowSharp.Android.NativeBinding.Init(); + } + catch{ + + } +#endif + if ((brainBatcher == null) + || (!broadcast)) + { + this.brainBatcher = null; + } + else + { + this.brainBatcher = brainBatcher; + this.brainBatcher.SubscribeBrain(brain.gameObject.name); + } + + if (graphModel != null) + { + + graph = new TFGraph(); + + graph.Import(graphModel.bytes); + + session = new TFSession(graph); + + // TODO: Make this a loop over a dynamic set of graph inputs + + if ((graphScope.Length > 1) && (graphScope[graphScope.Length - 1] != '/')) + { + graphScope = graphScope + '/'; + } + + if (graph[graphScope + BatchSizePlaceholderName] != null) + { + hasBatchSize = true; + } + if ((graph[graphScope + RecurrentInPlaceholderName] != null) && (graph[graphScope + RecurrentOutPlaceholderName] != null)) + { + hasRecurrent = true; + var runner = session.GetRunner(); + runner.Fetch(graph[graphScope + "memory_size"][0]); + var networkOutput = runner.Run()[0].GetValue(); + memorySize = (int)networkOutput; + } + if (graph[graphScope + VectorObservationPlacholderName] != null) + { + hasState = true; + } + if (graph[graphScope + PreviousActionPlaceholderName] != null) + { + hasPrevAction = true; + } + } + observationMatrixList = new List(); + texturesHolder = new List(); +#endif + } + + + + /// Uses the stored information to run the tensorflow graph and generate + /// the actions. + public void DecideAction(Dictionary agentInfo) + { +#if ENABLE_TENSORFLOW + if (brainBatcher != null) + { + brainBatcher.SendBrainInfo(brain.gameObject.name, agentInfo); + } + int currentBatchSize = agentInfo.Count(); + List agentList = agentInfo.Keys.ToList(); + if (currentBatchSize == 0) + { + return; + } + + + // Create the state tensor + if (hasState) + { + int stateLength = 1; + if (brain.brainParameters.vectorObservationSpaceType == SpaceType.continuous) + { + stateLength = brain.brainParameters.vectorObservationSize; + } + inputState = + new float[currentBatchSize, stateLength * brain.brainParameters.numStackedVectorObservations]; + + var i = 0; + foreach (Agent agent in agentList) + { + List state_list = agentInfo[agent].stackedVectorObservation; + for (int j = + 0; j < stateLength * brain.brainParameters.numStackedVectorObservations; j++) + { + inputState[i, j] = state_list[j]; + } + i++; + } + } + + // Create the state tensor + if (hasPrevAction) + { + inputPrevAction = new int[currentBatchSize]; + var i = 0; + foreach (Agent agent in agentList) + { + float[] action_list = agentInfo[agent].storedVectorActions; + inputPrevAction[i] = Mathf.FloorToInt(action_list[0]); + i++; + } + } + + + observationMatrixList.Clear(); + for (int observationIndex = + 0; observationIndex < brain.brainParameters.cameraResolutions.Count(); observationIndex++){ + texturesHolder.Clear(); + foreach (Agent agent in agentList){ + texturesHolder.Add(agentInfo[agent].visualObservations[observationIndex]); + } + observationMatrixList.Add( + BatchVisualObservations(texturesHolder, brain.brainParameters.cameraResolutions[observationIndex].blackAndWhite)); + + } + + // Create the recurrent tensor + if (hasRecurrent) + { + // Need to have variable memory size + inputOldMemories = new float[currentBatchSize, memorySize]; + var i = 0; + foreach (Agent agent in agentList) + { + float[] m = agentInfo[agent].memories.ToArray(); + for (int j = 0; j < m.Count(); j++) + { + inputOldMemories[i, j] = m[j]; + } + i++; + } + } + + + var runner = session.GetRunner(); + try + { + runner.Fetch(graph[graphScope + ActionPlaceholderName][0]); + } + catch + { + throw new UnityAgentsException(string.Format(@"The node {0} could not be found. Please make sure the graphScope {1} is correct", + graphScope + ActionPlaceholderName, graphScope)); + } + + if (hasBatchSize) + { + runner.AddInput(graph[graphScope + BatchSizePlaceholderName][0], new int[] { currentBatchSize }); + } + + foreach (TensorFlowAgentPlaceholder placeholder in graphPlaceholders) + { + try + { + if (placeholder.valueType == TensorFlowAgentPlaceholder.tensorType.FloatingPoint) + { + runner.AddInput(graph[graphScope + placeholder.name][0], new float[] { Random.Range(placeholder.minValue, placeholder.maxValue) }); + } + else if (placeholder.valueType == TensorFlowAgentPlaceholder.tensorType.Integer) + { + runner.AddInput(graph[graphScope + placeholder.name][0], new int[] { Random.Range((int)placeholder.minValue, (int)placeholder.maxValue + 1) }); + } + } + catch + { + throw new UnityAgentsException(string.Format(@"One of the Tensorflow placeholder cound nout be found. + In brain {0}, there are no {1} placeholder named {2}.", + brain.gameObject.name, placeholder.valueType.ToString(), graphScope + placeholder.name)); + } + } + + // Create the state tensor + if (hasState) + { + if (brain.brainParameters.vectorObservationSpaceType == SpaceType.discrete) + { + var discreteInputState = new int[currentBatchSize, 1]; + for (int i = 0; i < currentBatchSize; i++) + { + discreteInputState[i, 0] = (int)inputState[i, 0]; + } + runner.AddInput(graph[graphScope + VectorObservationPlacholderName][0], discreteInputState); + } + else + { + runner.AddInput(graph[graphScope + VectorObservationPlacholderName][0], inputState); + } + } + + // Create the previous action tensor + if (hasPrevAction) + { + runner.AddInput(graph[graphScope + PreviousActionPlaceholderName][0], inputPrevAction); + } + + // Create the observation tensors + for (int obs_number = + 0; obs_number < brain.brainParameters.cameraResolutions.Length; obs_number++) + { + runner.AddInput(graph[graphScope + VisualObservationPlaceholderName[obs_number]][0], observationMatrixList[obs_number]); + } + + if (hasRecurrent) + { + runner.AddInput(graph[graphScope + "sequence_length"][0], 1); + runner.AddInput(graph[graphScope + RecurrentInPlaceholderName][0], inputOldMemories); + runner.Fetch(graph[graphScope + RecurrentOutPlaceholderName][0]); + } + + TFTensor[] networkOutput; + try + { + networkOutput = runner.Run(); + } + catch (TFException e) + { + string errorMessage = e.Message; + try + { + errorMessage = + string.Format(@"The tensorflow graph needs an input for {0} of type {1}", + e.Message.Split(new string[] { "Node: " }, 0)[1].Split('=')[0], + e.Message.Split(new string[] { "dtype=" }, 0)[1].Split(',')[0]); + } + finally + { + throw new UnityAgentsException(errorMessage); + } + + } + + // Create the recurrent tensor + if (hasRecurrent) + { + float[,] recurrent_tensor = networkOutput[1].GetValue() as float[,]; + + var i = 0; + foreach (Agent agent in agentList) + { + var m = new float[memorySize]; + for (int j = 0; j < memorySize; j++) + { + m[j] = recurrent_tensor[i, j]; + } + agent.UpdateMemoriesAction(m.ToList()); + i++; + } + + } + + if (brain.brainParameters.vectorActionSpaceType == SpaceType.continuous) + { + var output = networkOutput[0].GetValue() as float[,]; + var i = 0; + foreach (Agent agent in agentList) + { + var a = new float[brain.brainParameters.vectorActionSize]; + for (int j = 0; j < brain.brainParameters.vectorActionSize; j++) + { + a[j] = output[i, j]; + } + agent.UpdateVectorAction(a); + i++; + } + } + else if (brain.brainParameters.vectorActionSpaceType == SpaceType.discrete) + { + long[,] output = networkOutput[0].GetValue() as long[,]; + var i = 0; + foreach (Agent agent in agentList) + { + var a = new float[1] { (float)(output[i, 0]) }; + agent.UpdateVectorAction(a); + i++; + } + } + + + + +#else + if (agentInfo.Count > 0) + { + throw new UnityAgentsException(string.Format( + @"The brain {0} was set to Internal but the Tensorflow + library is not present in the Unity project.", + brain.gameObject.name)); + } +#endif + } + + /// Displays the parameters of the CoreBrainInternal in the Inspector + public void OnInspector() + { +#if ENABLE_TENSORFLOW && UNITY_EDITOR + EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); + broadcast = EditorGUILayout.Toggle(new GUIContent("Broadcast", + "If checked, the brain will broadcast states and actions to Python."), broadcast); + + var serializedBrain = new SerializedObject(this); + GUILayout.Label("Edit the Tensorflow graph parameters here"); + var tfGraphModel = serializedBrain.FindProperty("graphModel"); + serializedBrain.Update(); + EditorGUILayout.ObjectField(tfGraphModel); + serializedBrain.ApplyModifiedProperties(); + + if (graphModel == null) + { + EditorGUILayout.HelpBox("Please provide a tensorflow graph as a bytes file.", MessageType.Error); + } + + + graphScope = + EditorGUILayout.TextField(new GUIContent("Graph Scope", "If you set a scope while training your tensorflow model, " + + "all your placeholder name will have a prefix. You must specify that prefix here."), graphScope); + + if (BatchSizePlaceholderName == "") + { + BatchSizePlaceholderName = "batch_size"; + } + BatchSizePlaceholderName = + EditorGUILayout.TextField(new GUIContent("Batch Size Node Name", "If the batch size is one of " + + "the inputs of your graph, you must specify the name if the placeholder here."), BatchSizePlaceholderName); + if (VectorObservationPlacholderName == "") + { + VectorObservationPlacholderName = "state"; + } + VectorObservationPlacholderName = + EditorGUILayout.TextField(new GUIContent("Vector Observation Node Name", "If your graph uses the state as an input, " + + "you must specify the name if the placeholder here."), VectorObservationPlacholderName); + if (RecurrentInPlaceholderName == "") + { + RecurrentInPlaceholderName = "recurrent_in"; + } + RecurrentInPlaceholderName = + EditorGUILayout.TextField(new GUIContent("Recurrent Input Node Name", "If your graph uses a " + + "recurrent input / memory as input and outputs new recurrent input / memory, " + + "you must specify the name if the input placeholder here."), RecurrentInPlaceholderName); + if (RecurrentOutPlaceholderName == "") + { + RecurrentOutPlaceholderName = "recurrent_out"; + } + RecurrentOutPlaceholderName = + EditorGUILayout.TextField(new GUIContent("Recurrent Output Node Name", " If your graph uses a " + + "recurrent input / memory as input and outputs new recurrent input / memory, you must specify the name if " + + "the output placeholder here."), RecurrentOutPlaceholderName); + + if (brain.brainParameters.cameraResolutions != null) + { + if (brain.brainParameters.cameraResolutions.Count() > 0) + { + if (VisualObservationPlaceholderName == null) + { + VisualObservationPlaceholderName = + new string[brain.brainParameters.cameraResolutions.Count()]; + } + if (VisualObservationPlaceholderName.Count() != brain.brainParameters.cameraResolutions.Count()) + { + VisualObservationPlaceholderName = + new string[brain.brainParameters.cameraResolutions.Count()]; + } + for (int obs_number = + 0; obs_number < brain.brainParameters.cameraResolutions.Count(); obs_number++) + { + if ((VisualObservationPlaceholderName[obs_number] == "") || (VisualObservationPlaceholderName[obs_number] == null)) + { + + VisualObservationPlaceholderName[obs_number] = + "visual_observation_" + obs_number; + } + } + var opn = serializedBrain.FindProperty("VisualObservationPlaceholderName"); + serializedBrain.Update(); + EditorGUILayout.PropertyField(opn, true); + serializedBrain.ApplyModifiedProperties(); + } + } + + if (ActionPlaceholderName == "") + { + ActionPlaceholderName = "action"; + } + ActionPlaceholderName = + EditorGUILayout.TextField(new GUIContent("Action Node Name", "Specify the name of the " + + "placeholder corresponding to the actions of the brain in your graph. If the action space type is " + + "continuous, the output must be a one dimensional tensor of float of length Action Space Size, " + + "if the action space type is discrete, the output must be a one dimensional tensor of int " + + "of length 1."), ActionPlaceholderName); + + + + var tfPlaceholders = serializedBrain.FindProperty("graphPlaceholders"); + serializedBrain.Update(); + EditorGUILayout.PropertyField(tfPlaceholders, true); + serializedBrain.ApplyModifiedProperties(); +#endif +#if !ENABLE_TENSORFLOW && UNITY_EDITOR + EditorGUILayout.HelpBox( + "You need to install and enable the TensorflowSharp plugin in " + + "order to use the internal brain.", MessageType.Error); + if (GUILayout.Button("Show me how")) + { + Application.OpenURL( + "https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Getting-Started-with-" + + "Balance-Ball.md#embedding-the-trained-brain-into-the-unity-environment-experimental"); + } +#endif + } + + /// + /// Converts a list of Texture2D into a Tensor. + /// + /// + /// A 4 dimensional float Tensor of dimension + /// [batch_size, height, width, channel]. + /// Where batch_size is the number of input textures, + /// height corresponds to the height of the texture, + /// width corresponds to the width of the texture, + /// channel corresponds to the number of channels extracted from the + /// input textures (based on the input blackAndWhite flag + /// (3 if the flag is false, 1 otherwise). + /// The values of the Tensor are between 0 and 1. + /// + /// + /// The list of textures to be put into the tensor. + /// Note that the textures must have same width and height. + /// + /// + /// If set to true the textures + /// will be converted to grayscale before being stored in the tensor. + /// + public static float[,,,] BatchVisualObservations( + List textures, bool blackAndWhite) + { + int batchSize = textures.Count(); + int width = textures[0].width; + int height = textures[0].height; + int pixels = 0; + if (blackAndWhite) + pixels = 1; + else + pixels = 3; + float[,,,] result = new float[batchSize, height, width, pixels]; + float[] resultTemp = new float[batchSize * height * width * pixels]; + int hwp = height * width * pixels; + int wp = width * pixels; + + for (int b = 0; b < batchSize; b++) + { + Color32[] cc = textures[b].GetPixels32(); + for (int h = height - 1; h >= 0; h--) + { + for (int w = 0; w < width; w++) + { + Color32 currentPixel = cc[(height - h - 1) * width + w]; + if (!blackAndWhite) + { + // For Color32, the r, g and b values are between + // 0 and 255. + resultTemp[b * hwp + h * wp + w * pixels] = currentPixel.r / 255.0f; + resultTemp[b * hwp + h * wp + w * pixels + 1] = currentPixel.g / 255.0f; + resultTemp[b * hwp + h * wp + w * pixels + 2] = currentPixel.b / 255.0f; + } + else + { + resultTemp[b * hwp + h * wp + w * pixels] = + (currentPixel.r + currentPixel.g + currentPixel.b) + / 3f / 255.0f; + } + } + } + } + + System.Buffer.BlockCopy(resultTemp, 0, result, 0, batchSize * hwp * sizeof(float)); + return result; + } + + } +} diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainInternal.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainInternal.cs.meta old mode 100644 new mode 100755 similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrainInternal.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrainInternal.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs similarity index 95% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs index ba46c2b093..bed54422fd 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs @@ -18,7 +18,6 @@ public class CoreBrainPlayer : ScriptableObject, CoreBrain private struct DiscretePlayerAction { public KeyCode key; - public int branchIndex; public int value; } @@ -55,6 +54,8 @@ private struct AxisContinuousPlayerAction [Tooltip("The list of keys and the value they correspond to for discrete control.")] /// Contains the mapping from input to discrete actions private DiscretePlayerAction[] discretePlayerActions; + [SerializeField] + private int defaultAction = 0; /// Reference to the brain that uses this CoreBrainPlayer public Brain brain; @@ -94,7 +95,7 @@ public void DecideAction(Dictionary agentInfo) { foreach (Agent agent in agentInfo.Keys) { - var action = new float[brain.brainParameters.vectorActionSize[0]]; + var action = new float[brain.brainParameters.vectorActionSize]; foreach (KeyContinuousPlayerAction cha in keyContinuousPlayerActions) { if (Input.GetKey(cha.key)) @@ -120,14 +121,17 @@ public void DecideAction(Dictionary agentInfo) { foreach (Agent agent in agentInfo.Keys) { - var action = new float[brain.brainParameters.vectorActionSize.Length]; + var action = new float[1] {defaultAction}; foreach (DiscretePlayerAction dha in discretePlayerActions) { if (Input.GetKey(dha.key)) { - action[dha.branchIndex] = (float) dha.value; + action[0] = (float) dha.value; + break; } } + + agent.UpdateVectorAction(action); } @@ -163,7 +167,7 @@ public void OnInspector() } foreach (KeyContinuousPlayerAction action in keyContinuousPlayerActions) { - if (action.index >= brain.brainParameters.vectorActionSize[0]) + if (action.index >= brain.brainParameters.vectorActionSize) { EditorGUILayout.HelpBox( string.Format( @@ -176,7 +180,7 @@ public void OnInspector() } foreach (AxisContinuousPlayerAction action in axisContinuousPlayerActions) { - if (action .index >= brain.brainParameters.vectorActionSize[0]) + if (action .index >= brain.brainParameters.vectorActionSize) { EditorGUILayout.HelpBox( string.Format( @@ -193,6 +197,7 @@ public void OnInspector() else { GUILayout.Label("Edit the discrete inputs for your actions", EditorStyles.boldLabel); + defaultAction = EditorGUILayout.IntField("Default Action", defaultAction); var dhas = serializedBrain.FindProperty("discretePlayerActions"); serializedBrain.Update(); EditorGUILayout.PropertyField(dhas, true); diff --git a/UnitySDK/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/CoreBrainPlayer.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Decision.cs b/unity-environment/Assets/ML-Agents/Scripts/Decision.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Decision.cs rename to unity-environment/Assets/ML-Agents/Scripts/Decision.cs diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Decision.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/Decision.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Decision.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/Decision.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Monitor.cs b/unity-environment/Assets/ML-Agents/Scripts/Monitor.cs similarity index 92% rename from UnitySDK/Assets/ML-Agents/Scripts/Monitor.cs rename to unity-environment/Assets/ML-Agents/Scripts/Monitor.cs index 76c7011ff8..82d6a4745a 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/Monitor.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/Monitor.cs @@ -33,13 +33,6 @@ public enum DisplayType static bool isInstantiated; static GameObject canvas; static Dictionary> displayTransformValues; - - /// - /// Camera used to calculate GUI screen position relative to the target - /// transform. - /// - static Dictionary transformCamera; - static Color[] barColors; struct DisplayValue @@ -75,13 +68,10 @@ public enum ValueType /// The string value you want to display. /// The transform you want to attach the information to. /// - /// Camera used to calculate GUI position relative to - /// the target. If null, `Camera.main` will be used. public static void Log( string key, string value, - Transform target = null, - Camera camera = null) + Transform target = null) { if (!isInstantiated) { @@ -94,8 +84,6 @@ public static void Log( target = canvas.transform; } - transformCamera[target] = camera; - if (!displayTransformValues.Keys.Contains(target)) { displayTransformValues[target] = @@ -145,13 +133,10 @@ public static void Log( /// The float value you want to display. /// The transform you want to attach the information to. /// - /// Camera used to calculate GUI position relative to - /// the target. If null, `Camera.main` will be used. public static void Log( string key, float value, - Transform target = null, - Camera camera = null) + Transform target = null) { if (!isInstantiated) { @@ -164,8 +149,6 @@ public static void Log( target = canvas.transform; } - transformCamera[target] = camera; - if (!displayTransformValues.Keys.Contains(target)) { displayTransformValues[target] = new Dictionary(); @@ -205,14 +188,11 @@ public static void Log( /// The type of display. /// The transform you want to attach the information to. /// - /// Camera used to calculate GUI position relative to - /// the target. If null, `Camera.main` will be used. public static void Log( string key, float[] value, Transform target = null, - DisplayType displayType = DisplayType.INDEPENDENT, - Camera camera = null + DisplayType displayType = DisplayType.INDEPENDENT ) { if (!isInstantiated) @@ -226,8 +206,6 @@ public static void Log( target = canvas.transform; } - transformCamera[target] = camera; - if (!displayTransformValues.Keys.Contains(target)) { displayTransformValues[target] = new Dictionary(); @@ -356,8 +334,6 @@ static void InstantiateCanvas() displayTransformValues = new Dictionary>(); - - transformCamera = new Dictionary(); } /// @@ -378,13 +354,6 @@ void OnGUI() continue; } - // get camera - Camera cam = transformCamera[target]; - if (cam == null) - { - cam = Camera.main; - } - float widthScaler = (Screen.width / 1000f); float keyPixelWidth = 100 * widthScaler; float keyPixelHeight = 20 * widthScaler; @@ -395,11 +364,11 @@ void OnGUI() Screen.width / 2 - keyPixelWidth, Screen.height); if (!(target == canvas.transform)) { - Vector3 cam2obj = target.position - cam.transform.position; + Vector3 cam2obj = target.position - Camera.main.transform.position; scale = Mathf.Min( 1, - 20f / (Vector3.Dot(cam2obj, cam.transform.forward))); - Vector3 worldPosition = cam.WorldToScreenPoint( + 20f / (Vector3.Dot(cam2obj, Camera.main.transform.forward))); + Vector3 worldPosition = Camera.main.WorldToScreenPoint( target.position + new Vector3(0, verticalOffset, 0)); origin = new Vector3( worldPosition.x - keyPixelWidth * scale, Screen.height - worldPosition.y); diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Monitor.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/Monitor.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/Monitor.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/Monitor.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/ResetParameters.cs b/unity-environment/Assets/ML-Agents/Scripts/ResetParameters.cs similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/ResetParameters.cs rename to unity-environment/Assets/ML-Agents/Scripts/ResetParameters.cs diff --git a/UnitySDK/Assets/ML-Agents/Scripts/ResetParameters.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/ResetParameters.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/ResetParameters.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/ResetParameters.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/RpcCommunicator.cs b/unity-environment/Assets/ML-Agents/Scripts/RpcCommunicator.cs similarity index 88% rename from UnitySDK/Assets/ML-Agents/Scripts/RpcCommunicator.cs rename to unity-environment/Assets/ML-Agents/Scripts/RpcCommunicator.cs index 4a1b2fde10..a34408b200 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/RpcCommunicator.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/RpcCommunicator.cs @@ -28,7 +28,7 @@ public class RPCCommunicator : Communicator /// Communicator parameters. public RPCCommunicator(CommunicatorParameters communicatorParameters) { - m_communicatorParameters = communicatorParameters; + this.m_communicatorParameters = communicatorParameters; } /// @@ -50,11 +50,7 @@ public UnityInput Initialize(UnityOutput unityOutput, var result = m_client.Exchange(WrapMessage(unityOutput, 200)); unityInput = m_client.Exchange(WrapMessage(null, 200)).UnityInput; #if UNITY_EDITOR -#if UNITY_2017_2_OR_NEWER EditorApplication.playModeStateChanged += HandleOnPlayModeChanged; -#else - EditorApplication.playmodeStateChanged += HandleOnPlayModeChanged; -#endif #endif return result.UnityInput; } @@ -135,7 +131,6 @@ private void OnApplicationQuit() } #if UNITY_EDITOR -#if UNITY_2017_2_OR_NEWER /// /// When the editor exits, the communicator must be closed /// @@ -148,19 +143,6 @@ private void HandleOnPlayModeChanged(PlayModeStateChange state) Close(); } } -#else - /// - /// When the editor exits, the communicator must be closed - /// - private void HandleOnPlayModeChanged() - { - // This method is run whenever the playmode state is changed. - if (!EditorApplication.isPlayingOrWillChangePlaymode) - { - Close(); - } - } -#endif #endif } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/RpcCommunicator.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/RpcCommunicator.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/RpcCommunicator.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/RpcCommunicator.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/SocketCommunicator.cs b/unity-environment/Assets/ML-Agents/Scripts/SocketCommunicator.cs similarity index 89% rename from UnitySDK/Assets/ML-Agents/Scripts/SocketCommunicator.cs rename to unity-environment/Assets/ML-Agents/Scripts/SocketCommunicator.cs index bd13e1751a..5edf61dbc9 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/SocketCommunicator.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/SocketCommunicator.cs @@ -51,11 +51,7 @@ public UnityInput Initialize(UnityOutput unityOutput, unityInput = UnityMessage.Parser.ParseFrom(Receive()).UnityInput; #if UNITY_EDITOR -#if UNITY_2017_2_OR_NEWER EditorApplication.playModeStateChanged += HandleOnPlayModeChanged; -#else - EditorApplication.playmodeStateChanged += HandleOnPlayModeChanged; -#endif #endif return initializationInput.UnityInput; @@ -152,32 +148,18 @@ private void OnApplicationQuit() } #if UNITY_EDITOR -#if UNITY_2017_2_OR_NEWER /// /// When the editor exits, the communicator must be closed /// /// State. - private void HandleOnPlayModeChanged(PlayModeStateChange state) + void HandleOnPlayModeChanged(PlayModeStateChange state) { // This method is run whenever the playmode state is changed. - if (state==PlayModeStateChange.ExitingPlayMode) + if (state == PlayModeStateChange.ExitingPlayMode) { Close(); } } -#else - /// - /// When the editor exits, the communicator must be closed - /// - private void HandleOnPlayModeChanged() - { - // This method is run whenever the playmode state is changed. - if (!EditorApplication.isPlayingOrWillChangePlaymode) - { - Close(); - } - } -#endif #endif } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/SocketCommunicator.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/SocketCommunicator.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/SocketCommunicator.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/SocketCommunicator.cs.meta diff --git a/UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs b/unity-environment/Assets/ML-Agents/Scripts/UnityAgentsException.cs similarity index 96% rename from UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs rename to unity-environment/Assets/ML-Agents/Scripts/UnityAgentsException.cs index fb0b4dd076..e99e2bc175 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/UnityAgentsException.cs @@ -7,7 +7,7 @@ namespace MLAgents { - [Serializable] + [System.Serializable] /// Contains exceptions specific to ML-Agents. public class UnityAgentsException : System.Exception { diff --git a/UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs.meta b/unity-environment/Assets/ML-Agents/Scripts/UnityAgentsException.cs.meta similarity index 100% rename from UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs.meta rename to unity-environment/Assets/ML-Agents/Scripts/UnityAgentsException.cs.meta diff --git a/UnitySDK/ProjectSettings/AudioManager.asset b/unity-environment/ProjectSettings/AudioManager.asset similarity index 100% rename from UnitySDK/ProjectSettings/AudioManager.asset rename to unity-environment/ProjectSettings/AudioManager.asset diff --git a/UnitySDK/ProjectSettings/ClusterInputManager.asset b/unity-environment/ProjectSettings/ClusterInputManager.asset similarity index 100% rename from UnitySDK/ProjectSettings/ClusterInputManager.asset rename to unity-environment/ProjectSettings/ClusterInputManager.asset diff --git a/UnitySDK/ProjectSettings/DynamicsManager.asset b/unity-environment/ProjectSettings/DynamicsManager.asset similarity index 100% rename from UnitySDK/ProjectSettings/DynamicsManager.asset rename to unity-environment/ProjectSettings/DynamicsManager.asset diff --git a/UnitySDK/ProjectSettings/EditorBuildSettings.asset b/unity-environment/ProjectSettings/EditorBuildSettings.asset similarity index 86% rename from UnitySDK/ProjectSettings/EditorBuildSettings.asset rename to unity-environment/ProjectSettings/EditorBuildSettings.asset index 6dc24f7dfd..0147887ef4 100644 --- a/UnitySDK/ProjectSettings/EditorBuildSettings.asset +++ b/unity-environment/ProjectSettings/EditorBuildSettings.asset @@ -5,3 +5,4 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: [] + m_configObjects: {} diff --git a/UnitySDK/ProjectSettings/EditorSettings.asset b/unity-environment/ProjectSettings/EditorSettings.asset similarity index 100% rename from UnitySDK/ProjectSettings/EditorSettings.asset rename to unity-environment/ProjectSettings/EditorSettings.asset diff --git a/UnitySDK/ProjectSettings/GraphicsSettings.asset b/unity-environment/ProjectSettings/GraphicsSettings.asset similarity index 100% rename from UnitySDK/ProjectSettings/GraphicsSettings.asset rename to unity-environment/ProjectSettings/GraphicsSettings.asset diff --git a/UnitySDK/ProjectSettings/InputManager.asset b/unity-environment/ProjectSettings/InputManager.asset similarity index 100% rename from UnitySDK/ProjectSettings/InputManager.asset rename to unity-environment/ProjectSettings/InputManager.asset diff --git a/UnitySDK/ProjectSettings/NavMeshAreas.asset b/unity-environment/ProjectSettings/NavMeshAreas.asset similarity index 100% rename from UnitySDK/ProjectSettings/NavMeshAreas.asset rename to unity-environment/ProjectSettings/NavMeshAreas.asset diff --git a/UnitySDK/ProjectSettings/NetworkManager.asset b/unity-environment/ProjectSettings/NetworkManager.asset similarity index 100% rename from UnitySDK/ProjectSettings/NetworkManager.asset rename to unity-environment/ProjectSettings/NetworkManager.asset diff --git a/UnitySDK/ProjectSettings/Physics2DSettings.asset b/unity-environment/ProjectSettings/Physics2DSettings.asset similarity index 100% rename from UnitySDK/ProjectSettings/Physics2DSettings.asset rename to unity-environment/ProjectSettings/Physics2DSettings.asset diff --git a/UnitySDK/ProjectSettings/PresetManager.asset b/unity-environment/ProjectSettings/PresetManager.asset similarity index 100% rename from UnitySDK/ProjectSettings/PresetManager.asset rename to unity-environment/ProjectSettings/PresetManager.asset diff --git a/UnitySDK/ProjectSettings/ProjectSettings.asset b/unity-environment/ProjectSettings/ProjectSettings.asset similarity index 94% rename from UnitySDK/ProjectSettings/ProjectSettings.asset rename to unity-environment/ProjectSettings/ProjectSettings.asset index ff3eb1b041..cc19bcaf53 100644 --- a/UnitySDK/ProjectSettings/ProjectSettings.asset +++ b/unity-environment/ProjectSettings/ProjectSettings.asset @@ -3,10 +3,11 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 14 + serializedVersion: 15 productGUID: cd7e9a0e0d1d14312ad9e89757262f3b AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 defaultScreenOrientation: 4 targetDevice: 2 useOnDemandResources: 0 @@ -64,7 +65,6 @@ PlayerSettings: preserveFramebufferAlpha: 0 disableDepthAndStencilBuffers: 0 androidBlitType: 0 - defaultIsFullScreen: 0 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 1 @@ -91,8 +91,7 @@ PlayerSettings: visibleInBackground: 0 allowFullscreenSwitch: 1 graphicsJobMode: 0 - macFullscreenMode: 2 - d3d11FullscreenMode: 1 + fullscreenMode: -1 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 @@ -108,18 +107,10 @@ PlayerSettings: xboxOneLoggingLevel: 1 xboxOneDisableEsram: 0 xboxOnePresentImmediateThreshold: 0 + switchQueueCommandMemory: 0 videoMemoryForVertexBuffers: 0 psp2PowerMode: 0 psp2AcquireBGM: 1 - wiiUTVResolution: 0 - wiiUGamePadMSAA: 1 - wiiUSupportsNunchuk: 0 - wiiUSupportsClassicController: 0 - wiiUSupportsBalanceBoard: 0 - wiiUSupportsMotionPlus: 0 - wiiUSupportsProController: 0 - wiiUAllowScreenCapture: 1 - wiiUControllerCount: 0 m_SupportedAspectRatios: 4:3: 1 5:4: 1 @@ -147,6 +138,7 @@ PlayerSettings: hololens: depthFormat: 1 depthBufferSharingEnabled: 0 + enable360StereoCapture: 0 oculus: sharedDepthBuffer: 0 dashSupport: 0 @@ -175,9 +167,7 @@ PlayerSettings: APKExpansionFiles: 0 keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 0 - VertexChannelCompressionMask: - serializedVersion: 2 - m_Bits: 4294901998 + VertexChannelCompressionMask: 214 iPhoneSdkVersion: 988 iOSTargetOSVersionString: 8.0 tvOSSdkVersion: 0 @@ -206,6 +196,7 @@ PlayerSettings: tvOSSmallIconLayers: [] tvOSSmallIconLayers2x: [] tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] tvOSTopShelfImageLayers: [] tvOSTopShelfImageLayers2x: [] tvOSTopShelfImageWideLayers: [] @@ -239,9 +230,15 @@ PlayerSettings: appleDeveloperTeamID: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + appleEnableProMotion: 0 clonedFromGUID: 00000000000000000000000000000000 - AndroidTargetDevice: 0 + templatePackageId: + templateDefaultScene: + AndroidTargetArchitectures: 5 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} AndroidKeystoreName: @@ -258,6 +255,7 @@ PlayerSettings: androidGamepadSupportLevel: 0 resolutionDialogBanner: {fileID: 0} m_BuildTargetIcons: [] + m_BuildTargetPlatformIcons: [] m_BuildTargetBatching: [] m_BuildTargetGraphicsAPIs: - m_BuildTarget: MacStandaloneSupport @@ -279,25 +277,8 @@ PlayerSettings: m_EncodingQuality: 1 - m_BuildTarget: PS4 m_EncodingQuality: 1 - wiiUTitleID: 0005000011000000 - wiiUGroupID: 00010000 - wiiUCommonSaveSize: 4096 - wiiUAccountSaveSize: 2048 - wiiUOlvAccessKey: 0 - wiiUTinCode: 0 - wiiUJoinGameId: 0 - wiiUJoinGameModeMask: 0000000000000000 - wiiUCommonBossSize: 0 - wiiUAccountBossSize: 0 - wiiUAddOnUniqueIDs: [] - wiiUMainThreadStackSize: 3072 - wiiULoaderThreadStackSize: 1024 - wiiUSystemHeapSize: 128 - wiiUTVStartupScreen: {fileID: 0} - wiiUGamePadStartupScreen: {fileID: 0} - wiiUDrcBufferDisabled: 0 - wiiUProfilerLibPath: playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 enableInternalProfiler: 0 logObjCUncaughtExceptions: 1 @@ -473,6 +454,7 @@ PlayerSettings: ps4pnFriends: 1 ps4pnGameCustomData: 1 playerPrefsSupport: 0 + enableApplicationExit: 0 restrictedAudioUsageRights: 0 ps4UseResolutionFallback: 0 ps4ReprojectionSupport: 0 @@ -543,7 +525,6 @@ PlayerSettings: psp2InfoBarOnStartup: 0 psp2InfoBarColor: 0 psp2ScriptOptimizationLevel: 0 - psmSplashimage: {fileID: 0} splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} spritePackerPolicy: @@ -557,8 +538,8 @@ PlayerSettings: webGLTemplate: APPLICATION:Default webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 - webGLUseWasm: 0 webGLCompressionFormat: 1 + webGLLinkerTarget: 0 scriptingDefineSymbols: 1: 7: UNITY_POST_PROCESSING_STACK_V2 @@ -574,7 +555,9 @@ PlayerSettings: 27: UNITY_POST_PROCESSING_STACK_V2 platformArchitecture: {} scriptingBackend: {} + il2cppCompilerConfiguration: {} incrementalIl2cppBuild: {} + allowUnsafeCode: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 1 apiCompatibilityLevelPerPlatform: diff --git a/unity-environment/ProjectSettings/ProjectVersion.txt b/unity-environment/ProjectSettings/ProjectVersion.txt new file mode 100755 index 0000000000..22977b32f3 --- /dev/null +++ b/unity-environment/ProjectSettings/ProjectVersion.txt @@ -0,0 +1 @@ +m_EditorVersion: 2018.1.0f2 diff --git a/UnitySDK/ProjectSettings/QualitySettings.asset b/unity-environment/ProjectSettings/QualitySettings.asset similarity index 100% rename from UnitySDK/ProjectSettings/QualitySettings.asset rename to unity-environment/ProjectSettings/QualitySettings.asset diff --git a/UnitySDK/ProjectSettings/TagManager.asset b/unity-environment/ProjectSettings/TagManager.asset similarity index 100% rename from UnitySDK/ProjectSettings/TagManager.asset rename to unity-environment/ProjectSettings/TagManager.asset diff --git a/UnitySDK/ProjectSettings/TimeManager.asset b/unity-environment/ProjectSettings/TimeManager.asset similarity index 100% rename from UnitySDK/ProjectSettings/TimeManager.asset rename to unity-environment/ProjectSettings/TimeManager.asset diff --git a/UnitySDK/ProjectSettings/UnityConnectSettings.asset b/unity-environment/ProjectSettings/UnityConnectSettings.asset old mode 100644 new mode 100755 similarity index 89% rename from UnitySDK/ProjectSettings/UnityConnectSettings.asset rename to unity-environment/ProjectSettings/UnityConnectSettings.asset index 1be4600519..1cc5485b8a --- a/UnitySDK/ProjectSettings/UnityConnectSettings.asset +++ b/unity-environment/ProjectSettings/UnityConnectSettings.asset @@ -3,14 +3,13 @@ --- !u!310 &1 UnityConnectSettings: m_ObjectHideFlags: 0 - m_Enabled: 1 + m_Enabled: 0 m_TestMode: 0 m_TestEventUrl: m_TestConfigUrl: m_TestInitMode: 0 CrashReportingSettings: m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes - m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate m_Enabled: 0 m_CaptureEditorExceptions: 1 UnityPurchasingSettings: @@ -26,6 +25,7 @@ UnityConnectSettings: m_Enabled: 0 m_InitializeOnStartup: 1 m_TestMode: 0 + m_EnabledPlatforms: 4294967295 m_IosGameId: m_AndroidGameId: m_GameIds: {}