Robot Arm
A robot arm on a table picks up a red block and puts it in one of two bins. A lit lamp names the bin it should use. You can move that bin while the arm carries the block, and the arm follows it.
What it shows about CadenceThe arm’s brain runs in real time, like the brain of a living being: about five times a second it senses where its hand, the block and the target bin are, and settles on its next move. Because it senses the bin anew at every decision, moving the bin in the middle of a carry, something it never met while it learned, turns its next moves toward the new place. It needs no new lesson for that. The brain also has a real state that lasts from moment to moment: a working memory of the last moments.
What you see
On the left, the arm in a physics simulation. On the right, its brain, live. Both run inside your browser.
- The arm, a Franka Panda robot with a two-finger gripper (its hand), simulated with real contact physics: the block can slip, tip and bounce. A blue trail follows the fingertips, and a small blue dot marks where the brain’s last move sends the hand.
- The block, the thing the arm picks up.
- The target bin (here bin A), with its lamp lit. The words over it say which bin it is. While the arm carries the block they read “drag bin A”: that is the moment to move it. A small amber dot above the bin marks where the hand lets go.
- The other bin (here bin B), with its lamp dark.
- The line at the top left says what is happening and what you can do next.
- The buttons: which bin is the target, Run (Stop while it runs), Reset, Shuffle, and the speed.
- Motor, the next move: what the brain chose at this decision. Three rows of bars for moving the hand −2 to +2 cm along x, y and z, and one for open or close. The outlined bar is the choice.
- The brain’s layers: Layer 3 (the top), the working memory beside it with its history (memory over time), then Layer 2 and Layer 1. Every square is a neuron, brighter when more active. Lines show the strongest signals: cyan going up, violet coming back down, teal from the working memory.
- The senses: what the brain is told at each decision, in groups. The group Target bin − hand is where the target bin is, seen from the hand; it changes the moment you move the bin.
Above the brain, three numbers: Decision (how many moves so far), Settle (how many sweeps the brain took to settle; on every second decision the panel replays the settle sweep by sweep and this counts along) and Think (how long the settle took in your browser). Every part of the page has a small ?, or explains itself when you rest the pointer on it.
Why it matters
A living brain runs in real time. It senses, settles and acts in one continuing loop, so a change in the world changes the next move. A robot needs the same, because things around it move. This brain decides about five times per second of arm time, and each decision gives it 200 ms. In your browser one settle takes tens of milliseconds (a median of 16.3 ms in the page check), so the arm on screen moves at the speed of real time, without pauses.
It meets something new without a new lesson. While it learned, the bins never moved: they stood at two fixed places. Here you can move the target bin in the middle of a carry. The brain senses the bin’s new place at its next decision, and the moves it settles on head there. Its synapses stay exactly as they were trained; nothing is retrained.
Its answer is the settled state of the whole brain. At each decision the senses, the three layers, the working memory and the motor neurons settle together into one state, signals going up and coming back down, and the move is read from that state. Every second decision the panel replays that settle, sweep by sweep.
A fair comparison. A conventional network of the same task, trained by backpropagation on the same teacher (a control), placed as many blocks on the physics it trained on: 0.968 against 0.973 for this brain’s design, and on held-out physics it did better, 0.738 against 0.698. The moved bin was tested on Cadence brains only. So this page shows a real-time brain that settles and follows a moving target; it does not show an advantage over a conventional network on this task. What the brain did beyond its teacher: on the hardest physics it never trained on (light, slippery, bouncy blocks), it placed 0.465 of the blocks, the teacher it learned from 0.295.
What you can do
- Move the bin while the arm carries the block. Press Run. Once the arm has picked up the block, the top line says “Your turn” and the target bin reads “drag bin A” (or B). Press on that bin and drag it to a new place. The arm turns toward the new place and drops the block there.
- Change the target while it carries the block. Press the other bin’s button (or click the other bin) during the carry: the lamps switch, and the arm takes the block to the other bin.
- Set up the table before Run. Drag the block, or a bin, to a new place. A dashed outline shows where it may go: the block inside the area the brain learned on, the bins inside the band where the brain was tested.
- Choose the target bin. Click a bin in the scene, or press Bin A or Bin B. Its lamp lights.
- Run, Stop, Run again. Each Run starts the arm from home with an empty working memory.
- Reset puts the arm home and the block back where you placed it. Shuffle puts the block at a random place and picks a random target.
- Speed: 1× is real time; 2× and 4× play it faster. The physics and the brain compute the same moves at every speed.
- Look around: drag empty space to turn the view, and scroll to zoom.
- Explore the brain: point at a ? on the brain panel to see what each part does.
How it works
The senses. At each decision the brain is given 262 numbers about the true state of the scene (not camera pixels): where the hand is; where the block is, seen from the hand; where the target bin is, seen from the hand; the angles and speeds of the arm’s seven joints; how far the gripper is open, and whether it is closed and holding; its own last move, fed back in; and which lamp is lit.
The brain. One deep Cadence brain (Brain.compose) with three layers of 256, 128 and 64 neurons, a working memory of 64, and 17 motor neurons: 791 neurons and 155,264 synapses. Each higher layer sends a signal back down to the one below (the apical, top-down signal). At each decision the whole brain settles: its parts repair their disagreements with one another until they agree, and the strongest motor neuron in each row gives the move.
Its memory. Long-term, what it knows lives in its synapses, learned during its life and unchanged on this page. Short-term, the working memory is written at every decision and read by Layer 3, so the last moments shape the next move; it starts empty at each Run.
Its acts. Each decision moves the hand by −2 to +2 cm along x, y and z and opens or closes the gripper. A fixed reflex (inverse kinematics, part of the application, not learned) turns the hand move into targets for the seven joints, and the physics then runs 0.2 s of arm time.
How it learned. By imitating a scripted teacher (reach over the block, close, lift, carry, let go) for 400 episodes, with the block’s size, mass, friction and bounciness varied. A lesson came only where the brain disagreed with the teacher. At first the teacher moved the arm half of the time; by the end the brain did all of it. The bins stood at their two places the whole time. There is no reward in this demo.
Following a moved bin. One of the senses is where the target bin is, seen from the hand. When you move the bin, those numbers change at the next decision, and the brain settles on moves toward the new place. When you switch the target, the lit lamp and that sense both change.
The page. The physics is MuJoCo 3.17, compiled to WebAssembly, with the same simulated table, arm and bins the brain learned in. The brain is the released Cadence library (cadence-net 0.95.2) running in Python inside your browser (Pyodide). Replayed against recorded Python trials, the page’s brain gives the same command at all 104 recorded decisions.
The numbers
| Reading | Value | Evidence |
|---|---|---|
| On the page, mouse only: the target bin dragged to a new place while the arm carries the block; the block lands in the moved bin | 5 of 5, in each of two runs | promise_moved_bin-20261113-1134.json, promise_moved_bin-20261113-1206.json |
| On the page: the target switched to the other bin mid-carry; the block lands in that bin | 1 of 1, in each of two runs | promise_moved_bin-20261113-1134.json, promise_moved_bin-20261113-1206.json |
| On the page: bin B moved to (0.66, −0.12) m mid-carry; placed in the moved bin | 60 decisions | page_check.json |
| On the page: time for one settle (median) | 16.3 ms | page_check.json |
| On the page, on a machine at a load average near 250: time for one settle (median per run); share of arm time shown at clock speed at 1× | 83 to 114 ms; 0.80 to 0.98 | promise_moved_bin-20261113-1134.json |
| On the page at 1×: share of arm time shown on screen at clock speed | 1.0 | page_check.json |
| Target bin put at five places it never trained with, before the trial: blocks placed right, of 20 each | 20, 19, 19, 20, 19 | moved_bins.jsonl |
| Target bin at its two trained places: placed right, of 20 each | 19, 19 | moved_bins.jsonl |
| Target bin in a far corner (0.72, 0.32) m: placed right, of 20 | 10 | moved_bins.jsonl |
| Varied physics it trained on, 200 new trials: placed right, brain / teacher | 0.955 / 0.955 | stage2b_final.json |
| Hardest physics it never trained on, 200 trials: placed right, brain / teacher | 0.465 / 0.295 | stage2b_final.json |
| Controls with no learned brain (random moves, a blind brain, a newborn brain): placed right | 0.0 each | stage2b_final.json |
| Earlier stage, mean of three seeds: placed right, this brain’s design / backpropagation network (control) | 0.973 / 0.968 | stage2_final.json |
| Earlier stage, held-out physics: this brain’s design / backpropagation network | 0.698 / 0.738 | stage2_final.json |
Each file is in the demo’s evidence/ folder of the repository. Positions are in metres on the table; the bins learned at (0.62, −0.22) and (0.62, 0.22). The promise run works the real page in a headless browser, with the mouse, as a visitor does (robot-arm/tools/promise_moved_bin.py): it drags the target bin to four new places, as soon as the arm has lifted the block or once it has carried it half the way across, and switches the target once.
Limits
- The brain does not learn on this page. It follows a moved bin by sensing it, with its synapses unchanged.
- It learned by imitating a scripted teacher. The teacher and the reflex that turns hand moves into joint angles are fixed parts of the application, not learned.
- Its senses are the true positions of things; it sees no camera image.
- The part the working memory plays in following a moved bin was not measured: no run switched it off.
- A conventional network trained the same way placed as many blocks on this task; the page shows no advantage over one.
- The page keeps the bins inside the band where the brain placed 19 or 20 of 20 blocks. In the far corners it placed 10 of 20, so the page keeps the bins out of them.
- On the hardest physics it places fewer than half of the blocks. The page uses one block (5 cm, 80 g), always set down square to the table’s edges.
- On a busy computer the brain can fall behind real time: on a machine at a load average near 250, a settle took about 100 ms and the screen showed 0.80 to 0.98 of the arm time, so the arm paused at times. Its moves stay the same; only the picture waits.
- The readings certify these trials only, not general manipulation.