Reinforcement playground · live policy

BiProp Pickup

A two-propeller drone flies to a 2 kg brick, grabs it, and carries it to the green target. It has only left and right throttle and no attitude controller, so the network does all of the balancing. The physics and the trained policy are compiled from the project's Rust code to a 1.2 MB WebAssembly module and run here in your browser. Nothing on this page is pre-recorded.

Loading the policy…

Click anywhere in the arena to move the target, before or after the grab. You can also click inside the close-up for finer placement. The dashed box marks where targets were placed during training. Targets outside it work most of the time, but the policy never practised there.

Speed

Telemetry

Altitude–
Tilt–
Speed–
To target–
Network activationspositivenegative

One pixel per neuron, brighter the stronger it fires: the 16 inputs, four hidden layers of 128 tanh units, and the two outputs (collective and differential throttle). There is one output head for the whole task, so the switch from approaching to carrying at the grab has to happen inside the hidden layers. Inputs and outputs are squashed with tanh for display.

left throttleright throttlelast 5 s, 0–1
episode return

The return is the task reward the policy finished training on: +0.05 for every step the drone holds the brick settled at the target, meaning within 1 m, under 0.5 m/s and 8.6° of tilt. Nothing else pays, so the curve stays flat until the drone arrives, and a crash forfeits everything still to come. An episode counts as a success after 45 settled steps in a row; moving the target restarts that count.

1000-episode evaluation

This policyPrevious best
Success99.4%91.6%
Grabbed the brick99.4%94.6%
Crashed0.0%2.6%
Mean time to settle4.3 s5.1 s
Trainingfrom scratchfine-tuned

Both checkpoints were scored on the same 1000 deterministic episodes from random starts, under the current crash rule: tipping over counts as a crash only once the drone is lying on the ground, since in the air it can still recover. This policy trained from scratch for 2460 iterations and ended on time settled alone; the previous best needed a 600-iteration fine-tune of an older policy to get there.

How it got there

In-training evaluations run every 20 iterations on 80 episodes, so single points swing by up to ±20 points. Shaded bands are where each temporary training aid ramped to zero. The last one was gone by iteration 660; the remaining 1800 iterations trained on time settled alone, which kept success near 100% and cut the time to settle by about a quarter.

The checkpoint

Network
MLP, 16 inputs → 4 × 128 tanh → 2 outputs (collective and differential throttle), single_head: one output head for the whole task
Observations
Position, velocity, sin/cos of attitude, angular velocity, brick and target offsets (plus fine-scale tanh copies for the ~10 cm a grab needs), holding flag
Algorithm
PPO on Burn 0.21, CPU backend; 8 actors × 2048 steps = 16,384 samples per iteration; 2460 iterations from scratch on a single CPU core, about 2 hours
Reward
+0.05 per step settled at the target with the brick. Grab, first-arrival, alive and holding rewards are training aids that switch off once success holds.
Checkpoint
runs/tilt/fresh9_iter_2460, seed 9 of 18; 7 of the 18 got every training aid off within 3000 iterations
Relabeling
Hindsight relabeling of both sparse events (grab and arrival) with V-trace off-policy correction
Curriculum
Training only: 50% of episodes start just above the brick, 25% already holding it. Episodes here always start from the full task.
Physics
Rapier2D at 60 Hz; 1 kg drone, 10 × 4 cm, 24 N max thrust per propeller; brick 21.5 × 6.5 cm