Saturday, January 23, 2016

Formula 1 strategy and Nash equilibrium

At first sight, Formula 1 race strategy seems to be an ideal domain for the application of game-theory. There are a collection of non-cooperative agents, each seeking to anticipate the decisions of their competitors, and choose a strategy which maximizes their pay-off. The immediate pay-off at each Grand Prix is championship points.

However, there's a subtlety of game-theory which needs to be appreciated before its most famous concept, that of Nash equilibrium, can be applied.

Let's begin with the game-theory. John Nash demonstrated that a non-cooperative n-player game, in which each player has a finite set of possible strategies, must have at least one point of equilibrium.

This equilibrium is a state in which each player's choice of strategy cannot be improved, given every other player's choice of strategy. In game-theoretic language, each player's pay-off is maximized, given every other player's choice of strategy.

In formal terms, there must be an n-tuple of strategies σ = (σ1,...,σn) in which the pay-off for each player, vi, is maximized:

vi(σ) = max vi1,...,σn),   for i = 1,...,n

where the maximum is taken over all the player-i strategies, σi.

The set of strategies adopted by the teams at each Grand Prix should possess at least one such state of Nash equilibrium, (irrespective of whether the competitors are capable of finding that optimal state). However, it's possible to define a simple and realistic scenario which, at first sight, undermines Nash equilibrium.

Suppose that a Ferrari is ahead of a Mercedes in the early laps of a race, but the Mercedes has a pace advantage. Suppose, however, that the pace delta between the cars is less than the minimum threshold for a non-zero probability of the Mercedes overtaking the Ferrari.

Now, for the sake of argument, suppose that due to aerodynamic interference from the wake of the car ahead, the Mercedes cannot follow closer than 1.5 seconds behind the Ferrari, and suppose that tyre degradation is sufficiently low that new tyres provide a 1-lap undercut worth less than 1 second. Even if Mercedes pit first, Ferrari can respond the next lap, and (assuming an error-free stop) will emerge still in the lead.

Clearly, if Mercedes are to beat Ferrari they will need to use a different strategy. Let's make this interesting by postulating that whilst a 1-stop strategy is the fastest 'deterministic' race, a 2-stop strategy is only a second or so slower.

Now, if the Mercedes switches to a 2-stop strategy, it will be out of sync with the Ferrari, will be able to circulate at its true pace, and will be able to beat the Ferrari if the Scuderia remain on a 1-stop. (For the sake of argument, we assume that there are traffic-free gaps into which the Ferrari can pit, without being delayed by other competitors).

However, if Ferrari anticipates this, and plan a 2-stop strategy, it will still win the race. If both cars are on the 2-stop strategy, Mercedes cannot utilise its superior pace.

However, however, if Mercedes anticipates that, it can win the race by sticking to the original 1-stop strategy...which Ferrari, again, can head off by sticking with the 1-stop. And so on, ad infinitum.

Clearly, there is no Nash equilibrium here. Each possible combination of strategies is such that at least one competitor can improve their pay-off by changing strategy, if the other competitor's strategy remains fixed. This structure is depicted graphically above. Each of the four cells represents a possible combination of 1-stop and 2-stop strategies. The pair of numbers in each cell represents the pay-off, in championship points, for Ferrari and Mercedes, respectively.

The coloured arrows indicate how one competitor can always improve their pay-off. For example, the top-left cell represents the case in which Ferrari and Mercedes both pursue a 1-stop strategy. The blue arrow reaching across to the top-right cell indicates that Mercedes can improve their pay-off by switching to a 2-stop strategy, if Ferrari remain wedded to the 1-stop. However, the downward red arrow in the top-right cell indicates that Ferrari can improve their pay-off by switching to a 2-stop if Mercedes remain committed to a 2-stop.

The problem here is that the strategies considered are termed 'pure' strategies in game-theoretic terms. Nash's theorem pertains not to pure strategies, but to probabilistic combinations of pure strategies, called 'mixed' strategies. If there are two possible pure strategies, A and B, a mixed strategy is one in which, for example, you resolve to follow strategy-A 30% of the time, and strategy-B 70% of the time. You must also use a random number generator to enforce the probabilistic split.

A mixed strategy, then, is a rather abstract thing, and not necessarily something which represents human strategic thinking. People often have contingency plans, alternative strategies that they will adopt if certain events occur, but they rarely frame their original strategy in terms of probabilistic mixtures.

In terms of the Formula 1 strategy scenario defined above, there is a state of Nash equilibrium: if Ferrari and Mercedes both adopt the mixed strategy of pursuing a 1-stop with 50% probability and a 2-stop with 50% probability, then neither competitor has a mixed strategy which offers an improvement in terms of their average pay-off.

However, Formula 1 teams are unlikely to adopt such a coin-tossing approach to strategy, so a Grand Prix potentially offers an interesting case study of a non-cooperative n-player game far from Nash equilibrium.

Sunday, January 17, 2016

Pantheism and religion

Sandwiched between articles on human flatulence and the hazard posed by pigeon-droppings to electricity pylons, the 2015 Christmas/New Year edition of New Scientist contained an article by theologian Mary-Jane Rubenstein. The main thrust of the article attempts to draw parallels between some ancient philosophies and modern multiverse proposals in cosmology.

Specifically, Mary-Jane argues that the atomists were proposing a type of spatial multiverse, whilst the stoics were advocating a temporal one. Although it's stretching the point somewhat, the majority of the article is quite interesting.

However, as we reach the final paragraphs, Mary-Jane can be found citing a type of pantheism advocated by Nicholas of Cusa:

"Traditionally, Christian doctrine has taught that humans are made in the image of God. Cusa disrupted this idea by saying that the universe, not man, bears the image of God. And if humans are not particularly godlike, then God is not particularly humanoid. God doesn't look like a patriarch in the sky: he looks like the universe."

Now, pantheism is a rather strange notion. It's as if one has responded to the question 'Do unicorns exist as well as horses?' by replying 'Yes, they do, but they don't have horns, and can be identified with, or considered to resemble horses.'

But that's not the main problem with the article. The main problem comes in the final paragraph, where Mary-Jane concludes that because pantheisms "change what it means to be God...we don't need to chose between God and the multiverse...Is it possible that modern cosmology is asking us, not to abandon religion, but to think differently about what it is that gives life, what it is that's sacred, where it is we come from - and where we'll go?"

Whoa! Hold on a cotton-picking minute there, Mary-Jane. Perhaps there were some readers whose blood-flow was devoted more towards the stomach than the brain over the Christmas period, and under such conditions it might be possible to miss the sleight-of-hand here. Under most other conditions it's not too difficult to spot the sudden jump from the abstract metaphysical concept of pantheism to the introduction of religion.

The term 'religion' doesn't just entail a bundle of metaphysical concepts: it means a human institution; it means scripture, liturgy, a priesthood, a dogmatic moral code, the indoctrination of children, and the amplification of tribal behaviour.

That's rather more than pantheism suggests, I fear, and certainly not the answer to any of the questions posed by multiverse cosmology.

Newspaper journalists and the Met Office

It's been a relatively mild winter in Britain this year, and this has deprived newspaper journalists of their normal opportunity for hysterical exaggeration and over-reaction to wintry weather. However, temperatures have fallen this weekend, and, taking a cue from the Met Office's ludicrously patronising weather-warning system, the hyperbole has been flowing:

"Snow and ice sweep across Britain," yells The Guardian, claiming that "A 100-mile wide corridor of snow stretched from north-west Scotland to south-east England overnight." 

"Treacherous driving conditions as snow and ice alert covers more of Britain," shouts The Telegraph headline, "Drivers warned of hazardous conditions after mercury falls to -10C amid 100-mile snow corridor."

The Telegraph article, however, begins to equivocate its message after no more than a couple of sentences, alluding to "many Britons waking up to frosty conditions on Sunday."

Frosty conditions, eh? There's quite a difference between waking up to snowy conditions and waking up to frosty conditions. For a start, whilst people sometimes have to dig their car out of a snow-drift, it's somewhat rarer to dig your car out of a frost-drift.

Scanning further down the page, we find that the Met Office had previously said 'snow had been "expected to fall along a relatively narrow corridor, perhaps only 100 miles wide" and forecaster Sophie Yeomans said "that band of sleet and snow is staying over the country, but it is dying out".'

This reveals that the newspaper journalists have misunderstood the dimensions of the purported 'snow corridor'. The Met Office are using 100 miles as a diminutive term, not as an expansive term. 100 miles is quite a short distance in meteorological terms. The purported 'corridor of snow' is "only 100 miles wide." What's more, it is the width of the corridor which spans 100 miles, not its length.

If we actually scrutinise the shape of the snow corridor in the graphic supplied by the Met Office (below), we can see that its length is much greater than its width. It is much longer than 100 miles. If the journalists were seeking an impressive-sounding length scale to exaggerate the severity of the wintry conditions, they should have quoted its length, not its width. But that would have required additional effort. The Met Office have quoted 100 miles, and it's a nice round number, so that's the length-scale the newspapers are going to quote.

But just look at the length of that snow corridor. That's a lot of snow isn't it? We can tell it's a region of snowfall because there's a snowflake icon, and a sliding-car icon adjoined to the top of the yellow band.

Oh, but hold on, there's also a legend down below which tells us what the yellow shading actually means. It turns out that yellow means 'Be Aware'. Which is a useful piece of advice. Thanks for that. But what exactly does 'Be Aware' mean in this context?

Following the links on the Met Office website to their Weather Warning page, we discover the following definition:

Yellow: Be aware. Severe weather is possible over the next few days and could affect you. Yellow means that you should plan ahead thinking about possible travel delays, or the disruption of your day to day activities. The Met Office is monitoring the developing weather situation and Yellow means keep an eye on the latest forecast and be aware that the weather may change or worsen, leading to disruption of your plans in the next few days. 

So that's not a corridor of predicted snowfall; that's merely a corridor in which the Met Office recommend people should "plan ahead" and "keep an eye on the latest forecast."

In effect, then, The Met Office is saying the following: 'Things are possible, and they may affect you! Don't treat us as an occasional source of information; be dependent upon us; raise your anxiety levels when we tell you to. We are monitoring the developing situation; you need us.'

Hence, whilst The Telegraph article reports that "Parts of the North West were hit by snow overnight, ranging from a light dusting in Manchester to heavier snowfalls on the Pennines and rural Cheshire and Cumbria," we're subsequently informed "that band of sleet and snow is staying over the country, but it is dying out...There is a lot of rain in that but in parts of London there will be sleet falling as well."

So in other words, the story should really be:

'A band of precipitation will cause localised snowfall in the North-West, with sleet turning to rain in other regions.' 

But remember, keep watching and reading those weather forecasts!

Monday, January 11, 2016

Lotus or Shadow?

The February 2016 edition of RaceTech magazine has an interesting article on wind-tunnels by their F1 insider, 'Expert Witness'. However, there may be an error in the caption to one of the photos which accompanies the article, (below).

The caption claims that the photo depicts a Lotus wind-tunnel test from 1972. Which would be surprising, because one would expect a 1972 car to sport a much taller airbox. In fact, not only is the airbox wrong, but the nose doesn't look like a Lotus nose at all.

If I were pressed to identify the model, I would suggest that it is actually a version of Tony Southgate's Shadow DN8 (below), probably from 1976-1977.

Certainly, if it does transpire to be a Lotus wind-tunnel test from 1972, it opens a whole new time-travelling window on F1 espionage in the 1970s...

Saturday, January 09, 2016

The tortuosity of modern F1 circuits

In recent decades, Formula 1 circuits have tended to lose their character; flowing tracks, sculpted by the contours of the land, have been supplanted by clinical autodromes designed to maximise sponsorship exposure and minimise running costs. 

Perhaps surprisingly, it is soil physics which offers a means of quantifying this loss of flow. Specifically, we need to adapt a quantity called the tortuosity factor, which is used to analyse the permeability of soil to the flow of water.

As Daniel Hillel explains, "The actual length of the path traversed by an average parcel of liquid is greater than the soil column length L, owing to the labyrinthine, or tortuous, nature of the pore passages...Tortuosity can be defined as the average ratio of the actual roundabout path to the apparent, or straight, flow path," (p177, Fundamentals of Soil Physics, Academic Press, 1980).

So, let's calculate and compare the tortuosity of a corner complex on a traditional F1 circuit to that on a modern Hermann Tilke designed circuit. In particular, let's compare the Becketts sequence at Silverstone with the Turn 1/2/3 complex at Shanghai.

Courtesy of Google Maps, the distance between the entry and exit of the Becketts sequence, as the crow flies, is about 517m. The distance along the path of the track is about 600m. Hence the tortuosity of Becketts is T = 600/517 = 1.2

The distance between the entry to Turn 1, and Turn 4 at Shanghai, as the crow flies, is about 145m. The distance along the path of the track is about 650m. Hence, the tortuosity of the opening corner sequence at Shanghai is T = 650/145 = 4.5

So, the tortuosity factor of a modern F1 corner complex can be as much as 3.75 times greater than that of a more traditional sequence. Which is a way of placing a number on how much F1 has lost its soul.