An open source toolkit that turns Unity scenes into environments for training game and simulation agents with reinforcement and imitation learning.
open sourceApache-2.0
The Unity ML-Agents Toolkit lets games and simulations built in Unity serve as environments for training intelligent agents. A C# package instruments a scene (agents with sensors, actions and rewards, behaviors shared between agents, recorded demonstrations), and a Python package trains them with reinforcement learning, imitation learning or other methods, with Gym and PettingZoo interfaces. Trained models are embedded back into the scene to run through Unity's inference engine, for uses such as controlling NPC behavior, automated testing of game builds and evaluating design decisions.
Problems it solves
- train game characters to behave intelligently with reinforcement learning instead of scripting them
- use my Unity game as a simulation environment for training an AI agent
- test a game build automatically with agents that learn to play it
Features
- turns any Unity scene into a learning environment
- agents, behaviors, sensors and recorded demonstrations defined in C#
- Python trainers with Gym and PettingZoo interfaces
- trained behaviors embedded back into the scene for inference