A set of introductory, interactive tutorials for using the MuJoCo physics engine inside Unity, and learning control policies with the ML-Agents framework. Unity's Tutorial Authoring Tools were used to embed the steps and explanations into the Editor itself.
This project is primarily aimed for users wanting to construct their own learning environments inside the Unity editor, while relying on the MuJoCo physics engine. Some learning resources are collected and referenced inside the project, but basic familiarity is expected with the following concepts:
- Very basics of C# programming
- Navigating the Unity scene view
- Basics of modelling scenes in MuJoCo
This project is still in very early development, contributions are welcome in the form of feedback, or pull requests editing/fixing existing tutorials or adding new lessons. For more information on using the tutorial authoring tools, see its documentation.
- Importing and editing MuJoCo scenes to unity
- Setting up Reinforcement Learning with ML-Agents to control a cart-pole environment
- Guidelines for extending a scene with the example of a double-pendulum cart-pole
- Learning a locomotion policy with ML-Agents
- Quick introduction to editing scenes in Unity and the available tools to speed it up
- Quick introduction to MuJoCo components and data structure
This project has only been tested on Windows so far. Currently the repository includes the Windows and Linux binaries for MuJoCo version 3.2.4. The project already references a fork of the Unity plugin, so the MuJoCo C# scripts does not need to be downloaded. However, the binary may need to be replaced for your own system (in particular for Mac, or certain Linux architectures). Follow the guidance from the documentation.
Clone or download this repository, and add the MuJoCo-Unity-Tutorial
folder from Unity Hub. Unity editor versions >2021.2.19f are expected to be compatible. After launching the project you'll be greeted with information on where to find the tutorial content. Unlike a regular project you will see an additional window element on the right hand side of your screen, listing the available tutorials.