[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116238":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":17,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":43,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":15,"starSnapshotCount":15,"syncStatus":47,"lastSyncTime":48,"discoverSource":49},116238,"alloy","argonrobotics-ai\u002Falloy","argonrobotics-ai","Alloy: a multi-material, parallel physics engine for robot learning, built on Newton, MuJoCo Warp and Warp. Rigid robots, cloth, liquids and soft bodies in one scene, in parallel worlds on a GPU (thousands for free rigid bodies, up to 4,096 for a robot arm), or on a CPU. Python 3.11 or 3.12.","https:\u002F\u002Falloy.argonrobotics.ai",null,"Python",73,6,1,0,11,5,49.14,"Apache License 2.0",false,"main",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"ai-agents","cloth-simulation","fluid-simulation","gpu","gymnasium","imitation-learning","mujoco","mujoco-warp","newton-physics","physics-engine","physics-simulation","python","reinforcement-learning","robot-learning","robot-simulation","robotics","sim-to-real","simulation","soft-body","warp","2026-11-22 10:53:17","2026-11-23 16:39:29","# Alloy physics engine\n\nOpen source under Apache-2.0: https:\u002F\u002Fgithub.com\u002Fargonrobotics-ai\u002Falloy\n\n![A cloth sheet draped over a stand, simulated in Alloy](https:\u002F\u002Falloy.argonrobotics.ai\u002Fdocs\u002Fimg\u002Fcloth.png)\n\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2611.16312-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.16312)\n\n**Install:** `pip install alloy-engine`, inside a Python 3.11 or 3.12 virtual environment (Linux x86_64, or macOS\non Apple silicon), then the quick start below. On an older Python (a stock Ubuntu 22.04 has 3.10) pip answers \"from\nversions: none\": `uv venv -p 3.12 --seed && source .venv\u002Fbin\u002Factivate` makes a 3.12 environment with pip in it.\n\nAlloy is a physics engine for robot learning, built on [Newton](https:\u002F\u002Fgithub.com\u002Fnewton-physics\u002Fnewton),\n[MuJoCo Warp](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fmujoco_warp) and [Warp](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fwarp): rigid\nbodies and robots step in MuJoCo Warp (MuJoCo C on the CPU), cloth and soft bodies in Newton's VBD, sand and pastes\nin Newton's MPM, liquids in Alloy's own DFSPH. One scene can hold rigid robots (sub-millimetre contact for declared\nprecision fits such as pegs and threads), cloth and soft bodies, liquids, granular material, cables and objects that\ncut or tear, stepped together in parallel worlds on one NVIDIA GPU: thousands for free rigid bodies, 512 to 4,096\nfor a robot arm (on one L4, a Franka Panda with a table and a cube ran best at 2,048), tens to hundreds with cloth or\nliquid. Without a GPU everything runs on the CPU, slowly.\n\nKeep in mind: the engine's known limits, each with its size and workaround, are on one page,\nhttps:\u002F\u002Falloy.argonrobotics.ai\u002Fdocs\u002Fkeep-in-mind\u002F (installed as `public\u002Fkeep-in-mind.md` in the docs folder, with a\npage per limit in `known_gaps\u002F`).\n\nObjects are described once as **cards** (YAML: shape plus material values with their sources); a router picks the\nsolver for\neach (MuJoCo Warp for rigid bodies, VBD for cloth and soft bodies, DFSPH for liquids, ...), and one `Simulation`\nloop steps them together.\n\nWhat it is for:\n\n- A robot arm pouring liquid: build the cup into the robot's hand in its MJCF and the robot pours from it into a\n  second container (`docs\u002Fguide\u002Frobots.md`, Grasping). For liquid pouring reinforcement learning, the ready-made\n  `Pour-v0` env streams water from a spout; the agent moves a bowl under the stream and is rewarded for catching it.\n- Cloth and towel folding for imitation learning: `ClothFold-v0` (experimental) is a task that folds a towel along its\n  diagonal with a gripper; a scripted fold ships as `examples\u002Fenvs\u002F09_cloth_fold.py` (expect partial folds), and\n  `alloy.il` records the env's episodes as demonstrations (HDF5, robomimic layout). The recording holds observations\n  and actions, not the towel's vertices, and a recording with cloth cannot be replayed.\n- An MJCF robot with sand and water: one scene holds a robot from an MJCF file, sand (MPM) and water (DFSPH), stepped\n  together. The sand is a solid wall to the water, which does not soak in (`docs\u002Fknown_gaps\u002Fsph-mpm-mixing.md`). It is\n  slow on a CPU.\n- Cable and wire manipulation: `scene.add_rod` makes a cable or wire that bends, twists and stretches as its material\n  says, and a robot can grip and twist it; a copper wire keeps a bend past yield (`docs\u002Fguide\u002Frods.md`).\n- An MCP server physics simulator for robotics: `alloy mcp` gives an AI agent the engine as MCP tools (build a\n  scene, step it, read its state and health, render it); see MCP server below.\n\n> Status: early public release (0.x). APIs may change between minor versions.\n\n## Install\n\nLinux x86_64 (CPU or NVIDIA GPU) or macOS on Apple silicon (CPU). Linux aarch64 installs the same way but is not\ntested yet. Newton and MuJoCo Warp come inside Alloy; Warp, MuJoCo and the rest come from PyPI.\n\nInside a Python 3.11 or 3.12 virtual environment (`python3 -m venv .venv && source .venv\u002Fbin\u002Factivate`; a stock\nUbuntu 24.04 refuses pip outside one (PEP 668, \"externally-managed-environment\"), and its `python3 -m venv` needs\n`sudo apt install python3-venv` first):\n\n```bash\npip install alloy-engine                       # the import name is alloy\npython -c \"import alloy; print(alloy.__version__)\"\npip install \"alloy-engine[import,mesh]\"        # optional extras (below)\n```\n\nExtras, each added the same way: `import` (the object library below, mesh import, `collision=\"decompose\"`), `mesh`\n(soft bodies from meshes), `envs` (PyTorch, `huggingface_hub` and Gymnasium, for the Gym envs and torch camera\nimages; about 3 GB), `il` (HDF5 demonstration files), `lerobot` (LeRobot datasets; Python 3.12), `usd` (reading USD\nfiles), `viewer` (the live viewer) and `barcode`. The docs, the runnable examples and AGENTS.md install with the\npackage: `python -m alloy.docs` prints where.\n\n**NVIDIA GPU:** the pinned Warp (`warp-lang` 1.18.0) needs an R580-series or newer NVIDIA driver and a Turing\n(`sm_75`: T4, RTX 20 series) or newer GPU (Warp's install notes). Stock cloud images often ship without a driver:\ninstall one first (`nvidia-smi` then lists the GPU). Without a GPU it can use, Alloy runs on the CPU\n(`alloy.build(scene)` picks `cuda:0` when there is one). On a fresh Ubuntu machine with an NVIDIA GPU:\n\n```bash\nsudo ubuntu-drivers install && sudo reboot     # the NVIDIA driver (or start from a CUDA image instead)\nnvidia-smi                                     # after the reboot: lists the GPU\npip install \"alloy-engine[envs]\"               # in your virtual environment: Alloy plus PyTorch for the GPU\n```\n\nA C compiler lets CPU robot scenes use MuJoCo's C step (gcc on Linux; on a Mac, Apple's command line tools:\n`xcode-select --install`); without one they run on a slower fallback, and Alloy says so.\n\nThe first run of a new kind of scene compiles kernels once: about 45 s on a CPU (41 s on an 8-vCPU Linux machine,\n44 s on an Apple-silicon Mac) and 3 to 4 minutes on an NVIDIA GPU (190 to 240 s on L4s). The result is cached, so later\nruns start in seconds.\n\nAI agents: start with AGENTS.md, the whole quick start in one file: `python -m alloy.docs agents` prints it. Every\npage is also on the docs site, https:\u002F\u002Falloy.argonrobotics.ai\u002Fdocs\u002F, and its index for language models is\nhttps:\u002F\u002Falloy.argonrobotics.ai\u002Fllms.txt.\n\n## Quick start\n\n[![Open in Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fargonrobotics-ai\u002Falloy\u002Fblob\u002Fmain\u002Fnotebooks\u002Fquickstart.ipynb)\nIn a browser: the quick start notebook installs Alloy on Colab's free CPU runtime, drops a box, drapes a cloth and\nshows one rendered frame, in a few minutes.\n\nDrop a box onto a table and save its trajectory (`size` is full edge lengths in metres; under a minute on a CPU\nonce kernels are cached):\n\n```python\nimport alloy\n\nscene = alloy.Scene(dt=0.005)                       # control period: 5 ms per step\nscene.add_ground()\nscene.add_box(\"table\", size=(0.8, 0.8, 0.70), pos=(0, 0, 0.35), static=True)   # top at z = 0.70 m\nscene.add_box(\"box\", size=(0.08, 0.08, 0.08), pos=(0, 0, 0.90), mass=0.5)     # kg\nsim = alloy.build(scene)                            # GPU if there is one, else CPU\ntraj = sim.run(1.5, record=[\"box\"])                 # traj[\"box.pos\"]: (frames, worlds, 3)\ntraj.world(0).save(\"drop.npz\")                      # t, box.pos, box.quat_wxyz, ...\nz = float(traj.world(0)[\"box.pos\"][-1, 2])\nprint(f\"box rests at z = {z:.3f} m, health ok: {sim.check()['ok']}\")   # 0.740: table top + half the box\nassert abs(z - 0.74) \u003C 0.005\n```\n\nMore: the examples' `api\u002F` scripts (a gripper lift, many parallel worlds, cloth, liquid) and AGENTS.md.\n\n## Object library\n\nThe starter library (materials, contact pairs, 118 objects, demo scenes, robot models) installs with\nAlloy. About 5,400 more object cards, with collision hulls and estimated mass and friction, are a public Hugging\nFace dataset, `argonrobotics-ai\u002Falloy-library`, kept outside the package: 1,111 YCB and Google Scanned Objects\nscans; 1,989 Objaverse objects; 1,900 kitchen objects and fixtures made by Lightwheel (NVIDIA's\nPhysicalAI-Robotics-Manipulation-Objects-Kitchen-MJCF dataset, CC BY 4.0, as packaged by RoboCasa, with our\ncollision hulls, estimated masses and materials; no RoboCasa kitchens or tasks); and 393 cards from Gym-Anything,\none per rigid part of its articulated objects. 263 of the kitchen cards carry a flag for a failed mass, size or\nphysics check. The cards record where each mass comes from: measured or from a catalogue for 64 of the YCB and\nGoogle Scanned objects, an estimate from the object's category or mesh volume for more than 9 in 10 (the note says\nESTIMATE); friction is that of the library material the card names, not measured per object. Each one has its\ncard, meshes, convex hulls, textures and a thumbnail. Alloy downloads only the objects you ask for, into\n`~\u002F.cache\u002Falloy\u002Fimports\u002F\u003Clibrary>\u002F`; no account or login is needed. Fetching needs the `import` extra (it brings\n`huggingface_hub`): `pip install \"alloy-engine[import]\"`. With the extra, a build also fetches a Hub object you\nname that is not on disk yet; without it, `add_object` raises `SceneError` for any object not on disk, its fix\nnaming the extra and `alloy fetch \u003Cname>`. To fetch ahead of time:\n\n```bash\nalloy fetch --list --library ycb_gso                 # what there is; nothing is downloaded\nalloy fetch ycb_025_mug ycb_024_bowl                 # objects by name; files you already have are not downloaded again\nalloy fetch --library robocasa --category blenders   # one category; --library alone fetches a whole library (GBs)\n```\n\nThen use them by card name: `scene.add_object(\"mug\", \"ycb_025_mug\", pos=(0, 0, 0.1))`, or\n`alloy compose \"a mug and a bowl on a table\"`. `ALLOY_CACHE` moves the download folder. Each object's card records\nthe licence its source declares (CC BY 4.0, MIT, CC0 1.0 or Apache-2.0) and, in the comment at its top, the credit\nto give (the dataset's `ATTRIBUTION.md` collects them); check both before you share an object or an image of it, or\nuse it commercially.\n\n## MCP server\n\n`alloy mcp` serves the engine as Model Context Protocol (MCP) tools over stdio, with nothing beyond\n`pip install alloy-engine`: `list`, `scene`, `build`, `step`, `run`, `state`, `targets`, `reset`, `drive`, `pose`,\n`wrench`, `settle`, `heater`, `controls`, `close`, `check`, `render`, `estimate`, `import`, `export`, `vary`,\n`compose`, `create`, `audit` and `fetch`, the operations of the `alloy` command line with the same JSON. To add it\nto Claude Code:\n\n```bash\nclaude mcp add alloy -- alloy mcp\n```\n\n`fetch`, `create` and `compose`'s objects from the Hub library need the `import` extra\n(`pip install \"alloy-engine[import]\"`). The server code is\n[`alloy\u002Fmcp\u002F`](https:\u002F\u002Fgithub.com\u002Fargonrobotics-ai\u002Falloy\u002Ftree\u002Fmain\u002Falloy\u002Fmcp).\n\n\u003C!-- mcp-name: io.github.argonrobotics-ai\u002Falloy -->\n\n## What is in the box\n\nWhat `pip install alloy-engine` puts in site-packages (`python -m alloy.docs` prints the docs, examples and\nAGENTS.md paths):\n\n| Path | What |\n|---|---|\n| `alloy\u002F` | the engine package: cards, scene assembly, solvers, contact, coupling, precision, parallel worlds |\n| `alloy\u002F_data\u002Flibrary\u002F` | the starter card library: materials (with sources), contact pairs, objects, scenes, robots |\n| `alloy\u002F_data\u002Fdocs\u002F` | the docs: `public\u002F` (from `index.md`), `known_gaps\u002F` (a page per limit), `guide\u002F` (reference) |\n| `alloy\u002F_data\u002Fexamples\u002F` | runnable scripts (index: `README.md` there) |\n| `alloy\u002F_data\u002FAGENTS.md` | the quick start for AI agents |\n\n## Built on\n\nAlloy's physics core is built on [Newton](https:\u002F\u002Fgithub.com\u002Fnewton-physics\u002Fnewton) and\n[MuJoCo Warp](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Fmujoco_warp) (both Apache-2.0), on\n[Warp](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fwarp). Rigid bodies and robots step in MuJoCo Warp through Newton's `SolverMuJoCo`\n(in MuJoCo C on the CPU), cloth and soft bodies in Newton's `SolverVBD`, sand and pastes in Newton's implicit MPM\nsolver, and liquids in Alloy's own DFSPH solver. Newton and MuJoCo Warp ship inside Alloy as `alloy\u002F_vendor\u002Fnewton`\n(with our fixes) and `alloy\u002F_vendor\u002Fmujoco_warp` (files unchanged), with their own names, licences and copyright\nheaders; `alloy\u002F_vendor\u002FVENDORED.md` (in the package) lists the upstream commit each starts from and every\nchange we made. By default Alloy replaces some of MuJoCo Warp's solver and collision steps at run time (listed in\nthe same file).\n\nInstalling Alloy does not install or replace a `newton` or `mujoco-warp` package of your own, but it pins\n`mujoco==3.17.0` and `warp-lang==1.18.0` (from PyPI) and replaces other versions of those two in the\nenvironment. A `newton` or `mujoco-warp` of your own can share the environment only if it accepts exactly those\nversions; otherwise keep it in its own virtual environment.\n\n## Citation\n\nThe paper on Alloy is on arXiv: https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.16312. To cite Alloy, cite from the arXiv page.\n\n## Licence\n\nApache-2.0 (see `LICENSE`). Third-party code, robot models and data keep their own licences; see `NOTICE`.\nIssues and questions: https:\u002F\u002Fgithub.com\u002Fargonrobotics-ai\u002Falloy\u002Fissues. Contributing:\nhttps:\u002F\u002Fgithub.com\u002Fargonrobotics-ai\u002Falloy\u002Fblob\u002Fmain\u002FCONTRIBUTING.md. Pull requests run the quick CPU tests: about\n45-60 minutes with a warm kernel cache; a run with no cache first warms it for about 45-55 minutes. Security\nreports: privately, through https:\u002F\u002Fgithub.com\u002Fargonrobotics-ai\u002Falloy\u002Fsecurity (see SECURITY.md), not in public issues.\n","Alloy 是一个面向机器人学习的多材质并行物理引擎，支持刚体、布料、液体、软体、颗粒物等多种物理对象在同一场景中协同仿真。其核心采用分层求解架构：刚体与机器人基于 MuJoCo Warp（CPU），布料与软体使用 Newton 的 VBD 方法，液体采用自研 DFSPH，颗粒物依托 Newton MPM，并通过统一 YAML ‘卡片’描述物体属性，自动路由至对应求解器；支持 GPU 加速（NVIDIA）与纯 CPU 模式。适用于机器人强化学习、模仿学习、仿真到现实（sim-to-real）迁移等需要高保真多材质交互的科研与开发场景。",2,"2026-11-24 04:53:16","CREATED_QUERY"]