# The Dr Arm game

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/)
- [Machine Learning in games](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/02-ml-in-games/)
- [Install Unity and the project](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/03-install/)
- [The Dr Arm game](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/04-the-dr-arm-game/)
- [Machine Learning in Unity](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/05-machine-learning-in-unity/)
- [The Unity project](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/06-the-unity-project/)
- [Objects and Components](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/07-objects-and-components/)
- [Training our ML agents](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/08-training-our-ml-agents/)
- [Optimizations](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/09-optimizations/)
- [Summary](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/10-summary/)
- [Next Steps](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents/_next-steps/)

This learning path is based on the video workshop [Using Unity’s Machine Learning Agents on Arm](https://on-demand.arm.com/flow/arm/devhub/sessionCatalog/page/pubSessCatalog/session/1681291098539001B22U) and uses the same Dr Arm game project files (provided in the supporting zip file you extracted earlier).

In the game, you control a fighting character (a Paladin) in battle against an AI opponent (a Vampire).

The battle takes place in a small 3D arena. Both characters can perform the following actions:

- Move (left, right, forward, backward)
- Roll
- Sword attack
- Fireball attack

Use the on-screen touch controls to control your character on mobile. The AI opponent is driven by an AI “brain” created with the ML Agents Toolkit.

## Open and test the game

Before diving into machine learning in Unity, look at the game. There is a ready-to-play version in the Unity scene called *Level_DevSummit2022_ReadyToPlay*.

Later sections of this learning path explain how the model was pre-trained and plugged into the game.

Dr Arm is intended for mobile play but you can test it within the Unity editor first to ensure everything is present and correct. To do this, run the game in demo mode, which shows two AI characters battling each other.

In the default editor layout:

1. Navigate to the *Assets/#DevSummit2022/Scenes* directory in the Project panel
2. Double-click the scene file *Level_DevSummit2022_ReadyToPlay* (depending on your platform or settings, it may show the *.unity* file extension)
3. The scene should open inside the *Scene* tab
4. Click the play button
5. You may see some warnings in the *Console* tab but these can be ignored as we haven’t done all the machine learning steps yet
6. You should be presented with a simple title screen with a menu of *Easy*, *Medium*, *Hard* and *Demo* options

![Title screen with menu options](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents//images/game-title-screen.jpg)
*Figure 1. Title screen with menu options*

1. Click *Demo* to run a battle between two AI characters

![Demo mode running two AT characters against each other](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/using_unity_machine_learning_agents//images/game-demo-mode.jpg)
*Figure 2. Demo mode running two AT characters against each other*

The screenshots above show a working version. If you see something similar, you know everything is working as expected.

The next section dives into machine learning and how ML is leveraged in Dr Arm.
