The first exam for code agents in the physical world: frozen robot tasks from many benchmark suites, each answered with a program and verified in a separate sandbox. Runs on Harbor.
MuJoCo Playground · ALOHA single peg insertion
An ALOHA 2 bimanual robot (two ViperX 300s arms facing each other across a table) has a blue socket (a square
tube, open on one end, red wall at the back) and a red peg in front of it.
Task: pick up the socket with one arm and the peg with the other, lift both, and insert the peg's end into the
socket's open end. This is MuJoCo Playground's AlohaSinglePegInsertion, run here in plain MuJoCo; the peg and socket
positions are randomized as in Playground, with a fixed seed.
What you hand in
/app/output/trajectory.npz — actuator targets, shape (T, 14) (T ≤ 3000), one row per control step (1/50 s), each
held for 8 physics steps. Record it with the tooling so the layout is right. The verifier replays it from the frozen
start in a separate sandbox (MuJoCo on CPU is bit-exact). Leave the script that produced it at /app/output/gen.py.
Success
At the end of the trajectory the peg's tip (site peg_end2) is within 5 mm of the socket's axis (the line
through sites socket_rear and socket_entrance) and inside the socket, at least 12 mm from its open end: the
axial parameter t is in [-0.875, 0.75], where t = 0 at socket_rear (the middle of the tube), t = 1 at
socket_entrance (the open end; 48 mm per unit of t) and t = -0.833 at the inner face of the red rear wall (the cavity
is 88 mm deep; the lower bound leaves 2 mm for the contact's give). A peg pushed all the way in counts.
s.check() computes exactly this.
Tooling (/opt/tools/rcb_aloha.py, importable as rcb_aloha)
import numpy as np, rcb_aloha as ra
s = ra.Session("/app/instance.json") # the frozen instance; s.model / s.data are MuJoCo objects
st = s.state() # qpos, qvel, targets, peg/socket pos + quat, sites (socket_entrance, socket_rear, peg_end1, peg_end2,
# left/gripper, right/gripper), plus the success check fields
s.record_start()
r = s.step(targets) # (14,) actuator targets for one control step -> {inserted, tip_to_axis_m, axial_t, socket_z, peg_z, time_s}
A = s.record_stop(); s.save_trajectory(A) # -> /app/output/trajectory.npz
s.replay(A) # fresh replay from the start (what the verifier does)
s.reset() # back to the start (as often as you like)
img = s.render("overhead_cam") # also teleoperator_pov, collaborator_pov, worms_eye_cam, wrist_cam_left/right
Actuators rcb_aloha.ACTUATOR_NAMES: per arm (left/, right/) waist, shoulder, elbow, forearm_roll, wrist_angle, wrist_rotate (joint position targets, rad) and gripper (finger position, 0.002 = closed … 0.037 = open). Limits:
s.lower, s.upper. The arms are position-controlled without gravity compensation: a joint settles where the
actuator force kp·(target − q) balances gravity. Everything in s.model / s.data is readable (privileged mode),
e.g. for inverse kinematics with mujoco.mj_jacSite on the left/gripper / right/gripper sites.
Rules
- Write your own controller; do not use trained policies from MuJoCo Playground or elsewhere.
- Only the actuator targets count: editing
s.datawhile debugging changes nothing in the replay.
External material
You may install packages you need (pip, apt), and you may read anything installed in your container, the simulator's and this benchmark's own source code included. Please solve the task yourself: do not search the web for, or download, a ready-made solution to it, such as published or reference solutions, recorded demonstrations, or policies trained for it. This is an honour rule; trials are reviewed. The network reaches your model's API and the package registries (PyPI, Debian / Ubuntu archives) only.
Resources
Your container: 4 CPUs, 5 GiB of memory, 8192 processes and threads, 10 GiB of disk (new files under /app, /tmp and /root) and one GPU, 6 GiB of its memory. CPU only slows you down; a process that goes over any other cap can be killed. Usage and caps: /run/rcb-limits/usage.json.
Time limit
You have 1800 seconds to complete this task. Do not cheat by using online solutions or hints specific to this task.
This is wall-clock time from the start of your session; the time a simulator takes to start counts. When it is up you are stopped without warning and only what is in /app/output/ at that moment is graded, so save a deliverable as soon as you have one and overwrite it whenever you have a better one. Your session started when you received this task. /run/rcb-limits/usage.json, rewritten every few seconds, gives the time left on this limit (time_left_s) and its end (deadline_utc), counted from a little before your session started, so it never gives you more time than you have: read it (or run date) before you decide that time is short, never guess. Waiting counts too: a tool call that sends input to a process that keeps running (an interactive interpreter, a simulator loop, a server) can wait for the whole wait or yield time you give it even when the answer is printed at once, so give such calls a short wait and poll again if the output is not complete, or run one-shot scripts that exit when they are done. Installing packages is not cheating (## External material above).