Why: Using machine learning (ML) features during the game development process means you no longer need to “code” characters, saving time and costs. ML Agents from Unity, which can be downloaded here, allows you to train intelligent AI agents within games and simulations, with the game characters “learning” through reinforcement learning (RL).
How: There are many different elements when using ML Agents on Arm-based devices, but below are two broad considerations when getting started.
Consider how the ML Agents in the game are designed and what the generated neural network (NN) models look like through the following items:
Input to the agent and what information it needs.
Outputs from the agent and which actions it needs to take to accomplish a target task in the game.
The NN model structure and how the brain should process information.
The reward function and how the agent will be trained.
Consider the training strategy for the ML Agents and how the game runs on Arm-based devices:
Two key aspects of the training strategy are:
Training the agent using multiple instances
Applying different training metrics to track learning progress.
When establishing how the game runs with the Agents, think about:
Applying different difficulty levels
Measuring the performance of the agents by using the Unity profiler
Utilizing the Decision Requester component and timeline that shows the NN model execution with specific intervals.
Video GIFs: Examples from Arm's own work with ML Agents
Further reading:
Arm Community blogs - Unity ML Agents on Arm and how we created game AI
Part 1
Part 2
Part 3
Arm Community blog - Multi-agent reinforcement learning scalability on Android devices
Unity - ML Agents Homepage
Unity documentation - ML Agents