Unity ML-Agents

Unity ML-Agents

โ˜… 4.2 ๐Ÿ”– 100 saves ๐Ÿ’ฐ Freemium GitHub

The Unity Machine Learning Agents Toolkit (ML-Agents) is Unity’s open-source project for training intelligent agents inside games and simulations. It has nearly 19,800 stars on GitHub and continues to be maintained, with updates in October 2026.

Overview

ML-Agents turns any Unity scene into a training environment for reinforcement learning. Game characters, robots, vehicles, or entire simulated ecosystems can serve as agents that learn from rewards using deep reinforcement learning and imitation learning. The toolkit bridges the Unity engine with PyTorch-based trainers, and ships with proven algorithms such as PPO and SAC, curriculum learning tools that gradually raise difficulty, and sample environments ranging from balancing tasks to competitive multi-agent games. It is widely used both for smarter game NPCs and as a research platform for embodied AI.

Key Features

  • Train agents in any Unity game or simulation environment
  • Deep reinforcement learning with proven algorithms like PPO and SAC
  • Imitation learning from demonstrations, including adversarial methods
  • Curriculum learning and environment parameterization tools
  • Python API for plugging in custom algorithms and research code
  • Rich set of example environments to learn from and extend
  • Multi-agent support for cooperative and competitive scenarios

The toolkit observes the world the way an agent would: through configurable sensors, including cameras, raycasts, and numeric state, and it rewards behaviors defined by the developer. Training can run the same simulation many times in parallel, dramatically shortening experiment cycles, and trained policies export for use at runtime inside shipped games. Beyond games, the same machinery supports robotics research, where policies learned in simulation are studied for transfer to real hardware, and educational projects that make reinforcement learning tangible. Its longevity and documentation have made it a standard teaching platform for agent-based AI.

๐Ÿ’ณ Pricing

The ML-Agents toolkit itself is free and open source. It works with the Unity editor, which has its own licensing tiers for commercial game development.

Who Is It For

ML-Agents is for game developers who want learned, adaptive NPC behavior, and for researchers who need flexible 3D environments to study reinforcement learning, robotics, and embodied intelligence.

๐Ÿš€ Visit Unity ML-Agents Official Site

๐Ÿšฉ Report an issue