The Unity Machine Learning Agents Toolkit or ML-Agents is a free, open-source Unity plugin that was first released mid 2017. The newest (Beta) version of the toolkit can be downloaded from: Unity ML-Agents Toolkit. It integrates Unity Technologies Unity3D real-time 3D development platform [Unity-Pro Personal addition is free], with a Python API for developing and testing artificial agents (AIs) using reinforcement learning, imitation learning, and other neural network and machine learning techniques. As detailed by the Unity Technologies ML-Agents development team:
“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“.
Requirements for Unity ML-Agents Toolkit:
- A PC, MAC or Unix computer with a fast CPU, good graphics card and a decent amount of memory. Note, a CUDA compatible GPU (graphics card) is preferable (e.g., NVIDIA 1070, 1070ti 1080, 1080ti, or TITAN Xp), but not necessary, unless you wish to train agents using image data. Most agents can be trained using and vector data, thus, a good CPU is sufficient for most applications. If you have a decent gaming machine you should be good to go.
- The latest version of Unity3d, which can be download here: Unity3D. The Personal addition of Unity is free [Unity-Pro Personal] and has all you will need, unless you plan on developing commercial applications or games.
- Python 3. We are currently using Python 3.6 with Anaconda. Instructions how how to download Python and Anaconda can be found here. After installing Python and Anaconda, we recommend creating a new virtual environment to run you ML-Agents. Any basic Google or Youtube search will provide you with a host of tutorials on how to use Python, Anaconda and install and use conda virtual environments.
- The Unity ML-Agents toolkit, which can be download from Github at: https://github.com/Unity-Technologies/ml-agents. The documentation includes an excellent set of Instructions on how to install the ML-Agents toolkit. For Windows users visit here: For Mac or Unix users visit here. The toolkit includes a great set of example environments and agents, and an excellent tutorial on how to setup your first ML-Agents environment can be found here: [Balance Ball] and here [Making a New Environment]. You can also check out our Adventures in Unity Ml-Agents Getting Started (Wall Pong) example.