Alloy: a physics engine for robot learning
The Alloy physics engine from Argon Robotics is multi-material and parallel, built for robot learning on Newton and MuJoCo Warp. Rigid bodies, cloth, cables, liquids, sand and soft bodies share one scene, in thousands of worlds at once on one GPU. In an independent test, coding agents installed it from PyPI and taught a robot dog to walk in about 5 minutes of training.
Robots need worlds that behave like ours
Our bet is that robots will learn most of what they know inside virtual worlds. It starts with digitizing the physical world: building virtual worlds good enough to pass a Turing test, so robots can learn there instead of through slow, expensive real-world trials.
That only works if whatever happens inside a virtual world would also happen outside it. When it doesn’t, nothing warns you. The difference hides in training and shows up on the real robot as the sim-to-real gap.
And robots don’t only touch rigid boxes. They handle towels, cables, water and sand, and each of those has to behave like the real thing. Robots also learn by trying, millions of times, so all of it has to run in thousands of worlds at once and stay right in every one of them. In our last post we showed how today’s engines quietly break at exactly that scale. Alloy is what we built instead.
What it does
- Many materials, one scene. Robots, cloth, cables, liquids, sand and soft bodies, stepped together.
- GPU or CPU. The same script, renderer included, runs on an NVIDIA GPU or the CPU.
- A camera for every world. Colour, depth and segmentation of every world at once.
- Robots ready to go. Arms, a hand, a quadruped and two humanoids, with RL and demo recording.
- Settings choose themselves. Solvers and steps are picked;
sim.routes()says why. - Health in every world. Tells a physics failure from a policy failure.
- Built for agents. Give your coding agent one prompt. It reads the docs, builds your world and trains your robot, in minutes.
How it held up
We wanted to know how Alloy does in the hands of someone who has never seen it. So we had it audited independently. Coding agents installed Alloy from PyPI like strangers would, trained with their own code on a single NVIDIA L4 GPU, and were scored on seeds held out from training.
- Walking. A Go2 robot dog learned to walk to 97 % success in about 5 minutes of training, and kept its feet under a 150 N push 98 % of the time.
- Learning from pixels. Reaching and pushing, learned from 64-pixel camera images only, got to 92 % in 6 and 18 minutes.
- Imitation learning. 100 % on pick-and-place 25 minutes after
pip install, and 88 % from camera images alone. - Cables. A cable-lifting task reached 96 % after 15 minutes.
- Liquids. Pouring reached 92 % on the built-in pour task, and 100 % on a cup-pouring task the agent wrote itself.
- New tasks. Agents built brand-new training tasks from the docs in 1 to 8 minutes each.
Keep in mind
Alloy is new, and some things are not there yet:
- On simple single-robot tasks, Alloy is not yet the fastest engine.
- Reinforcement learning for arm grasping is early.
- Cloth and sand train slowly for now.
We are fixing these fast. Alloy will be the default way to simulate the world, so start using it now. The Keep in mind page of the docs has the details.
Start with one line
Alloy is open source under Apache-2.0: the code is on GitHub. Install it with pip install alloy-engine, then read the docs. The paper is on arXiv.
Or let your agent do it: copy this, paste it into your coding agent and name your task.
Build and train <your task> with AlloyInstall alloy-engine with pip (Python 3.11 or 3.12, in a virtual environment). Read its docs: run python -m alloy.docs, or fetch https://alloy.argonrobotics.ai/llms.txt. Then build <your task> in many parallel worlds: start from the closest ready-made environment in the docs and change it step by step. Train a policy until it succeeds, check sim.health() after every run, and report the success rate.
Clips, docs and a guide to using Alloy with your coding agent are at alloy.argonrobotics.ai.
How Alloy compares with other simulators, and common questions: comparison · FAQ.