google-deepmind/mujoco
Hardware & IoTGeneral-purpose physics engine for simulating articulated robots and structures, used by robotics, biomechanics, and machine learning researchers.
What it does
MuJoCo (Multi-Joint dynamics with Contact) is a general-purpose physics engine for fast, accurate simulation of articulated structures interacting with their environment. It targets robotics, biomechanics, graphics and animation, and machine learning research, and is maintained by Google DeepMind.
The runtime is a C library tuned for performance: the built-in XML compiler preallocates the low-level data structures the simulation operates on, so the solver step avoids runtime allocation. Models are described in MJCF (MuJoCo's XML format); the library also provides many utility functions for computing physics-related quantities and a native OpenGL GUI for interactive visualization. Python bindings ship with a bundled copy of MuJoCo, and there is a Unity plug-in and JavaScript/WebAssembly support.
A JAX-based branch, MuJoCo XLA (MJX), supports gradient-based work such as training locomotion policies with analytical gradients derived from the physics step.
Quick start
Prerequisites: Python 3.11 or newer for the Python bindings.
- Install the Python package, which bundles the native library:
pip install mujoco
-
Work through the intro tutorial on Google Colab: introductory tutorial. It covers loading a model, stepping the simulation, and reading state and sensor data.
-
For follow-up topics, the README links notebooks for procedural model editing, the multithreaded rollout module, LQR control, nonlinear least squares, MJX basics, and differentiable physics training.
Result: after the tutorial you can load an MJCF model, advance the simulation, and inspect its state from Python.
If you prefer the native interactive viewer, simulate, follow the Getting Started steps in the documentation; a screen-capture video shows the viewer in use. Precompiled binaries for Linux (x86-64, AArch64), Windows (x86-64), and macOS (universal) are on the releases page.
Usage constraints
- The Python package requires Python 3.11 or newer. Prebuilt Linux wheels target
manylinux2014; distributions outside that compatibility set need to build the bindings from source, as described in the Python bindings documentation. - Building from source is documented separately, and the tip of
mainmay be unstable; versioned releases are the recommended route. - Releases are targeted for the first week of each month, and versioning follows modified Semantic Versioning since 3.5.0 (see VERSIONING.md), so pin versions if reproducibility matters.
- Source is under Apache-2.0. Documentation images and videos in
doc/are CC BY 4.0, and the box collision code carries a separate copyright notice. MuJoCo is not an officially supported Google product. - Questions belong in the Asking for Help discussions; GitHub Issues are for bug reports and feature requests.
HotRepo's take
On the C++ daily list for 2026-11-01, the project ranked 8th with 23 new stars, at 16,013 total stars and 1,911 forks. Its best-ever all-language daily rank is not recorded, so the record only supports that day's position—not a trend.
The HN thread from 2026-04-19 drew 116 points and 24 comments that lean toward concrete use cases rather than generic praise. A commenter points to StuffMadeHere's mini-golf simulation video as a source of recent attention; a reply there found the simulator-to-reality match impressive. Another reply notes the JAX backend makes gradient-based optimization straightforward, matching the differentiable-physics tutorial above. A maintainer-adjacent comment in the same thread describes an early browser-based viewer and shared model URLs at live.mujoco.org, which is still experimental and has rough phone support.
Related bindings and converters
Beyond first-party Python, JavaScript/WebAssembly, and C#/Unity bindings, the README lists community bindings for MATLAB Simulink, Swift, Java, Julia, and Rust, plus converters from OpenSim, SDFormat, OBJ, and Onshape CAD assemblies. Check the specific binding's own documentation for API coverage and maintenance status before committing to it.
Written by AI from the project's README, updated . The project's own docs are the source of truth.