Unity ML-Agents Tutorial | AI Truffle Pigs! 🐷


Learn how to create AI truffle-seeking pigs with Unity ML-Agents and Tensorflow!

This page is a companion to the YouTube tutorial above on creating intelligent truffle pigs with Unity ML-Agents.


As mentioned in the video, the first thing you'll need to do is follow the Installation instructions and the Basic Guide. These will get you up and running with Unity ML-Agents and ready to start the tutorial.

I highly encourage you to check out the ML-Agents Documentation, which will help you understand the project in more depth and provide a place to discuss issues that are not specific to the pig project.

3d Mesh Assets and Code

The assets you will need for this project are here:
Updated Code: https://immersivelimit.page.link/PigCodeUpdate1
Original Code: https://immersivelimit.page.link/PigCode

Side note: I modeled all of the meshes in Blender. 😃

ML-Agents Code

In this video, I'm using Release 0.6, which you can get here:

Helpful Additions

Training Command

The command I used to train (in my Anaconda Prompt) with curriculum was:

mlagents-learn config/trainer_config.yaml --curriculum=config/curricula/pig --run-id=pig_tutorial_01 --train



You can reach out to me at @aktwelve on Twitter or connect with me on LinkedIn.

For future updates