Want a quick email when a new article is published? Subscribe

No gradients, 195 weights, ten landings out of ten: the whole neuroevolution run, bugs included

25 min read • 30 Nov 2026
aimachine learningneuroevolutionaviation
Executive summary

Small fixed-topology MLPs, evolved without gradients, learned take-off, cruise and landing for a light aircraft in BigSkySim, and passed ten of ten whole circuits on the real browser-hosted simulator with only a pilot’s observation space. This is the full run with the details a practitioner will want, and every place the setup produced a misleading result.

  • Setup. Three single-hidden-layer tanh MLPs (99, 99 and 195 weights) with hand-normalised inputs and error-style targets; truncation selection, elitism, Gaussian mutation, no crossover, population 1,000. Observations are rounded instruments plus a coarse position report, not a state vector.

  • Why neuroevolution. The plan was to measure the simulator first and choose a method after. Once the physics ran headless in Node (deterministic, about 240,000x real time), population search was fast and the method stayed. No PPO or CMA-ES baseline was run, as the last section says.

  • Model-based detour. A linear one-step dynamics model trained usable policies but cost about five points: the stand-in-trained pilot was never better in 191 test situations than one trained on the real physics.

  • Fitness shaping as a changelog of exploits. Terminations versus reward terms behave differently (a termination costs all future reward, so it weighs more early); an all-or-nothing termination plateaued at about 55 until partial credit and a warm start gave it a gradient; logging behavioural extremes caught a 110 degree bank the score would have crowned.

  • Composition. Hand-written gating between experts, with rate-limited heading commands (16 of 200 losses to none). The landing handover was a distribution shift (60 to 72 kt training starts, about 97 kt in reality), fixed by replaying real handover states (194 of 200).

  • Privileged information. The navigator used true position; rebuilt on the pilot’s report it scored 489 of 500 against 488.

  • Winner’s curse. An apparent five-times regression from a new roll-rate input was selection noise in the project’s own code: with that input zeroed the variant still lost 54 to 12. Selecting on 1,000 trials, with the parent as a candidate, fixed it.

The experiment that said a new input made the landing pilot five times worse was wrong, because of a bug in the project’s own model-selection code. That bug came near the end of a project in which small evolved MLPs learned to take off, fly a circuit and land a light aircraft in my own simulator, then passed a final exam on the real, browser-hosted simulator with nothing but a pilot’s view of the world. This is the whole run in the order it happened, written for people who already know what a fitness function and distribution shift are: architectures, hyperparameters, evaluation protocol, the dynamics model the project built and then threw away, and every place the setup produced a misleading result.

Claude Code wrote the code and ran the experiments, with me directing and checking. The simulator, BigSkySim, is mine too, and the Introduction covers how it came about. Every number below comes from the project notebooks, which you can read rendered at dada.ms/notebooks/learning-to-fly.html, with the full source alongside.

The policies observe only what a pilot would

BigSkySim simulates a small airfield with a Cessna 172-like aircraft. Its HTTP API lets a program spawn an aircraft, set controls (elevator, aileron, rudder, throttle, brake, flaps, trim), step the clock, and read back what a pilot would know:

There are no coordinates. The local copy of the simulator used later for training does expose true along-track and cross-track position (along_m, xtrack_m), and that difference matters further down. The control loop runs at 4 Hz.

BigSkySim's cockpit view at 200 feet on final approach, with the instruments and the view out of the window labelled Runway ahead PAPI approach lights Horizon Airspeed Attitude Altimeter Digital readout Turn coordinator Heading Vertical speed
The cockpit view at 200 feet on final approach to runway 27. The learned pilots never see this picture: they get the same instruments as rounded numbers, and the view out of the window as short descriptions.

Why evolution, and not PPO or behavioural cloning

The method is the one an earlier project used to teach a car to race: fixed-topology networks, truncation selection, Gaussian mutation, no crossover, no gradients. The flying plan said a slow, HTTP-bound simulator might force a different method or a learned stand-in, so measure first. The measurement (below) made population-based search fast, so the method stayed.

Behavioural cloning had nothing to clone. BigSkySim’s built-in pilots move the aircraft by setting its state (“climb at this rate”), not by moving controls, so there was no corpus of expert control inputs. The only control-level demonstrator available was the project’s own scripted take-off, and it reached 500 ft in only 152 of 200 random winds. Cloning it would have taught the pilot to fail in crosswinds.

What evolution offers here is practical. The fitness is one scalar per episode, full of terminations and discontinuities, and evaluation batches naturally: a thousand genomes times twelve situations is 12,000 independent worlds stepped together. No RL baseline was run, so there is no saying what PPO would have done with the same compute.

The whole learning algorithm fits in nine lines

Here is the breeding step, used unchanged by every pilot in the project:

def next_generation(genomes, fitness, rng, keep=0.05, parents=0.20, mutation=0.1):
    n = len(genomes)
    ranked = np.argsort(-fitness)
    n_keep, n_parents = max(1, int(n * keep)), max(1, int(n * parents))
    survivors = genomes[ranked[:n_keep]]
    chosen = ranked[rng.integers(0, n_parents, size=n - n_keep)]
    children = genomes[chosen] + rng.normal(0.0, mutation, size=(n - n_keep, genomes.shape[1]))
    return np.vstack([survivors, children])

And here is a take-off pilot’s forward pass, vectorised over the population (p indexes planes, so a thousand brains think in one einsum):

def think(genomes, inputs):
    w1, b1, w2, b2 = _unpack(genomes)
    hidden = np.tanh(np.einsum("pi,pih->ph", inputs, w1) + b1)
    out = np.tanh(np.einsum("ph,pho->po", hidden, w2) + b2)
    return np.column_stack([50 * out[:, 0], 40 * out[:, 1], 80 * out[:, 2], np.full(len(out), 100.0)])

The settings, which barely changed across the project:

settingvalue
population1,000
elitismtop 5% (50) copied unchanged
parentsuniform draw from the top 20% (200), one parent per child, no crossover
mutationisotropic Gaussian, σ = 0.1, fixed (no adaptation)
initialisationweights ~ N(0, 1)
evaluation per generation12 fresh random situations, the same 12 for every genome (common random numbers)
episode60 s cruise, 90 s take-off, 120 s landing, at 4 Hz
generations60 (cruise), 100 (take-off, landing)
championtop 50 of the final generation, re-scored on 100 held-out situations, argmax

Fresh situations every generation stop memorisation at the cost of a noisy fitness, and sharing them makes the ranking within a generation fair. The champion protocol in the last row looked sensible for most of the project, and caused the selection bug at the end.

Three pilots, three small MLPs

Each pilot is a single-hidden-layer tanh MLP with tanh outputs scaled to control ranges. Inputs are hand-normalised to roughly ±1, and targets come in as errors rather than raw readings, so one brain works for any target.

pilotinputshiddenoutputsweights
cruise (hold height and heading)8: height error, heading error, airspeed, vertical speed, pitch, bank, turn rate, slip ball83: elevator, aileron, throttle99
take-off (to 500 ft)8: centreline offset, heading error, airspeed, pitch, bank, vertical speed, height, turn rate83: elevator, aileron, rudder (throttle fixed at 100%)99
landing (1-2 km out to a stop)13: PAPI, far centreline category, near centreline offset, drift, heading error, airspeed, vertical speed, pitch, bank, slip, height, wheel height by eye, on-ground flag105: elevator, aileron, rudder, throttle, brake195

Anything not currently visible arrives as NaN and goes in as 0 (wheel height as a sentinel of 1.2). Every input comes from what the real API exposes; the pilots never see along_m or xtrack_m. Hidden sizes were carried over from the car (8-8-2, 90 weights), with 10 for the landing pilot because one brain covers approach, flare and ground roll. They were never swept.

A linear dynamics model got the pilots flying, and cost five points

The first measurement said about 65 ms per HTTP request, three requests per tick, about 1.2x real time. One generation of cruise practice is 200 hours of flying. So the first plan was model-based: learn a stand-in for the plane and evolve against it.

The data came from a scripted safety pilot chasing random pitch, bank and throttle targets that changed every 1 to 5 s, with random stick and rudder offsets and guard rails: about 15 minutes of wobbly flying over four flights, three for training and one held out.

The model is ridge regression on standardised inputs. The input is the last four ticks (one second) of seven instrument readings and four controls, plus a bias: 45 numbers. The output is the change in nine quantities over the next tick. That makes 405 weights, fitted in 1.7 ms from 4,989 examples:

self.W = np.linalg.solve(Xs.T @ Xs + ridge * np.eye(n), Xs.T @ Y)

The history is there because of the rounding, and the fitted weights build their own finite differences (for the change in bank: -10.2 on the current bank, positive weights on the three earlier ticks). One-step error says little against a persistence baseline on rounded data. The test that matters is open-loop rollout on the held-out flight, fed only the recorded controls. After 30 s, the median error was 2 kt, 1° pitch, 4° bank, 33 ft and 19° heading. Heading was the weak spot, because it integrates every small turn-rate error. That test flatters the model slightly: the recorded controls came from a safety pilot reacting to the real plane, so they leak information about the true state.

Two measures helped training transfer:

Evolution on the stand-in took about a minute for 60 generations, and both champions flew the real simulator well at their first attempt, from three awkward starts each. Then the costs appeared.

The policy lived on the fence. On one real exam the stand-in predicted a score of 0% (a “crash” 5.2 s in, 0.2° past the pitch limit) where the real plane scored 73%. Evolution had found that the fastest way down to the target height was to dive at the edge of the trusted region: up to 1,050 ft/min against a fence at 1,100, and 103 kt against 105. Any termination boundary becomes a constraint the optimiser presses against.

The model’s errors were being exploited. Once fast local physics existed (next section), the same architecture was trained with the same score, the same smoothness penalty and the same compute on the real dynamics, and compared on 191 held-out situations:

championmeanworstbank > 45°steepest bank
trained on the stand-in77.5%65.2%045°
real physics, no limits86.7%0.5%111 flights110°
real physics, “normal flying” rule82.9%69.9%1 flight50°

The rule-constrained real-physics pilot beat the stand-in pilot by more than a point in 179 of the 191 situations and lost by more than a point in none. Those five points are the cost of training against a model: skill that went into flying the model’s mistakes. The unconstrained run has its own lesson: the best mean score came with the worst flight in the project, a roll past vertical, because the fence had been teaching good manners by accident.

The bank and pitch limits are a hand-written constraint standing in for an objective nobody modelled, passenger comfort: bank, load factor, roll and pitch rates. Scoring comfort directly would have let the policy find its own envelope, at the price of specifying a comfort model and a harder search. The constraint was the pragmatic choice, and it is the one place where “learned from a score alone” needs a footnote: the score carried a piece of hand-written flying judgement, although how to fly within it was still learned.

Profile the whole request path before you model anything

The measurement that killed the stand-in was a breakdown of the 65 ms. Almost all of it was transport: Python to the Node server, the server relaying to the browser tab, the tab answering. The physics took microseconds.

BigSkySim’s simulation core is plain JavaScript with no DOM dependency, so Node can run it directly. A small batch.js hosts many independent worlds in one process (one aircraft each, so they never interact), speaks JSON lines over stdin/stdout, and moves controls and readings as base64-packed float32 arrays, one message per tick for all worlds. A Python Pool runs one Node process per CPU thread, leaving two spare: 30 processes on a 32-thread desktop.

rng = np.random.default_rng(1)
genomes = tp.random_genomes(1000, rng)
starts = tp.make_starts(12, rng)
fitness = tp.trial(genomes, pool, starts)
# 12,000 take-offs, 300 hours of flying, in 4.5 s (240,843x real time)

A 100-generation take-off run takes about ten minutes, on the real dynamics with no approximation.

Determinism came built in, and it turned out to be the most valuable property of the environment. The same seed plus the same sequence of control changes gives a bit-identical trajectory. Rerunning the first 25 generations of the take-off training reproduces the saved best and median fitness exactly, every generation. And any state can be rebuilt from {seed, script}, where the script is a list of control changes and time steps. Situations are easy to ship to workers, and, later, deployment states become replayable training starts.

Fitness shaping is a changelog of exploits

Every term in every score was added because a champion found a way to score well that nobody intended. Here is the final take-off score per tick:

def points(r, centreline=True, ball=True):
    c = lambda name: r[:, COL[name]]
    speed = np.clip(np.nan_to_num(c("airspeed_kt")) / 55, 0, 1)
    height = np.clip(np.nan_to_num(c("altitude_ft")) / TARGET_FT, 0, 1)
    hdg_ok = np.clip(1 - np.abs(wrap(RUNWAY_HDG - np.nan_to_num(c("heading_deg")))) / 30, 0, 1)
    p = hdg_ok * (0.3 * speed + 0.7 * height)
    if centreline:
        on_ground = c("on_ground") == 1
        line_ok = np.clip(1 - np.abs(np.nan_to_num(c("xtrack_m"))) / 15, 0, 1)
        p = np.where(on_ground, p * line_ok, p)
    if ball:
        in_air = c("on_ground") == 0
        ball_ok = np.clip(1 - np.abs(np.nan_to_num(c("slip_ball"))) / 3, 0, 1)
        p = np.where(in_air, p * ball_ok, p)
    return p

The 0.3 for speed exists to create selection pressure. In generation 0, 145 of 12,000 random take-offs got airborne and none reached 500 ft, so a height-only score would have been almost flat. Speed points rank “accelerated down the runway” above “ran onto the grass”. Note that the score uses the privileged xtrack_m, which is fine: the critic can see things the policy can’t.

Chart: take-offs completed by the best pilot of each generation, in 200 winds it never practised in. Zero for the first ten generations, then a rapid rise to 94% by generation 21 and close to 100% after that.
Take-offs completed by each generation's best pilot, in 200 winds it never practised in.

The full history, across all three pilots:

the champion…because the score…fix
banged the controls end to end each tickonly said where to bepenalty on control movement (smooth = 0.5)
lived at the stand-in’s fenceended the trial therewent away with the stand-in
banked 55° to 110° to turn fasterdidn’t forbid ittermination: bank within ±45°, pitch within -10° to +15°
rolled 8.6 m (median) off the centrelineignored the centrelinetermination at 10 m, plus points falling off with distance
climbed with the rudder pinned, slip ball outignored the ballpoints for a centred ball
landed hands-off at 350 ft/minonly asked for a landingtouchdown points full at 150 ft/min, zero at 600
held full brake and full throttle on the runwaycounted stopping, not howpoints for a short roll, then a termination on throttle
Animation: one take-off, in one wind, seen from above with sideways distances stretched. The first champion swings about 7 metres off the centreline and stays there; the final champion stays within about a metre and a half of it.
One take-off, in one wind, from above with sideways distances stretched: the first champion against the final one.

The smoothness fix had no downside: the jerky cruise champion scored 67.4% with 16.9% mean control movement per tick, the smooth one 68.9% with 2.5%. Bang-bang control had simply gone unpenalised, and brought no benefit. The ball fix cost a little: the ball centred (0.04 widths out in the climb, against 1.5) but the worst ground deviation went from 4.1 m to 7.1 m. Capacity is finite at 99 weights.

The landing score is shaped differently, because most of what matters happens at one instant: 30 points for the approach (a per-tick product of slope, line, speed and heading terms, scaled by progress), 50 for the touchdown (zone times line times softness), 20 for the stop.

Terminations remove habits that points leave alone

The scores used two mechanisms throughout, and they behave differently. Points grade a moment. Terminations (crash, or leaving a limit) end the episode, and because fitness accumulates only while alive, a termination’s effective penalty is all the points the rest of the episode would have added. That makes it larger early and smaller late.

Points for a short landing roll halved the median roll from 517 m to 262 m and left the underlying reflex untouched. The pilot had learned “airspeed falling, add power” on the approach, right in the air and absurd on the runway, so a few seconds into each roll it opened the throttle fully and let the brakes win. Only a termination (more than 20% throttle once landed) removed the habit.

A termination needs a gradient across it

The first version of that rule zeroed all 20 stop points on a breach. Trained from random weights, it learned to land well and never stopped once: the training score plateaued at about 55, approach and touchdown points only. Two things made the landscape flat. A brain that opened the throttle after 10 s scored the same as one that opened it at once, and the approach is flown at about 35% throttle, so any brain that didn’t close it before touchdown broke the rule on its first tick on the ground. Nothing separated near-misses from immediate failures.

The fix had two parts. Partial credit on a breach, up to half the stop points, in proportion to how much touchdown speed had already gone:

def slowed(speed, td_speed):
    """How much of its touchdown speed a plane had lost, 0..1 (for the throttle rule)."""
    with np.errstate(invalid="ignore", divide="ignore"):
        return np.nan_to_num(np.clip(1 - np.abs(speed) / np.abs(td_speed), 0, 1))

And a warm start: generation 0 is the previous champion plus 999 copies mutated with the usual σ = 0.1.

The fine-tune started at about 50 (the old champion losing its stop points to the new rule) and passed 70 within 20 generations. On the 200-approach exam it stopped on 197, never breached the rule, and cut the median roll from 262 m to 156 m. It also touched down further in (159 m against 107) and softer (50 ft/min against 100): with a short roll it had room to float longer in the flare. A slope gives the search a direction, and a warm start puts it somewhere the slope exists.

Warm starts became the default tool for everything after that, including adding an input. To give the landing pilot a fourteenth sense, widen inserts zero weights for it, so the widened network is functionally identical to the original and evolution can start using the new input from there:

def widen(genome):
    genome = np.asarray(genome, float)
    w1 = n_inputs(genome) * N_HIDDEN
    return np.concatenate([genome[..., :w1], np.zeros(genome.shape[:-1] + (N_HIDDEN,)), genome[..., w1:]], axis=-1)

Log the behaviours you’d be embarrassed by

The 110° bank only came to light because the exam logged steepest bank and lowest pitch alongside the score. After that every exam logged extremes, breaches, control movement and centreline distance. The extra columns are how you find out whether the optimiser was doing the job you intended.

The same logs showed the upside. Nobody specified crosswind technique, yet in 10 to 15 kt crosswinds the scripted take-off reached 500 ft 6% of the time and the evolved pilot 100%. Nobody specified a flare, yet the pilot learned to ease about 300 ft/min to about 50 in the last few feet.

Chart: take-offs completed in 200 random winds, by strength of crosswind. The hand-written script completes 94%, 56% and 6% as the crosswind rises; the learned pilot completes 100% in every band.
Take-offs completed in 200 random winds, by strength of crosswind: the hand-written script against the learned pilot.
Chart: how fast the plane comes down by height above the runway. Hands-off it descends at a steady 350 feet per minute all the way down; the learned pilot eases off to about 50 feet per minute at touchdown.
The flare: descent rate by height above the runway, hands-off against the learned landing pilot.

Compose experts with a hand-written gating policy, and rate-limit what it asks for

The whole flight uses the three networks unchanged, plus a navigator: a few dozen lines of ordinary code that know the shape of a left-hand circuit, give the cruise pilot a heading and height per leg, and switch pilots at 500 ft and at the landing handover about 2 km out on final. Mode logic around learned controllers is how most real autopilots are structured too.

Two input-space tricks let the cruise pilot fly legs it never trained on: to hold 600 ft on base, the navigator shows it an altimeter reading 400 ft too high, and on final it asks for a heading that puts the ground track on the centreline, crabbed into the wind.

The first composed run stopped 167 of 200 flights on the runway. Sixteen were lost turning onto downwind: the navigator stepped the commanded heading by 90° in one tick, and the cruise pilot rolled past 45° and terminated. It had trained on heading errors up to 120°, but appearing after a random wobble, not as a step from steady flight at 1,000 ft and 90 kt. Rate-limiting the command (heading at 3°/s, a standard “rate one” turn, and height at 500 ft/min) removed every failure before the handover. The input distribution of a learned controller includes the shape of the commands you send it as well as the state of the world.

The handover was a distribution shift, and determinism fixed it

With the turns fixed, all 200 flights reached the handover and 169 stopped on the runway. All 31 losses were in the landing, 30 of them by banking past 30°. The landing pilot had passed its own held-out exam 197 times in 200. A comparison of the start-state distributions made the cause plain:

landing pilot trained oncircuit handed it
airspeed60 to 72 ktabout 97 kt
vertical speedabout -350 ft/min (3° at 65 kt)mostly -700 to -1,000 ft/min, power at idle
configurationflaps down, trimmed for approachflaps only starting to come down

Classic compounding error at a module boundary: the upstream component put the downstream one well outside its training support, and the landing pilot’s own exam couldn’t show it, because it came from the same generator as the training data.

Chart: airspeed when the landing pilot takes over. What it practised on sits between 60 and 72 knots; what a real circuit hands it sits around 97 knots, with no overlap at all.
Airspeed when the landing pilot takes over: what it practised on, against what a real circuit hands it.

Slowing down before the handover by lowering flap on final made it worse (99 of 200 stopped), because the cruise pilot had never flown with flap. It only moved the shift onto another network.

The fix that worked reused determinism. Because the simulator replays exactly, handover_start rebuilds any handover as a start: the flight’s seed and take-off script, then every control change the circuit made, then the approach set-up. The scripts run to about 2,860 steps, and the rebuilt handover states matched the recorded ones with a maximum difference of 0.0 on every reading. The project flew 400 fresh circuits in winds disjoint from the exam, harvested their handovers, and fine-tuned the landing pilot (warm start, as above) on a 50/50 mix of real handovers and the original approach generator, so it wouldn’t forget the old task. 100 generations took 24 minutes.

Whole flights went from 169 to 194 of 200. On the landing pilot’s original exam it improved too: 200 of 200 landed and 199 stopped, against 198 and 197. It’s DAgger-flavoured in spirit, though with no expert relabelling: the deployment state distribution becomes the training distribution, and the replay mechanism makes collecting it nearly effortless.

This figure is interactive and needs JavaScript. The text around it describes what it shows.

Three whole flights from above: the calmest crosswind of 200, and the strongest from each side. The trail shows who is flying: take-off pilot, cruise pilot, landing pilot. Use the slider or press play.

Strip the privileged state before the real exam does it for you

Everything so far had one leak. The navigator turned on along_m and xtrack_m, true position to the metre, which only the local simulator exposes. The policies used only real observations, but the system around them relied on data the real API doesn’t provide. Logging the position report at the moments the privileged navigator turned showed a consistent cue for each turn, and they are the cues pilots are taught:

def report_turns(leg, r):
    leg = leg.copy()
    leg[(leg == UPWIND) & (r[:, COL["far_nm"]] >= 1.0)] = CROSSWIND
    leg[(leg == CROSSWIND) & (r[:, COL["thr_is_deg"]] == 225)] = DOWNWIND
    behind = np.isin(r[:, COL["thr_clock"]], (5, 6, 7))
    leg[(leg == DOWNWIND) & behind & (r[:, COL["thr_nm"]] >= BASE_NM)] = BASE
    leg[(leg == BASE) & (np.abs(r[:, COL["line_amount"]]) <= 2)] = FINAL   # NaN (not in view) compares False
    return leg

The textbook base cue (“threshold 45° behind the left wing”) alone stopped only 127 of 200, because circuits come out narrower or wider with the wind, and a narrow one turned base too early to leave a usable final. Adding “and at least 2.5 NM out” (BASE_NM) brought it to 195. A rule written for humans quietly depends on everything else the human knows.

For the remaining uses of position (steering onto the centreline, triggering the handover), the navigator dead-reckons from airspeed, heading and the windsock’s wind, and projects the estimate into whatever the observations allow: the ring segment the position report defines (±0.25 NM, ±22.5° from each runway end), the band the visible centreline implies, and the PAPI’s slope band. On one flight it was never more than about 120 m off, and tight once the runway was in view.

BASE_NM and the cues were chosen by looking at the 200 exam circuits, so the comparison ran on 500 new ones:

navigatorstopped on the runway
true position, original turn points488 / 500
dead reckoning from instruments, windsock, PAPI477 / 500
plus correction from the position report493 / 500
turns from the report, plus that estimate489 / 500

Flying on the observations production will actually provide cost nothing measurable. About six failures in every row happen in the take-off or climb-out, before the navigator matters.

The winner’s curse was in the project’s own selection code

The last experiment targeted wing rocking in gusts near the ground, where about one landing in a hundred ended with a wingtip on the runway. The experiment fine-tuned three variants of the landing pilot from the circuit-trained one: a new input (roll rate, via widen), new points for level wings below about 55 ft, and both.

The first results made no sense. On 2,000 whole flights, the roll-rate variant lost 64 in the landing against 12 before. Zeroing the new input’s weights still left it losing 54, which pointed at the selection step.

Each run picked its champion as the argmax of its final top 50 on 100 held-out approaches. At failure rates of a few percent, 100 Bernoulli trials can’t rank candidates:

rng = np.random.default_rng(0)
bad, good = rng.binomial(100, 0.03, 100_000), rng.binomial(100, 0.005, 100_000)
print(f"the 3% pilot looks as good or better {np.mean(bad <= good):.0%} of the time")
# 13%. On 1,000 tries: 0.0%
Chart: the chance that a pilot who crashes 3% of the time looks at least as good as one who crashes 0.5% of the time, by number of test flights. About 75% on 10 flights, 13% on 100, and under 1 in 100,000 on 1,000.
How often a pilot that crashes 3% of the time looks at least as good as one that crashes 0.5% of the time, by number of test flights.

With 50 candidates, a few bad ones are bound to look good, and the argmax favours them. With a warm start, every candidate is close to a known-good brain, so selection noise was the main way a fine-tune could come back worse than it started. Two changes fixed it:

    top = genomes[np.argsort(-fitness)[:50]]
    if start_from is not None:
        top = np.vstack([top, start_from])
    exam_scores = trial(top, pool, held_out, **rules)
    return top[np.argmax(exam_scores)], np.array(history)

Judge on 1,000 held-out approaches (half real handovers, half the generator), and keep the starting brain in the candidate set, so a fine-tune is at worst a no-op.

That left a second-order version of the same problem. The project had now compared six brains on the same 2,000 circuits, so picking the winner on them flatters it too. The finalists ran once more on 2,000 circuits that played no part in any choice:

landing pilotcircuits used to choose: lost / rockyfresh circuits: lost / rocky
before (circuit-trained)12 / 47%14 / 49%
level-wing points, round 15 / 34%11 / 32%
level-wing points, round 210 / 24%5 / 24%
roll-rate input and level points, round 25 / 53%8 / 52%

“Lost” is out of 2,000 landings, and “rocky” means banked 15° or more below 60 ft. The level-wing points halved the rocking on both sets. The roll-rate input didn’t help with or without them: with this much search, evolution found no use for it.

Chart: landings where the wings rocked 15 degrees or more in the last 60 feet, out of 2,000 fresh circuits: 49% before, 24% after adding points for level wings.
Rocky landings, out of 2,000 fresh circuits, before and after adding points for level wings.

The real simulator is the test set nobody tuned on

The final exam ran the same pilots and navigator against the real BigSkySim, served by Node and running in a browser tab, through its ordinary HTTP API. One aircraft at a time, the clock paused and stepped 0.25 s per tick, nothing in the loop able to see true position, and the touchdown judged only from what the API reports (runway remaining, centreline offset).

Ten whole flights with the final pilots, and ten stopped on the runway: touchdown 100 to 200 m past the threshold, within 2 m of the centreline, at 0 to 200 ft/min. Six earlier real flights had also all stopped, one of them touching down harder, at 450 ft/min.

Ten circuit tracks drawn from the navigator's own estimate of position, take-off in orange, circuit in blue, landing in purple.
The ten real-simulator flights as the navigator believed them: orange take-off, blue circuit, purple landing. The steps in the lines are the navigator correcting itself from a position report.

Ten flights is only a sanity check. The statistics come from the local simulator, which runs the same core. The deployed one differs in its gusts (they depend on how long it has been running), which is why the real run is worth having.

What a reviewer should question

The three habits that saved the most time were the dull ones: profile the whole request path before building around it, make the environment deterministic so any state can be replayed, and size every selection step for the failure rate you care about. And make the last comparison on data no decision has touched.

Where next

Share this article

Email LinkedIn X

Comments

Loading comments...

Leave a Comment

All comments are moderated and may take a short while to appear.