A node-graph GUI, API and backend for running diffusion models to generate images, video, audio and 3D locally.
Unity-Technologies/ml-agents
Open-source toolkit from Unity that lets games and simulations serve as environments for training AI agents with reinforcement and imitation learning.
- Stars
- 19,769
- Forks
- 4,512
- Open issues
- 19
- Last commit
- 6 days ago
What is it?
ML-Agents is a toolkit from Unity Technologies that turns Unity scenes into training environments for intelligent agents. Developers add the Unity SDK to a game or custom scene, define agent observations, actions and rewards, and train behavior with a Python layer built on PyTorch.
The toolkit includes deep reinforcement learning algorithms such as PPO, SAC and MA-POCA (for multi-agent cooperative and competitive scenarios, plus self-play), and imitation learning through behavioral cloning and GAIL. It also supports curriculum learning, environment randomization, and running multiple Unity instances concurrently. Trained models can be run inside Unity through its Inference Engine.
Python users can control Unity environments directly or wrap them as Gym or PettingZoo environments. The project ships with 17+ example environments and is aimed at game developers building NPC behavior or automated tests, as well as researchers evaluating AI methods in Unity.
Key features
- 01Supports PPO, SAC, MA-POCA and self-play for single and multi-agent training.
- 02Provides behavioral cloning and GAIL for learning from demonstrations.
- 03Includes curriculum learning and environment randomization.
- 04Runs trained models natively in Unity via the Inference Engine.
- 05Exposes Unity environments as Gym and PettingZoo environments.
- 06Ships with 17+ example Unity environments.
Use cases
- Training NPC behavior for adversarial or multi-agent game scenarios.
- Automated testing of game builds using trained agents.
- Evaluating game design decisions before release through simulated play.
- Researching reinforcement learning methods in a rich 3D or VR simulation platform.
Topics
FAQ
- What is ml-agents?
- Open-source toolkit from Unity that lets games and simulations serve as environments for training AI agents with reinforcement and imitation learning. ML-Agents is a toolkit from Unity Technologies that turns Unity scenes into training environments for intelligent agents. Developers add the Unity SDK to a game or custom scene, define agent observations, actions and rewards, and train behavior with a Python layer built on PyTorch.
- Is ml-agents free to use? What license does it have?
- ml-agents is open source under the Other license. Check the license terms before using it in commercial products.
- Is ml-agents still maintained?
- Actively maintained. The last commit to ml-agents was on Oct 13, 2026.
- What can I use ml-agents for?
- Training NPC behavior for adversarial or multi-agent game scenarios. Automated testing of game builds using trained agents. Evaluating game design decisions before release through simulated play. Researching reinforcement learning methods in a rich 3D or VR simulation platform.
- Where can I get ml-agents?
- The source code and installation instructions are on GitHub: https://github.com/Unity-Technologies/ml-agents
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source multi-agent LLM framework that simulates a trading firm's analysts, researchers, trader and risk team to reach trading decisions.
An agent harness for Claude Code and Codex that adds multi-agent swarms, shared memory, task routing and cross-machine federation.
Free, open source Python crypto trading bot that supports major exchanges, backtesting, dry-run, and control via Telegram or a web UI.
A curated, topic-organized list of high-quality open datasets across fields such as biology, climate, agriculture, and networks.
A C# program that generates bitmaps and tilemaps locally similar to a single input example, using the Wave Function Collapse algorithm.