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
3d Mesh Assets and Code
The free assets you will need for this project are here:
https://gumroad.com/l/dbYSC 👈 $0+ on Gumroad means you can get them *completely for free* by typing in a 0.
(however, if you want to give extra support, you’ll make me feel warm and fuzzy inside. 😃)
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