Skip to content

Commit 983c402

Browse files
authored
Release v0.5 (#1202)
1 parent 1ead1cc commit 983c402

File tree

845 files changed

+13750
-9230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

845 files changed

+13750
-9230
lines changed

.gitignore

100755100644
Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
1-
/unity-environment/[Ll]ibrary/
2-
/unity-environment/[Tt]emp/
3-
/unity-environment/[Oo]bj/
4-
/unity-environment/[Bb]uild/
5-
/unity-environment/[Bb]uilds/
6-
/unity-environment/[Pp]ackages/
7-
/unity-environment/[Uu]nity[Pp]ackage[Mm]anager/
8-
/unity-environment/Assets/AssetStoreTools*
9-
/unity-environment/Assets/Plugins*
10-
/unity-environment/Assets/Gizmos*
1+
/UnitySDK/[Ll]ibrary/
2+
/UnitySDK/[Tt]emp/
3+
/UnitySDK/[Oo]bj/
4+
/UnitySDK/[Bb]uild/
5+
/UnitySDK/[Bb]uilds/
6+
/UnitySDK/[Pp]ackages/
7+
/UnitySDK/[Uu]nity[Pp]ackage[Mm]anager/
8+
/UnitySDK/Assets/AssetStoreTools*
9+
/UnitySDK/Assets/Plugins*
10+
/UnitySDK/Assets/Gizmos*
1111

1212
# Tensorflow Model Info
1313
/models
1414
/summaries
15-
python/models
16-
python/summaries
15+
16+
# Training environments
17+
/envs
1718

1819
# Environemnt logfile
19-
*unity-environment.log
20+
*UnitySDK.log
2021

2122
# Visual Studio 2015 cache directory
22-
/unity-environment/.vs/
23+
/UnitySDK/.vs/
2324

2425
# Autogenerated VS/MD/Consulo solution and project files
25-
/unity-environmentExportedObj/
26-
/unity-environment.consulo/
26+
/UnitySDKExportedObj/
27+
/UnitySDK.consulo/
2728
*.csproj
2829
*.unityproj
2930
*.sln
@@ -40,7 +41,7 @@ python/summaries
4041
*.pidb.meta
4142

4243
# Unity3D Generated File On Crash Reports
43-
/unity-environment/sysinfo.txt
44+
/UnitySDK/sysinfo.txt
4445

4546
# Builds
4647
*.apk
@@ -51,10 +52,10 @@ python/summaries
5152
*.x86
5253

5354
# Tensorflow Sharp Files
54-
/unity-environment/Assets/ML-Agents/Plugins/Android*
55-
/unity-environment/Assets/ML-Agents/Plugins/iOS*
56-
/unity-environment/Assets/ML-Agents/Plugins/Computer*
57-
/unity-environment/Assets/ML-Agents/Plugins/System*
55+
/UnitySDK/Assets/ML-Agents/Plugins/Android*
56+
/UnitySDK/Assets/ML-Agents/Plugins/iOS*
57+
/UnitySDK/Assets/ML-Agents/Plugins/Computer*
58+
/UnitySDK/Assets/ML-Agents/Plugins/System*
5859

5960
# Generated doc folders
6061
/docs/html
@@ -75,5 +76,20 @@ python/summaries
7576
*.eggs*
7677
*.gitignore.swp
7778

79+
# VSCode hidden files
80+
*.vscode/
7881

7982
.DS_Store
83+
.ipynb_checkpoints
84+
85+
# pytest cache
86+
*.pytest_cache/
87+
88+
# Ignore compiled protobuf files.
89+
ml-agents-protobuf/cs
90+
ml-agents-protobuf/python
91+
ml-agents-protobuf/Grpc*
92+
93+
# Ignore PyPi build files.
94+
dist/
95+
build/

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ members of the project's leadership.
6767

6868
## Attribution
6969

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct/
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
71+
version 1.4, available at
72+
https://www.contributor-covenant.org/version/1/4/code-of-conduct/
7273

7374
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,56 @@
11
# Contribution Guidelines
22

3-
Thank you for your interest in contributing to the ML-Agents toolkit! We are incredibly
4-
excited to see how members of our community will use and extend the ML-Agents toolkit.
5-
To facilitate your contributions, we've outlined a brief set of guidelines
6-
to ensure that your extensions can be easily integrated.
3+
Thank you for your interest in contributing to the ML-Agents toolkit! We are
4+
incredibly excited to see how members of our community will use and extend the
5+
ML-Agents toolkit. To facilitate your contributions, we've outlined a brief set
6+
of guidelines to ensure that your extensions can be easily integrated.
77

8-
### Communication
8+
## Communication
99

10-
First, please read through our [code of conduct](CODE_OF_CONDUCT.md),
11-
as we expect all our contributors to follow it.
10+
First, please read through our [code of conduct](CODE_OF_CONDUCT.md), as we
11+
expect all our contributors to follow it.
1212

13-
Second, before starting on a project that you intend to contribute
14-
to the ML-Agents toolkit (whether environments or modifications to the codebase),
15-
we **strongly** recommend posting on our
16-
[Issues page](https://github.com/Unity-Technologies/ml-agents/issues) and
17-
briefly outlining the changes you plan to make. This will enable us to provide
18-
some context that may be helpful for you. This could range from advice and
19-
feedback on how to optimally perform your changes or reasons for not doing it.
13+
Second, before starting on a project that you intend to contribute to the
14+
ML-Agents toolkit (whether environments or modifications to the codebase), we
15+
**strongly** recommend posting on our
16+
[Issues page](https://github.com/Unity-Technologies/ml-agents/issues)
17+
and briefly outlining the changes you plan to make. This will enable us to
18+
provide some context that may be helpful for you. This could range from advice
19+
and feedback on how to optimally perform your changes or reasons for not doing
20+
it.
2021

2122
Lastly, if you're looking for input on what to contribute, feel free to
2223
reach out to us directly at ml-agents@unity3d.com and/or browse the GitHub
2324
issues with the `contributions welcome` label.
2425

25-
### Git Branches
26+
## Git Branches
2627

27-
Starting with v0.3, we adopted the
28+
Starting with v0.3, we adopted the
2829
[Gitflow Workflow](http://nvie.com/posts/a-successful-git-branching-model/).
29-
Consequently, the `master` branch corresponds to the latest release of
30+
Consequently, the `master` branch corresponds to the latest release of
3031
the project, while the `develop` branch corresponds to the most recent, stable,
3132
version of the project.
3233

3334
Thus, when adding to the project, **please branch off `develop`**
3435
and make sure that your Pull Request (PR) contains the following:
36+
3537
* Detailed description of the changes performed
36-
* Corresponding changes to documentation, unit tests and sample environments
37-
(if applicable)
38+
* Corresponding changes to documentation, unit tests and sample environments (if
39+
applicable)
3840
* Summary of the tests performed to validate your changes
3941
* Issue numbers that the PR resolves (if any)
4042

41-
### Environments
43+
## Environments
4244

43-
We are also actively open to adding community contributed environments as
44-
examples, as long as they are small, simple, demonstrate a unique feature of
45-
the platform, and provide a unique non-trivial challenge to modern
45+
We are also actively open to adding community contributed environments as
46+
examples, as long as they are small, simple, demonstrate a unique feature of
47+
the platform, and provide a unique non-trivial challenge to modern
4648
machine learning algorithms. Feel free to submit these environments with a
47-
PR explaining the nature of the environment and task.
49+
PR explaining the nature of the environment and task.
4850

49-
### Style Guide
51+
## Style Guide
5052

51-
When performing changes to the codebase, ensure that you follow the style
52-
guide of the file you're modifying. For Python, we follow
53-
[PEP 8](https://www.python.org/dev/peps/pep-0008/). For C#, we will soon be
54-
adding a formal style guide for our repository.
53+
When performing changes to the codebase, ensure that you follow the style guide
54+
of the file you're modifying. For Python, we follow
55+
[PEP 8](https://www.python.org/dev/peps/pep-0008/).
56+
For C#, we will soon be adding a formal style guide for our repository.

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,11 @@ RUN apt-get update && apt-get -y upgrade
122122
# xvfb is used to do CPU based rendering of Unity
123123
RUN apt-get install -y xvfb
124124

125-
126-
ADD python/requirements.txt .
127-
RUN pip install --trusted-host pypi.python.org -r requirements.txt
128-
129-
WORKDIR /execute
130-
COPY python /execute/python
125+
COPY ml-agents /ml-agents
126+
WORKDIR /ml-agents
127+
RUN pip install .
131128

132129
# port 5005 is the port used in in Editor training.
133130
EXPOSE 5005
134131

135-
ENTRYPOINT ["python", "python/learn.py"]
132+
ENTRYPOINT ["mlagents-learn"]

LICENSE

100755100644
File mode changed.

README.md

100755100644
Lines changed: 61 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,86 @@
11
<img src="docs/images/unity-wide.png" align="middle" width="3000"/>
22

3+
<img src="docs/images/image-banner.png" align="middle" width="3000"/>
4+
35
# Unity ML-Agents Toolkit (Beta)
46

5-
**The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source Unity plugin
6-
that enables games and simulations to serve as environments for training
7-
intelligent agents. Agents can be trained using reinforcement learning,
8-
imitation learning, neuroevolution, or other machine learning methods through
9-
a simple-to-use Python API. We also provide implementations (based on
10-
TensorFlow) of state-of-the-art algorithms to enable game developers
11-
and hobbyists to easily train intelligent agents for 2D, 3D and VR/AR games.
12-
These trained agents can be used for multiple purposes, including
13-
controlling NPC behavior (in a variety of settings such as multi-agent and
14-
adversarial), automated testing of game builds and evaluating different game
15-
design decisions pre-release. The ML-Agents toolkit is mutually beneficial for both game
16-
developers and AI researchers as it provides a central platform where advances
17-
in AI can be evaluated on Unity’s rich environments and then made accessible
18-
to the wider research and game developer communities.
7+
**The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source
8+
Unity plugin that enables games and simulations to serve as environments for
9+
training intelligent agents. Agents can be trained using reinforcement learning,
10+
imitation learning, neuroevolution, or other machine learning methods through a
11+
simple-to-use Python API. We also provide implementations (based on TensorFlow)
12+
of state-of-the-art algorithms to enable game developers and hobbyists to easily
13+
train intelligent agents for 2D, 3D and VR/AR games. These trained agents can be
14+
used for multiple purposes, including controlling NPC behavior (in a variety of
15+
settings such as multi-agent and adversarial), automated testing of game builds
16+
and evaluating different game design decisions pre-release. The ML-Agents
17+
toolkit is mutually beneficial for both game developers and AI researchers as it
18+
provides a central platform where advances in AI can be evaluated on Unity’s
19+
rich environments and then made accessible to the wider research and game
20+
developer communities.
1921

2022
## Features
23+
2124
* Unity environment control from Python
2225
* 10+ sample Unity environments
2326
* Support for multiple environment configurations and training scenarios
24-
* Train memory-enhanced Agents using deep reinforcement learning
27+
* Train memory-enhanced agents using deep reinforcement learning
2528
* Easily definable Curriculum Learning scenarios
26-
* Broadcasting of Agent behavior for supervised learning
29+
* Broadcasting of agent behavior for supervised learning
2730
* Built-in support for Imitation Learning
28-
* Flexible Agent control with On Demand Decision Making
31+
* Flexible agent control with On Demand Decision Making
2932
* Visualizing network outputs within the environment
3033
* Simplified set-up with Docker
34+
* Wrap learning environments as a gym
3135

3236
## Documentation
3337

34-
* For more information, in addition to installation and usage
35-
instructions, see our [documentation home](docs/Readme.md).
36-
* If you have
37-
used a version of the ML-Agents toolkit prior to v0.4, we strongly recommend
38-
our [guide on migrating from earlier versions](docs/Migrating.md).
38+
* For more information, in addition to installation and usage instructions, see
39+
our [documentation home](docs/Readme.md).
40+
* 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.
41+
* If you have used a version of the ML-Agents toolkit prior to v0.5, we strongly
42+
recommend our [guide on migrating from earlier versions](docs/Migrating.md).
3943

40-
## References
44+
## Additional Resources
4145

4246
We have published a series of blog posts that are relevant for ML-Agents:
43-
- Overviewing reinforcement learning concepts
44-
([multi-armed bandit](https://blogs.unity3d.com/2017/06/26/unity-ai-themed-blog-entries/)
45-
and [Q-learning](https://blogs.unity3d.com/2017/08/22/unity-ai-reinforcement-learning-with-q-learning/))
46-
- [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/)
47-
- [Post](https://blogs.unity3d.com/2018/02/28/introducing-the-winners-of-the-first-ml-agents-challenge/) announcing the winners of our
48-
[first ML-Agents Challenge](https://connect.unity.com/challenges/ml-agents-1)
49-
- [Post](https://blogs.unity3d.com/2018/01/23/designing-safer-cities-through-simulations/)
50-
overviewing how Unity can be leveraged as a simulator to design safer cities.
47+
48+
* Overviewing reinforcement learning concepts
49+
([multi-armed bandit](https://blogs.unity3d.com/2017/06/26/unity-ai-themed-blog-entries/)
50+
and
51+
[Q-learning](https://blogs.unity3d.com/2017/08/22/unity-ai-reinforcement-learning-with-q-learning/))
52+
* [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/)
53+
* [Post](https://blogs.unity3d.com/2018/02/28/introducing-the-winners-of-the-first-ml-agents-challenge/)
54+
announcing the winners of our
55+
[first ML-Agents Challenge](https://connect.unity.com/challenges/ml-agents-1)
56+
* [Post](https://blogs.unity3d.com/2018/01/23/designing-safer-cities-through-simulations/)
57+
overviewing how Unity can be leveraged as a simulator to design safer cities.
5158

5259
In addition to our own documentation, here are some additional, relevant articles:
53-
- [Unity AI - Unity 3D Artificial Intelligence](https://www.youtube.com/watch?v=bqsfkGbBU6k)
54-
- [A Game Developer Learns Machine Learning](https://mikecann.co.uk/machine-learning/a-game-developer-learns-machine-learning-intent/)
55-
- [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)
60+
61+
* [Unity AI - Unity 3D Artificial Intelligence](https://www.youtube.com/watch?v=bqsfkGbBU6k)
62+
* [A Game Developer Learns Machine Learning](https://mikecann.co.uk/machine-learning/a-game-developer-learns-machine-learning-intent/)
63+
* [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)
5664

5765
## Community and Feedback
5866

59-
The ML-Agents toolkit is an open-source project and we encourage and welcome contributions.
60-
If you wish to contribute, be sure to review our
61-
[contribution guidelines](CONTRIBUTING.md) and
67+
The ML-Agents toolkit is an open-source project and we encourage and welcome
68+
contributions. If you wish to contribute, be sure to review our
69+
[contribution guidelines](CONTRIBUTING.md) and
6270
[code of conduct](CODE_OF_CONDUCT.md).
6371

6472
You can connect with us and the broader community
6573
through Unity Connect and GitHub:
74+
6675
* Join our
67-
[Unity Machine Learning Channel](https://connect.unity.com/messages/c/035fba4f88400000)
68-
to connect with others using the ML-Agents toolkit and Unity developers enthusiastic
69-
about machine learning. We use that channel to surface updates
70-
regarding the ML-Agents toolkit (and, more broadly, machine learning in games).
71-
* If you run into any problems using the ML-Agents toolkit,
72-
[submit an issue](https://github.com/Unity-Technologies/ml-agents/issues) and
73-
make sure to include as much detail as possible.
76+
[Unity Machine Learning Channel](https://connect.unity.com/messages/c/035fba4f88400000)
77+
to connect with others using the ML-Agents toolkit and Unity developers
78+
enthusiastic about machine learning. We use that channel to surface updates
79+
regarding the ML-Agents toolkit (and, more broadly, machine learning in
80+
games).
81+
* If you run into any problems using the ML-Agents toolkit,
82+
[submit an issue](https://github.com/Unity-Technologies/ml-agents/issues) and
83+
make sure to include as much detail as possible.
7484

7585
For any other questions or feedback, connect directly with the ML-Agents
7686
team at ml-agents@unity3d.com.
@@ -84,8 +94,14 @@ of the documentation to one language (Chinese), but we hope to continue
8494
translating more pages and to other languages. Consequently,
8595
we welcome any enhancements and improvements from the community.
8696

87-
- [Chinese](docs/localized/zh-CN/)
97+
* [Chinese](docs/localized/zh-CN/)
8898

8999
## License
90100

91101
[Apache License 2.0](LICENSE)
102+
103+
## Citation
104+
105+
If you use Unity or the ML-Agents Toolkit to conduct research, we ask that you cite the following paper as a reference:
106+
107+
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.

0 commit comments

Comments
 (0)