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

How big is the sky? I built a simulator to find out

15 min read • 30 Nov 2026
aimachine learningneuroevolutionaviation

Two small aeroplanes are flying towards each other at about 120 mph each. Neither pilot is talking to anyone, neither has radar, and each is relying on looking out of the window at the right moment. That happens over small airfields every sunny weekend, and it almost always works. I wanted to know how often “almost always” is, so I built a simulator to watch it happen. This piece is about that simulator, BigSkySim: what you see when you open it, how it decides where each aeroplane goes, and how it became the practice ground where a small neural network taught itself to fly.

The short version of how it came to exist: I’d wanted a model of crowded small-aircraft circuits for years, and never had the three months of coding it would have taken to write one. Large language models that write code changed that. The first version came out of a chat window with Google’s Gemini in mid 2025, after a couple of weeks of describing one feature at a time and watching the plane miss the runway. Later versions were written by Anthropic’s Claude models, which got steadily better at it, and the specification became my personal test for each new coding model. The full story is in Introduction. This article is about the thing itself.

BigSkySim with auto-traffic and see-and-avoid on: the circuit at 16 times real time, then a ride along in one Cessna from base to touchdown at 4 times.

The sky is big, and that is the whole safety case

Aviation has a half-joking idea called the big sky theory: aeroplanes rarely hit each other because there’s an enormous amount of sky and not many aeroplanes. Airliners don’t rely on it. They’re kept apart by air traffic controllers, radar, and collision-avoidance systems that talk to each other and tell the pilots which way to turn, climb or descend.

The person flying a four-seater on a summer afternoon mostly relies on something older, called see and avoid. It means exactly what it says: look out of the window, spot the other aeroplane, and get out of its way. At most small airfields nobody is telling anyone where to go.

What makes it interesting is the circuit. It’s a rectangle drawn in the sky around the runway, a bit like a running track with the runway along one straight. You take off, climb straight ahead, turn 90 degrees, level off at 1,000 feet, fly back parallel to the runway, then make two more 90-degree turns that line you up with the runway as you descend to land. Every aeroplane at the airfield flies the same rectangle, in the same direction, at roughly the same height. That’s good for predictability and bad for the big sky theory, because it squeezes everyone into a thin ribbon of sky. Ironically the better the pilot the more likely they are to be in the same space as another good pilot. (For the whole thing from a pilot’s seat, see Flying a circuit.)

So BigSkySim was built to answer two questions. If enough pilots fly the circuit for long enough, flying realistically but not looking out for each other, how long until two of them end up in the same piece of sky? And what changes when they do look?

What the simulator showed was that even with multiple aircraft in a small circuit, the only place a collision ever occurred was on “short final”, the small bit of space right before the touch down zone, where all pilots aim their aircraft with as much precision as they can. As it happens, that’s the one place I once came troublingly close to hitting another aircraft, almost descending on top of it. Turn on see and avoid, put multiple aircraft in the circuit and, thankfully, you can run for many hours without a collision.

Three windows on the same sky

The simulator shows one three-dimensional world in three ways, because no single view tells the whole story.

The top-down scope is the main screen, styled like an air traffic control radar: the runway, taxiway and parking area drawn to scale, range rings, and each aircraft as a small coloured arrowhead with a line ahead of it showing its speed and direction. Colour shows what each one intends to do, a fading trail shows where it’s been, and clicking it shows its type, height, speed, pilot skill and what it’s doing now.

The profile strip underneath is a side-on view, height against distance along the runway. It shows what the top-down view hides: whether two aircraft that appear to overlap are 800 feet apart or at the same height.

The cockpit view puts you in the seat. Select an aircraft and ride along in 3D, or switch to a chase camera behind it; with nothing selected, you get the view from the control tower. The scenery is deliberately simple: fields, hedgerows and woods, two villages joined by a road, hills on the horizon, a windsock, and the approach lights beside the runway that change colour when you’re too high or too low. It shows something the other views can’t, which is how little of the sky a pilot can actually see.

One Cessna, take-off to touchdown at 4 times real time: the scope, the profile strip along the bottom, and the cockpit view. The clock is top left.

Every pilot in the simulator flies a little badly, on purpose

A simulator where every aeroplane flew a perfect rectangle would answer the wrong question, because real pilots don’t. So the most important design decision in BigSkySim is that every aircraft wanders.

Four aircraft types share the sky, modelled on real light aircraft: the Cessna 172 (the high-wing four-seater most people learn on), the Piper PA-28 (a low-wing equivalent), the faster Cirrus SR22 and the slow, light Piper Cub. Each has its own take-off, climb, circuit and approach speeds. A Cub approaches at 45 knots and an SR22 at 80, so a fast aircraft can catch a slow one on the same leg, which is one of the classic ways collisions happen.

Pilot skill is set for each aircraft, shown as one to five stars. A skilled pilot holds height to within about 30 feet and heading to a degree or two. A poor one wanders by up to 150 feet, turns early or late and flies wider circuits. The wandering is a slow drift that builds and gets corrected, the way a real pilot’s attention drifts and comes back, rather than random jitter. Poor pilots on a bad approach sometimes give up and go around: abandon the landing, climb away and fly the circuit again, exactly as an instructor would want.

Wind is set at ground level as a direction, strength and gust range, and gets stronger and swings round as you climb, as real wind does. An aeroplane flies through the air, and the air itself is moving, so a crosswind pushes everything sideways and pilots have to point the nose slightly into it to fly a straight line over the ground, like a swimmer aiming upstream to cross a river. Change the wind enough and the airfield switches to the other end of the runway, because aeroplanes take off and land into the wind.

Traffic can be added one aircraft at a time or automatically at so many per hour: aircraft flying one circuit and landing, repeated touch-and-goes (land, roll briefly, take off again), departures that leave in a random direction, and arrivals that join from several miles out. On the ground they queue on the taxiway and never enter an occupied runway. In the air, by default, they avoid nothing, and a panel counts collisions, near misses and the time to the first collision.

Two switches then make it more realistic. See-and-avoid gives every pilot eyes. Twice a second, each one scans for traffic, with realistic blind spots: a high wing hides the sky above and to the side, a low wing hides the ground below, and nobody sees through the engine or behind the tail. Spotting something in view isn’t guaranteed, and it’s half as likely on the last two legs, when the pilot is concentrating on the runway. A pilot who spots a threat turns, climbs or descends after a moment’s reaction, without coordinating with the other one. ATC opens a control tower on one radio frequency, where every call takes as long as it would to say and only one person can talk at a time. The tower limits how many aircraft can be in the circuit, holding the rest on the ground or outside.

Six aircraft in the circuit. G-FLIO sights G-OOCL at 11 o'clock, 154 m away, and turns right; the event log records each sighting.

Two kinds of physics under one sky

Underneath, BigSkySim runs two different models of flight, for two different jobs.

The traffic follows a plan. Each aircraft knows where it should be (this leg, this height, this speed), and the simulator moves it towards that plan within realistic limits on bank, roll rate, climb rate and acceleration, with the pilot’s wandering added on top. That’s the right tool for a question about where aeroplanes go, and it’s light enough to run thirty of them smoothly in a browser.

The hand-flown aircraft has to respond to controls instead, so it works from forces. In plain terms:

It’s a simplified model, but the two numbers that matter most are tied to each type’s figures: the wing stalls at the type’s stall speed, and the engine climbs it at the type’s climb rate. So a hand-flown Cessna performs like the traffic Cessnas around it.

The simulator is also strict about how a flight can end. You crash if you hit the ground faster than about 700 feet per minute, touch a wingtip down, land nose first or sideways, come down off the runway, run off the paved surface at speed, or overstress the airframe. Those rules matter, because when a machine learns to fly, the crash rules are part of what it learns.

A Cessna in "Fly it yourself" mode, from the chase view: power off and the nose raised until the stall warning sounds, the stall, a wing drops and the nose falls, then the recovery. After a cut, a landing that arrives at 530 feet per minute and bounces.

Command mode gives a program a pilot’s view

The feature that made the machine learning possible is command mode. It lets a program fly an aircraft over the web with simple requests: put an aircraft on the runway, move these controls, tell me what the pilot can see.

The main design choice is what it leaves out. An ordinary flight simulator will happily give a program the aircraft’s exact position, its angles in three dimensions and its speed to two decimal places. Pilots don’t think like that. They think “I’m two miles east of the runway” or “half a mile out at 400 feet doing about 80 knots”. So the interface gives a program what a pilot in the seat would have, and nothing more:

Controls are “set and forget”, as in a real aircraft, and a program can pause the clock and step it forward a quarter of a second at a time, so it can think between moments. Here’s roughly what it sees on the runway before take-off:

airspeed 0 kt, altitude 0 ft, heading 270, bank 0, rpm 650
out of the window: on the centreline, 1,000 m of runway ahead,
  stopped, runway clear
position report: runway, at the runway 27 threshold

That restriction turned out to matter a great deal. It’s easy, when you build a learning system, to let it peek at information it won’t have in real use. An early version of the flying project’s navigation did exactly that, turning at exact positions the real interface never reveals, and it had to be rebuilt to work from the position report alone, as a pilot does. (That story is in Teaching a pilot to fly.)

The example Python client flying one circuit through the command API with --verbose on, at 4 times real time: every request and response on the left, the simulator on the right.

There’s one more pilot on the menu, for fun: with your own key for an AI model service, you can spawn an aircraft flown by a large language model, told what a pilot would see and hear and asked every few seconds what to do. If you try it, with a late 2026 LLM you will probably find that it flies circuits ok but really struggles to land, and if it misses the runway it never recovers and flies off into blue yonder until it runs out of fuel (i.e. it runs out of tokens).

Running the sky without the screen

The learning method used for the pilots, neuroevolution, needs a great deal of practice: a thousand pilots, each flying a dozen take-offs in different winds, for a hundred rounds. That’s 30,000 hours of flying. Through the browser, the simulator ran at about real time, roughly 65 milliseconds a request, so the training would have taken three and a half years.

The first workaround was a stand-in: a simple mathematical model of the aeroplane, learned from fifteen minutes of recorded flying. It worked, mostly, and quietly cost the pilots about five points of skill, because some of what they learned was how to fly the stand-in’s mistakes. (The detail is in The walk-through, with code and the ML explained.)

Six small charts of pitch, vertical speed, bank, altitude, airspeed and heading over 30 seconds, the real plane in black and the stand-in in red.
The same 30 seconds of control movements, flown by the real physics (black) and the stand-in model (red). Altitude drifts apart first.

Measuring where the 65 milliseconds went fixed it. Almost all of it was plumbing: the request travelling from the training program to a small web server, on to the browser tab, and back. The physics took a few millionths of a second.

That mattered because of a rule in the original specification: keep the simulation separate from the drawing. The simulation core is plain JavaScript that never touches the screen, so it runs unchanged in Node, the program that runs JavaScript outside a browser. A small batch mode runs many independent copies of the world in one Node process and steps them all together, and the training program runs one such process on nearly every processor thread of the PC.

The result, from the project notebook: 12,000 take-offs, 300 hours of flying, in about four and a half seconds. That’s a few hundred thousand times real time on one desktop PC, with exactly the same physics and rounded readings as the browser, and no approximation at all. A full training run went from years to about ten minutes.

The real browser version was kept for the final exam. Trained pilots flew whole circuits through the ordinary web interface, one aircraft at a time, with nothing in their code able to see where the plane really was. All ten flights were successful, landing gently on the runway.

The final three pilots and the navigator fly a whole circuit on the real simulator: take-off, circuit, landing, stopped on the runway 1 m off the centreline. 5 times real time.

Determinism turns a simulator into an instrument

BigSkySim is deterministic. The same situation with the same control movements gives exactly the same flight, every time.

That’s harder than it sounds in a simulator full of gusts and wandering pilots. It works because all the randomness comes from a seeded random number generator, a short formula that produces numbers that look random but are completely fixed by a starting number called the seed.

For learning, that helps in three ways:

The original experiment benefits too: the same seed and traffic settings replay a busy afternoon identically, so you can switch see-and-avoid on and compare like with like.

You can fly it yourself

BigSkySim runs in any modern browser at dada.ms/bigskysim/fly/, with nothing to install.

It started as a question about how big the sky really is, and became a world realistic enough to test things out and fast enough to let a machine learn.

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.