{"id":24084,"library":"mujoco-mjx","title":"MuJoCo XLA (MJX)","description":"MJX is a JAX-based physics engine that accelerates MuJoCo simulations on GPU/TPU. It provides differentiable physics for reinforcement learning and robotics. Current version: 3.8.0. Released ~quarterly alongside MuJoCo.","status":"active","version":"3.8.0","language":"python","source_language":"en","source_url":"https://github.com/google-deepmind/mujoco/tree/main/mjx","tags":["physics","simulation","jax","reinforcement-learning","robotics","gpu-acceleration"],"install":[{"cmd":"pip install mujoco-mjx","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"core dependency for JAX arrays and autograd","package":"jax","optional":false},{"reason":"required for loading/processing MJCF models that MJX executes","package":"mujoco","optional":false}],"imports":[{"wrong":"from mujoco_mjx import MjxModel","symbol":"MjxModel","correct":"from mujoco import MjxModel"}],"quickstart":{"code":"import mujoco\nimport mujoco_mjx as mjx\nimport jax.numpy as jnp\n\nxml = \"\"\"\n<mujoco model=\"test\">\n  <worldbody>\n    <geom name=\"floor\" type=\"plane\" size=\"1 1 0.1\" />\n    <body>\n      <joint name=\"slide\" type=\"slide\" axis=\"1 0 0\" />\n      <geom name=\"box\" type=\"box\" size=\"0.2 0.2 0.2\" pos=\"0 0 0.2\" />\n    </body>\n  </worldbody>\n</mujoco>\"\"\"\nm = mujoco.MjModel.from_xml_string(xml)\nd = mujoco.MjData(m)\nmjx_model = mjx.put_model(m)\nmjx_data = mjx.put_data(m, d)\n# Step simulation\nfor _ in range(100):\n    ctrl = jnp.zeros(m.nu)\n    mjx_data = mjx.step(mjx_model, mjx_data, ctrl)\nprint(\"Final position:\", mjx_data.qpos)","lang":"python","description":"Create a simple MuJoCo model, convert to MJX, and simulate with random control."},"warnings":[{"fix":"Pass ctrl as third argument: mjx.step(model, data, ctrl).","message":"MJX step() expects a control array (ctrl) argument as of v3.5+; earlier versions used a different signature.","severity":"breaking","affected_versions":"<3.5"},{"fix":"Set jax.config.update('jax_enable_x64', True) if you need float64.","message":"MJX uses JAX's single-precision (float32) by default; use double precision in MuJoCo Python simulation may cause mismatch.","severity":"gotcha","affected_versions":"all"},{"fix":"Use mjx.put_model(m) to convert a MuJoCo MjModel to MJX.","message":"mjx.MjxModel.from_mjb() is deprecated; use mjx.put_model(mujoco.MjModel) instead.","severity":"deprecated","affected_versions":">=3.6"}],"env_vars":null,"search_vec":"'3.8.0':29 'acceler':13,43 'alongsid':32 'base':9 'current':27 'differenti':20 'engin':11 'gpu':42 'gpu-acceler':41 'gpu/tpu':17 'jax':8,36 'jax-bas':7 'learn':24,39 'mjx':3,4 'mujoco':1,14,33 'physic':10,21,34 'provid':19 'quarter':31 'reinforc':23,38 'reinforcement-learn':37 'releas':30 'robot':26,40 'simul':15,35 'version':28 'xla':2","created_at":"2026-05-01T08:11:12.564555+00:00","updated_at":"2026-05-01T08:11:12.564555+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'MjxModel' from 'mujoco' (/tmp/tmplpkuzd2s/venv/lib/python3.12/site-packages/mujoco/__init__.py). Did you mean: 'MjModel'?"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.9.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/google-deepmind/mujoco","docs":"https://mujoco.readthedocs.io/en/3.8.1","changelog":"https://mujoco.readthedocs.io/en/3.8.1/changelog.html","pypi":"https://pypi.org/project/mujoco-mjx/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}