ml-agents README

The project's README from github.com/Unity-Technologies/ml-agents. As one markdown file: README.md.

Unity ML-Agents Toolkit

docs badge

license badge

(latest release) (all releases)

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents.

Documentation

The ML-Agents package documentation is the primary documentation for ML-Agents. It includes installation instructions, version compatibility, features, tutorials, API references, and how to cite ML-Agents in your research.

Get started

To install ML-Agents and check which Unity and Python versions are compatible, refer to Install the ML-Agents Toolkit.

Contribute

To contribute, refer to Contribute to ML-Agents and the code of conduct.

Get help and give feedback

For more community resources and information about privacy and in-editor analytics, refer to the ML-Agents package documentation home page.

ml-agents (Unity-Technologies/ml-agents)

Searching Database…

What is this?Unity ML-Agents Toolkit lets Unity games and simulations act as training environments for AI agents, using deep reinforcement learning and imitation learning. It pairs a Unity SDK with a Python API so game developers and researchers can train NPCs, test builds, or evaluate design decisions.
Is this a Unity package, a Python library, or both?Both - a flexible Unity SDK that gets integrated into your game or custom Unity scene, paired with a Python package that runs the actual RL/IL training and talks to the Unity environment over the Python API.
How do I get it running in my project?Add the com.unity.ml-agents Unity package (verified for Unity 2020.1+) via the Unity Package Manager, then install the matching mlagents Python package to run trainers against your scene, following the current Unity Package documentation for the latest release.
Do I need Python and PyTorch set up separately?Yes - training runs through a separate Python package with PyTorch-based implementations of the algorithms (PPO, SAC, MA-POCA, BC, GAIL), distinct from the C# Unity-side SDK.
Are the old web docs still the way to go?No - the project has deprecated the web docs; the Unity Package documentation is now the primary, up-to-date source, and the develop branch is explicitly called out as unstable.
Is this aimed at game developers, researchers, or both?Both - game devs get tools for NPC behavior, automated build testing, and design evaluation, while researchers get a simple Python API to try RL, imitation learning, neuroevolution, or their own custom algorithms on Unity's environments.
Does the toolkit send any data back to Unity?Yes - the Unity package includes in-editor analytics to improve developer experience, governed by Unity's general privacy policy.
Which RL and imitation learning algorithms come built in?PPO, SAC and MA-POCA for reinforcement learning (including self-play and cooperative/competitive multi-agent setups), plus BC and GAIL for imitation learning from demonstrations.
Can I use the Unity environments outside the native ML-Agents workflow?Yes - you can wrap a Unity learning environment as a Gym environment or as a PettingZoo environment to plug into other RL libraries.
Are there example environments to learn from?Yes - the toolkit ships 17+ example Unity environments covering single-agent, cooperative and competitive multi-agent training scenarios.
Size
2.9 GB
Stars
19.9K
Age
9y
Commits · 90 Days