Want a quick email when a new article is published? Subscribe
How a machine that knew nothing learned to fly a circuit, step by step
Executive summary
A small computer program that started knowing nothing about aeroplanes learned to take off, fly a circuit round an airfield and land. On the real simulator it flew ten whole flights and stopped safely on the runway every time, within two metres of the centre line. Nobody taught it to fly: it practised, and it was scored.
- It learns by spawning experimental pilots. A thousand random pilots try, the best are kept and copied with small changes, and the process repeats. The take-off pilot went from crashing within seconds to succeeding in 94% of unseen winds in about twenty rounds, after ten rounds of no visible progress at all.
- Practice was the biggest cost. Training needed about 30,000 hours of flying, three and a half years at real speed. The project built a rough stand-in for the simulator to get round that. It worked, but quietly cost the pilots some quality. One measurement showed the slowness came almost entirely from the browser and network, and running the physics directly turned 300 hours of practice into a few seconds.
- The score turned out to be the specification. Seven times, a champion exploited a gap between what it was scored on and what was intended: rolling down the runway off the centre line, slamming the controls, braking with full throttle. Points improved results; only a rule removed a bad habit; and a rule nobody could meet taught nothing until it gave partial credit.
- The joins broke first. The landing pilot passed its own exam 197 times in 200 and failed one landing in six after a real circuit, because it had never practised the faster, steeper handover. The navigator had also been relying on an exact position the real simulator never gives.
- Small tests picked the wrong winners. Judging on a hundred tries let weak candidates look strong. A thousand tries, and a final comparison on fresh flights, fixed it.
Most of the work, and the cost, went into the practice ground, the score and the testing.
Ten flights on the real simulator, ten planes stopped safely on the runway, every one touching down within two metres of the centre line. The pilot flying them had learned by practising, told only how well it was doing.
This is the whole story of how that pilot came about, in the order it happened: the recordings, the workaround that quietly cost quality, the measurement that made it unnecessary, three separate pilots and the seven times they found a loophole in what was asked of them, and the joins between them that broke when they were put together. There is no code, and you need no knowledge of machine learning or of flying: every term gets explained when it first turns up. The lessons for organisations get one line per stage; the full argument for each lives in From the other end.

The job: take off, fly a rectangle, land
At a small airfield, pilots practise the circuit: take off, climb, turn left four times to fly a rectangle round the airfield at 1,000 feet, line up with the runway, descend down a gentle slope and land where you started. It takes about eight minutes and contains almost everything that makes flying hard, including the landing, which is both the most dangerous part of any flight and the hardest for a new pilot to master. Flying a circuit explains it properly.
The aeroplane lives in my own simulator, BigSkySim, which models a small airfield and a four-seat Cessna-like plane, and which you can fly yourself in a browser (BigSkySim describes it, and Introduction tells how it came to exist). One feature matters for everything that follows. A computer program can fly the plane, but it only gets told what a human pilot would know: the instruments, rounded the way you would read a real dial (the bank angle to the nearest 5 degrees, the height to the nearest 10 feet); a word-picture of the view out of the window (“the centre line is slightly to the left”); and a rough position report of the kind a pilot gives on the radio (“late downwind, 2.5 miles south-east of the runway”). It never learns where the plane is to the metre.
Claude Code, an AI coding assistant, wrote the code and ran the experiments, with me directing: choosing what to try next, deciding what counted as good flying, and reading the results.
The method: breed a thousand pilots, keep the best, repeat
The learning method is called neuroevolution, and it works much like animal breeding.
Each pilot is a tiny neural network. Think of it as a box with a few hundred dials inside. Readings go in one side (airspeed, height, the angle of the wings), the dials mix them together, and control positions come out the other (how far to push the stick, how hard to press each rudder pedal). The dial settings, called weights, are the pilot’s entire personality. A take-off pilot has 99 of them. Set them at random and you get a pilot that flails.
Make a thousand pilots with random settings. Let each fly a dozen practice situations and give each a score. Keep the best 5% unchanged, and fill the rest of the next thousand with copies of the top 20%, each with its dials nudged slightly at random. That new thousand is the next generation. Repeat, a hundred times.
Nothing in that process knows anything about aeroplanes. The only place intentions enter is the score, which turns out to be the most important fact in the whole project.
The same method had already taught a simulated car to race round a track (Teaching a car to drive): a thousand cars per generation, and within about fifteen generations it beat a hand-written driving routine. The plane was meant to be the harder sequel.
Stage 1: before anything can learn, watch the plane being flown badly
The first step was to see how the plane behaves. A program took off, climbed to 1,200 feet and then flew deliberately badly: every few seconds it picked a new random nose angle, bank angle and throttle setting, with random extra stick and rudder on top, while guard rails stepped in whenever the plane got too slow, too low or too far away.
Flying badly was deliberate: the aim was to learn how the plane responds to its controls, and steady flying only teaches you about steady flying. A driving instructor learns more about a car’s handling on a skid pan than on a motorway.
The recordings showed something that shaped the rest of the project. Because the gauges are rounded, the pitch reading didn’t change at all in 63% of quarter-second steps, even while the nose was moving. Any pilot, human or machine, has to watch a needle drift for a second or so to see which way things are heading.
Stage 2: evolution needed years of practice, so the project built a stand-in
Then came the arithmetic that nearly sent the project down the wrong road.
Every request to the simulator took about 65 thousandths of a second, which meant the plane flew at roughly real time. Evolution is hungry: a thousand pilots, a dozen flights each, a minute or two per flight, a hundred generations. For the take-off alone that came to 30,000 hours of flying, about three and a half years.
So the project built a stand-in: a simple mathematical model of the plane, learned from about fifteen minutes of that wobbly flying. It answers one question over and over: “given the last second of readings and controls, what will the readings be a quarter of a second from now?” Feed its answers back in and it “flies”, thousands of times faster than the simulator.
Building it used a different kind of machine learning, supervised learning. Evolution only hears a score at the end of each attempt, like a salesperson who learns their quarterly number and nothing else. Supervised learning gets the right answer for every example: here is the situation, here is exactly what happened next. With that much guidance, learning is fast; the stand-in’s 405 numbers took under two thousandths of a second to work out. Teaching a pilot to fly covers the kinds of learning in more depth.
Tested on a recorded flight it had never seen, the stand-in stayed within about 2 knots of speed, 4 degrees of bank and 33 feet of height for 30 seconds. Good enough to practise on.

Stage 3: the first pilot flew well on the stand-in, by slamming the controls
The first task was modest: from wherever the plane is, get to 1,000 feet on a direction you’re given, and stay there. The score gave up to a point every quarter of a second, full marks for being exactly right, less the further off it was.
The stand-in only knew the flying it had seen in the recordings. Being a simple model, it had no idea that planes stall when they fly too slowly, and evolution would find that gap. So the training fenced it in: any practice flight that strayed outside the range of the recordings counted as a crash.
Sixty generations took about a minute on the stand-in (about 500 days, at the simulator’s speed), and the champion did the job. Then came a closer look at how it flew. The stick and throttle jumped from one end of their travel to the other, often every quarter of a second. The score said where to be and nothing about how to get there, and frantic stick-work cost nothing. No passenger would stay on board.
One line in the score fixed it: lose points in proportion to how much the controls move. The new champion did the task just as well (68.9% against 67.4%) with controls that moved about seven times less. So the frantic movement had never been helping; it had persisted only because it cost nothing.
Then the first real exam. Both champions flew the real plane in BigSkySim, from three awkward situations each, for the first time ever. All six flights went the full 90 seconds and ended near the target. In one, the stand-in had predicted a “crash” where the real plane flew fine. Evolution had learned to dive down to the target height as steeply as the fence allowed, right along its edge, and in the stand-in it had strayed a fraction of a degree over. The fence was a rule the project had made up for training, and the pilot had learned to fly right up against it.
Stage 4: one measurement made the stand-in unnecessary
The stand-in was working, but a closer look at where those 65 thousandths of a second went brought it to an end.
Nearly all of it was the browser and the network passing messages to and fro; the physics took a few millionths of a second. And BigSkySim’s physics turned out to be ordinary code that could run on its own, outside the browser, as thousands of separate copies at once across every processor core of one PC, each copy holding a single plane.
One generation of take-off practice, 12,000 take-offs and 300 hours of flying, now took about four and a half seconds: roughly 240,000 times faster than real time. A full training run took about ten minutes, on the simulator’s real physics, with no stand-in at all.
The local copies brought a second gift. They are deterministic: the same starting conditions and the same control movements always produce exactly the same flight. Rerun the first 25 generations of a training run and you get the same scores, generation by generation, and any moment of any flight can be rebuilt exactly from a short list of instructions. Later this became the fix for the biggest problem the project hit.
Retraining the cruise pilot on the real physics also showed what the stand-in had cost. The new champion scored about 9 points higher, but it banked past 45 degrees in more than half its flights, and once rolled past vertical and dived to about 300 feet. Nothing in the score said steep turns were bad, and steep turns reached the heading sooner. The stand-in pilot had never done this only because the fence ended any flight past 42 degrees of bank. So the fence, meant only to protect the model’s ignorance, had also been teaching good manners.
So the manners came back on purpose, as a rule called “normal flying”: bank within 45 degrees, nose between 10 degrees down and 15 up. The normal-flying champion beat the stand-in champion by about 5 points, better in 179 of 191 test situations and worse in none. Part of the stand-in pilot’s skill had gone into flying the stand-in’s mistakes, and nothing at the time had flagged it.
The rule is human judgement written straight into the training. It sets a limit and says nothing about how to fly inside it: the pilot still had to work out for itself how to reach a new heading without banking past 45 degrees. The limit is a shortcut, though. It stands for something the score could have measured instead, the comfort of the people on board. That would have meant measuring what a passenger feels (how far the plane banks, the g-force, how quickly it rolls and pitches), deciding how much of each a passenger would put up with, and scoring it. The pilot would then have found its own limits, perhaps better ones. That is more work to specify and slower to learn, and instructors take the same shortcut when they tell a student to keep turns to 30 degrees of bank.
Why it matters: measure where the time goes before committing to the workaround, and weigh what the workaround might cost.
Stage 5: the take-off pilot learned from nothing in about twenty generations
Next the learner took over the take-off: from standing still, brakes off, full power, get airborne and climb straight out to 500 feet, in a random wind every time, up to 15 knots (about 17 mph) and gusting up to 8 knots more.
The main difficulty is the crosswind, wind blowing across the runway rather than along it. It pushes on the tail fin and swings the nose into the wind, as a weathervane turns. Left alone, the plane rolled off the side of the runway within 12 seconds. The hand-written take-off routine kept the compass heading straight but never looked at the runway’s centre line, so in stronger crosswinds it drifted onto the grass. In 200 test winds it reached 500 feet 152 times.
The take-off pilot saw its instruments, its height and how many metres it was left or right of the centre line, and worked the elevator (nose up or down), the ailerons (roll) and the rudder pedals, which also steer the nose wheel on the ground. The score was mostly for height, full marks from 500 feet, and a little for speed along the way.
The points for speed gave evolution somewhere to start. In the first generation, 145 of a thousand random pilots got off the ground for a moment and none reached 500 feet. Score only height and nearly all of them get zero, leaving evolution nothing to choose between. The speed points said “staying on the runway while you accelerate is already better than running onto the grass”, which gave the worst pilots a direction to improve in.


The learning curve is worth remembering: ten generations of nothing, then a sudden rise to 94% by generation 21. Anyone reviewing the project at generation eight would have seen no progress at all.
The first champion reached 500 feet in 198 of 200 winds it had never practised in, against the routine’s 152. Nobody told it how to handle crosswinds; it met thousands of them in practice. In the strongest, 10 to 15 knots, the routine got airborne 6% of the time and the evolved pilot every time.

Stage 6: the champion took off eight metres off the centre line
Seen from above, the take-offs had a problem. Every one swerved left at the start and rolled down the runway about 8 metres left of the centre line, on a runway 30 metres wide. One came within a metre of the grass.

Nothing in the score mentioned the centre line. At low speed the points are small anyway, so an early swerve cost almost nothing, and once off to one side the pilot held that line.
The fix had two parts, one of each kind. A rule: more than 10 metres off the centre line ends the attempt, like a crash. And points, shrinking with distance from the centre line. The rule says what’s unacceptable; the points say what’s better, since with the rule alone 9 metres off would score as well as dead centre. The next champion kept a median of 2.2 metres from the centre line, never more than 4.1, and reached 500 feet in all 200 winds.
Then a fourth loophole. In the climb, the champion held a rudder pedal 80% of the way down the whole time, so the plane flew slightly sideways through the air, a sideslip. Pilots watch for this on the slip ball, a ball in a curved glass tube that sits in the middle in balanced flight; here it sat one and a half ball-widths off. Nothing in the score mentioned the ball, and the sideslip didn’t seem to cost any climb, so evolution had no reason to fix it. Points for a centred ball did: 0.04 of a width off on average, still 200 out of 200. It cost a little elsewhere (worst 7.1 metres off the centre line instead of 4.1, lift-off a second later). A brain with 99 dials can’t be perfect at everything.
The score was turning out to be the specification
By now the pattern was clear, and it held to the end. Seven times over the project, a champion found a gap between what its score counted and what was meant:
| The champion… | because the score… | fixed with |
|---|---|---|
| slammed the controls end to end | only said where to be | points for smoothness |
| flew right along the edge of the stand-in’s fence | ended the attempt there | (dropped with the stand-in) |
| banked at 55 degrees to turn faster | didn’t forbid it | a rule: “normal flying” |
| took off 8 metres off the centre line | didn’t mention the centre line | a rule and points |
| climbed with the rudder held hard over | didn’t mention the slip ball | points for a centred ball |
| landed by flying hands-off into the runway | only asked for a landing | points for a soft touchdown |
| stood on the brakes at full power | counted stopping, not how | a rule: no power on the runway |
The last two come up in the landing. Every one was the learner doing its job well, and every fix was a line in the score. Why it matters: the score is the only instruction a learning system ever gets, so write it as carefully as a contract.
Stage 7: the landing pilot was slow to start, and learned to flare on its own
The landing pilot’s job: from one to two kilometres out, fly down a gentle 3 degree slope, touch down softly near the start of the runway on the centre line, and stop. Rather than fly a whole circuit before every attempt, the local simulator gained an “air start” that places the plane on the approach, already descending steadily.
Two early experiments set the scene. A plane placed dead on the slope in still air, with nobody touching the controls, landed itself at the aim point, still coming down at 350 feet per minute. That is firmer than any pilot would want, but the simulator only breaks the undercarriage at about 700, so it counted: a score that asked only “did it land?” would be satisfied by doing nothing. In 200 random winds, the same hands-off plane landed none; the wind carried every one onto the grass.
Like a real pilot, the landing pilot needed to see the runway from a distance. Alongside the instruments it got the view out of the window: where the centre line is, which way it’s drifting, and the PAPI, a row of four lights beside the runway showing two white and two red when you’re on the slope, more white when too high, more red when too low. It also controlled the throttle and brakes, and its brain had 195 dials.
The score had three parts out of 100: 30 for the approach, 50 for the touchdown (in the right zone, on the centre line, and soft) and 20 for stopping on the runway. “Soft” closed the hands-off loophole: full marks needed 150 feet per minute or less, and 350 scored about half.
Evolution was slow to get going: little progress for about twenty generations, because a random brain crashes long before it reaches the runway, leaving little to tell good from bad. A hundred generations took 14 minutes. The first champion landed in 194 of 200 unseen winds, and had learned something nobody taught it. In the last few feet it eased the descent from about 300 feet per minute to about 100: the flare, the gentle raising of the nose just above the runway that every student pilot is taught. Its score said only that soft touchdowns score higher.

Stage 8: it took a rule to stop the landing pilot using power on the runway
Then attention turned to what happened after the wheels touched. The throttle went to full and stayed there, with the brakes full on too. Engine and brakes fought each other, and 20 seconds after touchdown the plane was still doing 30 knots. Only 129 of the 194 landings ended stopped on the runway.
The cause was a reflex learned on the approach: speed dropping, add power. In the air that’s right. On the runway the speed always drops, so the same reflex opened the throttle, and the score only asked whether the plane had stopped by the end.
The first fix was points for a short landing roll. The roll halved, from 517 metres to 262, and 193 of 200 landed and stopped; in the strongest crosswinds, 83% against the first champion’s 17%. But the habit survived. After three seconds of braking, at about 45 knots, it opened the throttle fully again and left the brakes to win. The roll was short anyway, so the score barely noticed. A penalty in points only made the habit more expensive; removing it needed a rule.
So, a rule: once landed, more than 20% throttle ends the attempt. The first version was all or nothing, losing every stopping point, and the pilot trained under it learned to land beautifully and never stopped once. A pilot that held off the throttle for ten seconds before breaking the rule scored exactly the same as one that broke it at once, so there was no “warmer, colder” to follow, and evolution gave up on stopping altogether.
Two changes rescued it. A slope instead of a cliff: breaking the rule still ended the attempt, but got partial credit for how much speed it had already shed, so every extra second of restraint scored a little more. And instead of random pilots, evolution started from the previous champion and 999 slightly altered copies, which is called fine-tuning: it could already land and brake, so only one habit had to change.
The new pilot kept the throttle closed from touchdown to the stop, from 61 knots to a standstill in about ten seconds. It stopped on the runway in 197 of 200, the median roll fell to 156 metres, and it never broke the rule. It even touched down more softly, at 50 feet per minute, floating a little longer in the flare now that it could afford the runway.
Why it matters: incentives shape outcomes and policies remove behaviours; a target that nobody can yet reach in full needs partial credit before it teaches anything.
Stage 9: three pilots and a navigator, and the joins broke first
Now there were three specialists: a take-off pilot, a cruise pilot that holds a height and heading it’s given, and a landing pilot, none of which had flown a whole flight. Between them sat a navigator: a few dozen lines of ordinary hand-written code, not learned at all, that know the shape of the circuit, tell the cruise pilot what to fly on each leg and decide when one pilot hands over to the next. Real autopilots are built the same way, as separate modes with simple logic switching between them.
First try, 200 whole flights in random winds: 167 took off, flew the circuit, landed and stopped. The 33 failures showed where the system was weak.
Sixteen were lost turning onto the downwind leg. At each corner the navigator demanded the new direction all at once, a full 90 degree turn, and the cruise pilot banked past the 45 degrees allowed. It had practised big turns, but from awkward states after a wobble, rarely from steady level flight with a sudden jump in its instructions. A real autopilot moves the requested heading round at 3 degrees a second, so the pilot never sees a big jump. Asking the same way lost none of those flights. A learned skill only works on the kind of request it learned on.
With that fixed, every flight reached the handover two kilometres out on final, and then 31 were lost in the landing, nearly all by banking too steeply. The landing pilot had passed its own exam 197 times out of 200, on tidy approaches at 60 to 72 knots. A real circuit handed it a plane doing about 97 knots, coming down at 700 to 1,000 feet per minute with the flaps only just starting to come down. It had never seen anything like it.

Machine learning people call this distribution shift: a system used on situations unlike the ones it trained on. It’s one of the commonest ways learned systems fail in the real world, and from outside it looks exactly like this. Every part passes its own test, and the system fails at the joins.
One blind alley first: slowing the plane before the handover by lowering the flaps on final. The cruise pilot had never flown with flaps, and only 99 of 200 flights stopped on the runway.
The fix that worked used that deterministic simulator. Every handover from a real circuit could be rebuilt exactly, gusts and all, from a script of about 2,860 control instructions. So the project captured the handovers from 400 fresh circuits and fine-tuned the landing pilot with half its practice on those and half on its usual approaches, so it wouldn’t forget the old job. Afterwards 194 of 200 whole flights ended stopped on the runway, up from 169, and it did better on its original exam too (199 of 200 against 197). Practising on harder starts made it a better landing pilot all round.
A few failures remained. Three planes floated over the runway at about 270 feet and kept going for eight kilometres, because in practice an approach that never lands just runs out of time. A real pilot would go around: full power, climb away and try again. Nobody had taught these pilots that.
Why it matters: test each part on what the other parts will actually hand it.
Stage 10: the navigator had been cheating with an exact position
There was a cheat in all of this, built in from the start. The navigator decided where to turn from the plane’s exact position, to the metre, which the local copy of the simulator knows and the real one never tells a pilot. A system that only works because it can see something it won’t see in real use is still only a demo.
So the navigator had to fly on what a real pilot gets: the instruments, the view, and the rough position report, with distances to the nearest half mile and directions to the nearest 45 degrees. Looking at what the report said at each turn in earlier flights, every turn had a cue a pilot is taught: turn onto the second leg when the far end of the runway is a mile behind you, turn onto the base leg when the runway is 45 degrees behind your left wing, and so on.
That base-leg rule, taken literally, was the next blind alley. On its own it lost about a third of the flights, because circuits come out wider or narrower with the wind, and a narrow one turned early and left too short a final. A pilot in a tight circuit would simply fly on a little further first, and so did the fix: also wait until the runway is at least 2.5 miles away. A rule written for people quietly relies on everything else they know.
Between reports, the navigator estimates its position by dead reckoning, the oldest navigation there is: I started here, I’ve flown at this speed on this heading in this wind, so I must be about there. It keeps pulling that estimate back inside whatever the position report, the centre line and the PAPI say, and was never more than about 120 metres out.
Because the cues had come from the same 200 flights, the fair test was 500 new flights in fresh winds. Knowing its exact position, the navigator brought 488 to a stop on the runway. Flying only on what a pilot would know, 489.
Why it matters: build only on information you’ll really have in production.
Stage 11: small tests chose the wrong winners
The last round of work was about smoothness. In gusts, the wings rocked in the final few feet, and about one landing in a hundred ended with a wingtip on the runway. The project tried two ideas, each as a fine-tune of the landing pilot: a new sense (how fast the wings were rolling, since until then it saw the bank angle only as a snapshot rounded to 5 degrees), and new points for keeping the wings level below 60 feet.
The first results made no sense. The new sense made things much worse, and switching it off again didn’t undo the damage.
The cause was the test inside training. Each run picked its champion from its best 50 candidates, judged on just 100 practice landings. On 100 tries, a pilot that crashes 3% of the time looks at least as good as one that crashes 0.5% of the time about 13% of the time. With 50 candidates each getting that roll of the dice, a worse pilot regularly wins. Statisticians call this the winner’s curse: pick the best of many on a small, noisy test and you mostly pick the luckiest.

Judging on 1,000 landings instead, and always keeping the starting pilot as a candidate so a fine-tune can never come back worse, fixed the selection. There was a quieter version of the same trap, too: picking the best of six pilots on the circuits used to compare them flatters the winner. So the final comparison used 2,000 fresh circuits no choice had been made on. On those, rocky landings (wings rocking 15 degrees or more below 60 feet) fell from 49% to 24%, and lost landings from 14 to 5.

The level-wings points halved the rocking. The new sense, which sounded obviously right, didn’t help at all.
Why it matters: a small test flatters whoever got lucky, and the data you chose a winner on flatters the winner.
Stage 12: the final exam was the real simulator
Everything so far ran on copies of the simulator’s physics on one local PC. The exam that counts is the real BigSkySim, running in a browser and flown through its ordinary interface, one plane at a time, with nothing able to see where the plane really is.
On the local copies, the final pilots flew 200 whole circuits in random winds and brought 199 to a stop on the runway. On the real simulator, ten whole flights: ten stopped on the runway, touching down 100 to 200 metres along it, within 2 metres of the centre line, at between 0 and 200 feet per minute.

One weakness remains for every pilot: the rare failures are a wingtip touching the runway in strong gusts with little steady wind. That, and a go-around for planes that float, are the next pieces of work. You can fly the plane yourself at dada.ms/bigskysim/fly/, and the project notebook replays the whole project in a few minutes.
Nearly all the work went into giving the learner an honest world to practise in, saying precisely what good meant, and testing it on what it would really meet.
Where next
- Want to know what each stage teaches an organisation? From the other end takes the lessons one at a time and links each back to where it was learnt.
- Want the same walk-through with the code and the machine learning explained? The walk-through, with code and the ML explained.
- New to flying and want the circuit, the flare and the crosswind properly? Flying a circuit.
- Curious how the simulator itself was built, largely by AI? BigSkySim and Introduction.
Share this article
Comments
Leave a Comment
All comments are moderated and may take a short while to appear.
Loading comments...