🧪 Self-driving lab — AI plans, a robot runs the experiments Live model
You run a small self-driving lab. A customer sent a coloured reference sample; the lab must find the recipe that reproduces it. A liquid-handling robot fills a 1,000 µL cuvette from two dye stocks, A and B, and tops it up with clear diluent; a three-channel photometer reads the absorbance; the mismatch to the reference is reported in mAU. Recipes move in 2 % steps, which gives 1,326 possible recipes — and only 40 cuvettes a day. After every result a statistical model (a Gaussian process) redraws its map of the recipe space and proposes the next experiment. The robot makes what the pipette actually delivers and the photometer reports what it actually reads, so a worn pipette channel or a drifting zero quietly bends the whole map. At the end your reported recipe is made on a calibrated line: that result, not the lab's own reading, is your score. This is a model of operating principles: it runs no robot and no real chemistry, and the numbers are generic. Educational simulation only.
What you will learn
Why a loop that learns from every result reaches the target in about 15 experiments, where a grid would need hundreds and a lottery mostly misses.
How to tell random error from systematic error: averaging r readings cuts the noise by a factor of √r, but only a blank, a reference standard and a pipette check catch an offset or a worn channel.
What operating an autonomous lab means in practice: recover a stopped robot quickly, and start a new campaign when the materials change instead of mixing old and new results.
Simulator
Time 0 min
Waiting
Plan
Make
Measure
Learn
Check
Recipe map — what the model predicts
●Tested recipe
★Reported recipe
◆Model's next pick
▶Sample in work
■Predicted mismatch low
■Predicted mismatch high
▪Small square: model unsure there
Robot deck
Reference sampleSample in work
Cuvettes left40/40
QC: reference standardnot checked yet
QC: pipette channel Bnot checked yet
Learning curve — mismatch, mAU
Reported recipe—
No recipe reported yet
Controls
By hand: you set the recipe and press the button for each experiment. Grid: the robot walks a coarse grid, 20 % steps first. Random: recipes are drawn by lot. AI: six spread-out recipes, then the model picks whichever recipe promises the largest expected improvement. In the three automatic modes the robot keeps going on its own.
Share of the cuvette filled from stock A, in 2 % steps. Used only when you plan by hand.
Share filled from stock B. If A and B together exceed 100 %, B is cut back; the rest of the cuvette is diluent.
Queues one experiment with the recipe on the two sliders (up to three can wait). Each uses one cuvette.
The result is the mean of r readings: the noise falls by a factor of √r, each extra reading costs a minute. Averaging does nothing against an offset.
After how many experiments the robot takes a blank. A blank reads pure diluent and sets the photometer zero again. It takes a minute and wipes out whatever offset has built up since the last one.
Two minutes: the photometer reads a sealed reference standard and channel B is weighed on a balance. The two QC tiles then show what the check found. It finds faults; it does not fix them.
Four minutes: channel B is adjusted against the balance until it delivers the planned volume. Results taken before the calibration stay in the data set as they were.
After a jam the robot stands still until you clear it and send it home: two minutes. The sample that was in work is lost.
Sets the earlier results aside — the sample still in work included — and lets the model learn from scratch. The day's cuvette budget is not refilled.
Indicators
Mismatch of the reported recipe (model's estimate)
300.0mAU
critical
Experiments run
0
Model uncertainty at the next recipe
100%
critical
Robot standing still (jam)
0min
normal
Experiments since the last blank
0
Cuvettes left
40
Trend
Crisis scenarios
Level 1 · Sixteen cuvettes to match a colour
The customer collects the result in 48 minutes. One experiment takes three minutes, so you have time for about sixteen out of 1,326 possible recipes. The robot and the photometer are in good order. When the time is up the recipe your lab reports is made on a calibrated line and must be within 30 mAU of the reference. Choose how the lab plans its experiments.
Reported recipe within 30 mAU of the reference at the end
Already within 60 mAU after 36 minutes
Level 2 · Can you trust the measurement?
A 100-minute campaign on a robot that came back from another project yesterday. Nobody has checked it since. The loop will happily optimise whatever the instruments tell it, and the result will again be judged on a calibrated line: within 30 mAU of the reference. You also answer for the quality of the data: the pipette error and the photometer offset the results were taken with are part of your score. Decide what to check before you let the loop run, and what to keep doing while it runs.
Reported recipe within 30 mAU of the reference at the end
Photometer offset during the campaign, on average 12 mAU or less
Pipette error during the campaign, on average 1 % or less
Level 3 · An unattended shift
A 130-minute shift with the loop running on its own; the day has 40 cuvettes. The photometer on this deck is known to drift, so it needs regular blanks. Two things are on the plan: the gripper on this robot jams now and then, and at minute 80 the stock of dye A runs out and a freshly prepared bottle is loaded. There are two deliveries. At minute 80 the recipe reported so far goes out for a first batch made from the old bottle, and at the end of the shift the reported recipe is judged again, on a calibrated line that uses the new bottle. Keep the robot moving, and keep the data set fit to learn from.
Reported recipe within 30 mAU of the reference at the end
First delivery at minute 80 (old bottle): reported recipe within 30 mAU
Robot standing still for 5 minutes or less
No results from the old bottle left in the data set
Basis — the model behind the numbers
Every relation the simulator uses, with its source. Constants marked as assumptions are illustrative calibrations.
Beer–Lambert law: absorbance is the sum of each dye's contribution, proportional to its share; the diluent does not absorb.
A_λ = Σ_i ε_λi · x_i · ℓ (+ γ_λ · x_A · x_B)[1][2]Assumption: the absorption coefficients, the dye–dye deviation term, the photometer noise, the pipetting error, the drift rate, the size of the pipette fault and of the lot change, all durations, the kernel length scale and the cuvette budget are illustrative values for a generic teaching lab. The laws and the optimisation method are as cited.
What is in the cuvette: delivered volumes divided by their sum. A worn channel delivers a fixed share too much or too little; a new stock bottle may be more concentrated.
x_i = V_i / ΣV, V_B = V_B,planned · (1 + δ), x_A ← x_A · (lot factor)[3]Assumption: the absorption coefficients, the dye–dye deviation term, the photometer noise, the pipetting error, the drift rate, the size of the pipette fault and of the lot change, all durations, the kernel length scale and the cuvette budget are illustrative values for a generic teaching lab. The laws and the optimisation method are as cited.
Mismatch: root mean square difference between the sample's and the reference's absorbance over the three channels.
A reading is truth plus offset plus noise. The mean of r readings has a standard deviation of σ/√r; the offset is untouched.
A_read = A + offset(t) + noise, s(mean of r readings) = σ / √r[4][2]
The photometer zero drifts with time since the last blank; a blank sets it back to zero.
offset(t) = rate · (t − t_blank); a blank sets offset = 0[2]Assumption: the absorption coefficients, the dye–dye deviation term, the photometer noise, the pipetting error, the drift rate, the size of the pipette fault and of the lot change, all durations, the kernel length scale and the cuvette budget are illustrative values for a generic teaching lab. The laws and the optimisation method are as cited.
Gaussian-process regression: from the tested recipes it predicts the mismatch of every other recipe and how unsure that prediction is.
Expected improvement: how much better than the best so far a recipe is likely to be, weighing a promising prediction against an uncertain one. The next experiment is the recipe where it is largest.
EI(x) = (f* − μ − ξ)·Φ(z) + σ·φ(z), z = (f* − μ − ξ)/σ; next = argmax EI[6][7]
The closed loop of a self-driving lab, and the time one pass takes here.
plan → make → measure → learn → plan (experiment = 2 min + r · 1 min)[8][9]
Randomness: a seeded mulberry32 generator; distributions used — uniform, exponential (inverse CDF), normal (Box–Muller), Poisson (Knuth). The seed is shown and shareable.