Unity ML Agents | Visual Chameleons
Start Here First!
In the video, I skip over the setup (which is common to all ML Agents projects) to get right into the content specific to our Visual Chameleon Agents. Unity has excellent documentation on installation and setup and they will always have the most up-to-date instructions.
Follow the ML-Agents Installation Instructions first. I’m using Unity version 2018.3 in my video. If you use an older version you may have trouble following along in the prefab section because the prefab workflow has changed recently.
I’m using Anaconda on Windows for training. There are specific Windows Installation Instructions for this.
Common Project Setup
Follow the Basic Guide to make sure your ML Agents project is set up. I would recommend attempting to start training the 3D Ball example just to make sure you don’t get any error messages.
We use Curriculum Learning to train our chameleons. If you haven’t done this before, click the link for a helpful documentation page on this.
Chameleon Project Setup
Once you understand how to run an example ML-Agent training session with curriculum, do this:
Download the Code Files and 3d Mesh Files linked below
Import the Scripts folder into your Unity project, it should include ChameleonAcademy.cs, ChameleonArea.cs, and ChameleonAgent.cs
Import the two .fbx 3d models into a new Meshes folder in your Unity project
Add the “ChameleonLearning” section of the trainer_config.yaml to your config/trainer_config.yaml
Add the ChameleonLearning.json curriculum files to config/curricula/chameleons
Code & Assets
The command I used to train (in my Anaconda Prompt) with curriculum was:
mlagents-learn config/trainer_config.yaml --curriculum=config/curricula/chameleon/ --run-id=chameleon01 --train