RollerBall Demo (Unity + Jupyter Notebook)
This repository includes all of the original Unity ML-Agents Toolkit RollerBall demo's C# code as well as Jupyter notebook that works with that C# code, receiving both vector observations and visual (camera) observations.
Setup and Dependencies
- Git-LFS
- Unity has many very large files (>50 MB) that don't play nicely with git, which was originally designed to handle only text files
- To make Unity play nicely with git, install git-lfs (Git-Large File System)
- Unity (2019.4.17f1)
- Unity ML-Agents Toolkit
- In the Unity Editor, make sure to install a version >1.4.0 by going to Window > Package Manager, selecting "Show preview packages", finding "ML Agents", selecting "See all versions", and finally selecting the latest version
- In this repository, we're using version 1.7.2-preview
- Python 3.6 or 3.7
- Other Python Packages
$ python -m venv rollerball-venv $ rollerball-venv\Scripts\activate.bat # windows $ source rollerball-venv/bin/activate # MacOS or Linux $ pip install matplotlib numpy
Unity Background
- Unity Background
- Short, Complete, and Official Unity Tutorial (Roll-a-Ball)
- Unofficial Unity Tutorials by Catlike Coding
- Unity Game Loop Order of Execution
- Understanding this game loop is critical to understanding how any program in Unity works
Unity ML-Agents Toolkit
- UMLA Overview
- Short, Complete UMLA Tutorial
- That's this project!
- I've also gone through the trouble of adding a Jupyter notebook that connects to this project
- UMLA Agent Documentation
- This is extremely helpful for understanding the nitty-gritty details of the C# Agent class (knowing how to reset things, how to keep track of visual/vector observations, etc.)
Getting Help
- Visit the Official Unity Discord
- For UMLA-specific questions, go to the #machine-learning channel
- Post to the Official Unity ML-Agents Forum