Complete this setup guide BEFORE the workshop begins. You will install the Unity Game Engine, Python neural network libraries, and the ML-Agents bridging software.
We use Unity 2022 LTS (Long Term Support) for stability.
Download and install Unity Hub from the official site. This manages your Unity editors and projects.
Note: When running the installer, you can accept all default installation settings (install location, etc.).
Download Unity Hub ↗
Once installed, open Unity Hub. You should see a Welcome screen:
If you are new to Unity, you will need to click Create account. This is free and required to use the software. Follow the on-screen prompts to verify your email and sign in.
Once signed in, you will see the main dashboard:
We need Python 3.10.12 specifically, as ML-Agents is sensitive to Python versions.
Open your terminal (Command Prompt on Windows, Terminal on Mac/Linux).
python --version
If it says Python 3.10.x, you are good. If not (or if it's 3.11/3.12), we recommend using Miniconda or PyEnv to manage versions.
conda create -n agents python=3.10.12
conda activate agents
This software connects Unity (C#) to Python (PyTorch). We will install version 1.1.0 (Release 21).
Visit PyTorch.org to get the command for your system. Standard CPU command:
pip3 install torch torchvision torchaudio
Run these commands in your agents environment:
python -m pip install mlagents==1.1.0
python -m pip install graphics
Run the help command to ensure the CLI is ready:
mlagents-learn --help
✅ Success: You should see a cool ASCII art logo of the Unity cube and a list of commands.
❌ Failure: If you see "command not found," ensure your environment is activated.
Clone the starter repository which contains the base environment art.
git clone https://github.com/sounny/AIMLAgentsWorkshop.git
You are ready for Day 1 if:
mlagents-learn --help in your terminal and see the logo.This is a common protocol buffer error. Run: pip install protobuf==3.20.3 to downgrade to a compatible version.
Sign out and sign back into Unity Hub. Check your firewall settings.