In March 2011, a sports scientist named Stafford Murray attended a Formula One preseason ritual in Barcelona. For the 12 Formula One teams, these so-called testing events are an opportunity to unveil new cars, try out new technology, and adapt to new racing regulations before the start of the world championship. For McLaren, one of the world’s premier F1 teams, it was also an opportunity for espionage.

As an accredited member of the McLaren team, Murray had access to the Pit Garages building, which had a view over the starting grid, the paddock, and the entire pit lane. He entered the building in his McLaren uniform and went up three floors to the main lounge. He changed into civilian clothes and stashed away his McLaren uniform, just in case he got caught. He then climbed the fire escape to the roof, furtively set up a camera tripod on the parapet just above the pit lane, and started recording.

This article is adapted from Game Changers: How a Team of Underdogs and Scientists Discovered What it Takes to Win by João Medeiros Little, Brown

Back then, McLaren had two former world champion drivers, Lewis Hamilton and Jenson Button, and was one of the main contenders for the championship. The British team was also renowned for its technological innovation. For, instance, it had been the first to develop a sort of Formula One mission control, a room in England from which race engineers could monitor a Grand Prix anywhere in the world and relay race strategy decisions in real time.

When Murray first visited the McLaren headquarters in Woking, south of London, he remembers being struck by the sophistication of mission control. The room had three banks of desks manned by 13 engineers. Several screens on the front wall showed live footage and telemetry feeds from races and practice sessions. One screen showed a map of the track and the location of the cars. Another graph plotted the cars’ position in a circle, making it easier to visualize distances between cars. The engineers watched the screens in silence, communicating between themselves via a secure chat channel. “Bloody hell,” Murray thought. “How can they make decisions from all this data? It’s too much.”

about the author João Medeiros is features director of Wired UK.

But Murray quickly realized that, in fact, the last thing those engineers wanted was to make decisions, especially during the heat of a Grand Prix. All the data were fed into software running millions of simulations for different variables of the race: timings for pit stops, number of pit stops, different sets of tires, and so on. The output was what McLaren called a decision-support system, a predetermined plan for any possible scenario. And that was crucial to winning races, as evidenced by what happened on May 25, 2008, in the Monaco Grand Prix.

It was raining heavily, and the notoriously difficult Monaco circuit was slippery. The Brazilian Felipe Massa started in pole position, followed on the starting grid by Kimi Raikkonen and Hamilton, then a young McLaren pilot in his second season. For the first five laps, Massa maintained a small lead. On lap six, Hamilton hit a barrier and punctured a rear tire, forcing him to make a pit stop.