Want a quick email when a new article is published? Subscribe
How big is the sky? I built a simulator to find out
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.
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.
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.
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:
- The stick sets the angle of the wing to the oncoming air, called the angle of attack. More angle means more lift, so pulling back makes the aeroplane climb, as long as it has the speed to support it.
- Lift grows with the square of speed, so a slow aeroplane needs a much bigger angle to stay up. Drag comes partly from pushing through the air and partly from making lift at all.
- Too much angle and the wing stalls. Past about 16 degrees the air stops flowing smoothly over the wing, lift falls away and a wing tends to drop. A stall warning sounds a few degrees before.
- The engine takes about a second to answer the throttle, and flaps take several seconds to move. Flaps add lift and drag, for slow, steep approaches.
- The controls interact. Ailerons roll the aeroplane but drag the nose the wrong way, so a tidy turn needs a touch of rudder; get it wrong and the slip ball, a ball in a curved glass tube on the panel, rolls off centre. Gusts bump and roll you.
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.
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:
- Instruments, rounded as a person would read them: airspeed to the knot, height to 10 feet, bank to 5 degrees.
- The view out of the window, in words: the approach lights as “2 white 2 red” (on the right slope) or “4 red” (too low); left or right of the centreline by “slightly”, “moderately” or “well”; the height of the wheels judged by eye; other traffic as “2 o’clock, a mile away, above, crossing right to left”.
- A position report like a radio call: “late downwind, 1.0 NM S of the runway 27 threshold”.
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.)
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.)

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.
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:
- Results are repeatable. Rerunning the first 25 rounds of the take-off training gives identical scores, round by round. A surprising result is a real result.
- Any moment can be rebuilt from a seed and a short list of control changes. That’s how the hardest problem in the project was fixed: a landing pilot that passed its own exam kept failing after real circuits, because they handed it the aeroplane faster and steeper than anything it had practised. Every one of those handovers could be replayed exactly, so they became its training material.
- Comparisons are fair. Two pilots can be tested on exactly the same winds and gusts.
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
- Never flown a circuit? Flying a circuit explains what every aircraft in the simulator is trying to do, with no AI involved.
- Want to see how this kind of learning works? Teaching a car to drive shows the same learning method on a much simpler problem.
- Read how a computer pilot learnt to fly in this sky. Teaching a pilot to fly covers take-off, circuit and landing.
- Interested in how the simulator was built with AI models? Introduction tells that story.
Share this article
Comments
Leave a Comment
All comments are moderated and may take a short while to appear.
Loading comments...