The Robotic Oxen of Zhuge Liang

P.W. Singer’s recent lecture on our daily reality of robotic warfare serves well as a witty and thoughtful overview of the topic. The lecture is very worthwhile, and draws from his book, but if you don’t have an hour right now you can get a taste from this earlier essay in Foreign Policy.

It brings to mind a favourite episode from Romance of the Three Kingdoms (三国演义). This is excerpted from Chapter 102 of the Brewitt-Taylor translation available here. Since the estimable Brewitt-Taylor died in 1938 and I own a dead tree copy of the same with the Wade-Giles names, some kind soul must have since updated the Chinese names to pinyin for this edition.

One day Yang Yi went to Zhuge Liang and said, “The stores of grain are all at Saber Pass, and the labor of transport is very heavy. What can be done?”
Zhuge Liang replied, smiling, “I have had a scheme ready for a long time. The timber that I collected and bought in the Lands of Rivers was for the construction of wooden transport animals to convey grain. It will be very advantageous, as they will require neither food nor water and they can keep on the move day and night without resting.”

All those within hearing said, “From old days till now no one has ever heard of such a device. What excellent plan have you, O Minister, to make such marvelous creatures?”

“They are being made now after my plans, but they are not yet ready. Here I have the sketches for these mechanical oxen and horses, with all their dimensions written out in full. You may see the details.”

The opposing general, Sima Yi (司马懿), finds out about the oxen, and his army captures some.

When Sima Yi saw them, he had to confess they were very life-like. But what pleased him most was that he could imitate them now that he had models.
“If Zhuge Liang can use this sort of thing, it would be strange if I could not,” said he.
He called to him many clever craftspeople and made them then and there take the machines to pieces and make some exactly like them. In less than half a month, they had completed a couple of thousand after Zhuge Liang’s models, and the new mechanical animals could move. Then Sima Yi placed Cen Wei, General Who Guards the Frontiers, in charge of this new means of transport, and the “animals” began to ply between the camp and Xizhou. The Wei soldiers were filled with joy.
Gao Xiang returned to camp and reported the loss of a few of his wooden oxen and horses.
“I wished him to capture some of them,” said Zhuge Liang, much pleased. “I am just laying out these few, and before long I shall get some very solid help in exchange.”
“How do you know, O Minister,” said his officers.
“Because Sima Yi will certainly copy them; and when he has done that, I have another plan ready to play on him.”
Some days later Zhuge Liang received a report that the enemy were using the same sort of wooden bullocks and horses to bring up supplies from Xizhou.
“Exactly as I thought,” said he.
Calling Wang Ping, he said, “Dress up a thousand soldiers as those of Wei, and find your way quickly and secretly to Beiyuan. Tell them that you are escort for the convoy, and mingle with the real escort. Then suddenly turn on them so that they scatter. Next you will turn the herd this way. By and by you will be pursued. When that occurs, you will give a turn to the tongues of the wooden animals, and they will be locked from movement. Leave them where they are and run away. When the soldiers of Wei come up, they will be unable to drag the creatures and equally unable to carry them. I shall have soldiers ready, and you will go back with them, give the tongues a backward turn and bring the convoy here, The enemy will be greatly astonished.”
Next he called Zhang Ni and said, “Dress up five hundred soldiers in the costume of the Deities of the Six Layers so that they appear supernatural. Fit them with demon heads and wild beast shapes, and let them stain their faces various colors so as to look as strange as possible. Give them flags and swords and bottle-gourds with smoke issuing from combustibles inside. Let these soldiers hide among the hills till the convoy approaches, when they will start the smoke, rush out suddenly and drive off the wooden animals. No one will dare pursue such uncanny company.”
When Zhang Ni had left, Wei Yan and Jiang Wei were called.
“You will take ten thousand troops, go to the border of Beiyuan to receive the wooden transport creatures and
defend them against attack.”

My wife described this episode as like a fairy-tale, and perhaps it is. Unlike, say, Rumpelstiltskin, though, it has a striking amount of technical detail. Zhuge Liang (诸葛亮) has plans prepared. The mechanical oxen require wood to build and craftsmen to build them. It also has a rare science fictional quality of showing an idea unfolding into its consequences, and then again unfolding. It’s a parable of all technologies, but especially those of war – first mover advantage never lasts. Unlike a fairy tale, the educational message is not primarily moral, but very much in keeping with much of the Three Kingdoms, it is tactical. The tech involved is at the least sexy, but utterly crucial, end of the military, the supply lines. And of course, Zhuge Liang is several steps ahead. I guess he’s called the Marquis of War for a reason.

So while there are a number of pre-modern stories featuring tech, few are so illustrative of the way tech actually works in society and the way it transforms its environment over time.

Along the Saber Pass mountain roads
The running horses bore their loads,
And through Xie Valley’s narrow way
The wooden oxen paced each day.
O generals, use these means today,
And transport troubles take away.

Bicycle Parking At The Risk Obfuscation Theatre

Stubborn Mule aka Sean Carmody has recently had an intriguing set of posts describing a data visualisation technique known as Risk Characterization Theatre, due to Erik Rifkin and Edward Bouwer. As all of the above point out, and reminiscent of behavioural economics, even highly technical professionals are pretty lousy at intuitions of risk, but our performance at this might improve if information is stated in a way that better suits our non-Bayesian brains.

I wondered if this might be useful in describing the balance of risks in this Virginia Postrel article on bikes. Economists Carpenter and Stehr examined US states during the introduction of bicycle helmet laws. As Postrel describes:

A new helmet law reduces bicycle deaths among the affected age group by about 19%. It doesn’t affect older riders. Since serious bicycle accidents are rare, however, the absolute numbers are still small, about eight fewer deaths a year among kids 5 to 15 than would otherwise occur in the states with helmet laws. “It’s not a ton of lives when you compare it to something like wearing your seat belt,” says Prof. Stehr.

One reason for the drop is, of course, that more kids wear helmets when they get into accidents. But another is that many give up cycling altogether. Using surveys of parents, the professors find that about 650,000 fewer children ride bikes each year after helmet laws go into effect. That’s about 81,000 fewer riders for every life saved.

She goes on to nicely contrast this to more innovative and less regulatory approaches in Europe, and has some more detail on her blog. Thinking about transport and health as an industrial design problem rather than a legal one can flag up other unintended consequences: obesity, asthma, and so on.

One “natural experiment” demonstrated this: In Atlanta during the Olympic Games, people drove less, taking public transit to get into the city center. As a result asthma hospitalizations dropped by some 30 percent.

Indeed, taking a lead from Free Range Kids and contrasting obesity and diabetes rates with abduction rates might be worthy of another performance at the Risk Characterization Theatre.

Back to bikes. Sourcing figures from a public draft of the paper mentioned above, Intended and Unintended Consequences of Youth Bicycle Helmet Laws (PDF), and making use of Mule’s kindly open sourced R scripts, I threw together the following, using the Always or Almost Always figures. Click through for the more readable large versions.

A clever aspect of Carpenter and Stehr’s paper is the use of parental and youth surveys on helmet usage. Perhaps unsurprisingly, the youth surveys show much lower helmet takeup rates. Much as it was when I was a Queensland schoolchild and a helmet law was introduced. Style-wise, there has definitely been at least some progress since then.

So, do these diagrams make the ambiguous impact of these laws clearer? On balance, probably no. It’s not easy to pick the relatively subtle differences in numbers of riders. The most stark contrast is between the reported usage rates between parents and children. But that’s also pretty clear on a bar graph (black = helmet, grey = no helmet, expressed as natural frequency in 1000):

Much as the original post warned then, and with the unread spirit of Tufte floating over my shoulder and screaming in a smugly vindicated fashion, it’s a diagram that has to be used with caution. This little sketch hardly invalidates the technique though. Part of the original discussion was whether any benefit came from conveying extra information through shading, or the extra complexity undermined the explanatory power of the chart. The virtue of shading comes out nicely in conditional probability cases. As described again by Mule and based on research by Gigerenzer, the meaning of mammogram positives can be difficult to explain because the brain is lousy at conditional probability, and in this specific case, the false positive rate is a fairly high 7%.

In these cases, the shaded Risk Characterization Theatre seems an elegant way to illustrate related natural frequencies.

Contemporary Eldritch San Francisco Design

I created a database for dead bodies and added the first one. — Annabel Scheme

The ever marvellous Helen recently handed me a corker of a short novel, Annabel Scheme. Nominally a detective story, it’s really a steeplechase through an alt-future San Franscisco. Plus demons, quantum computing and the internet. It’s played straight-up, not satirically, but with a lightness of tone and a fluency of detail that recalls early Douglas Adams.

Sloan’s name for throwaway details that enrich a world is gold coins, and it’s a good one. Annabel Scheme is packed with the things. There are just one or two moments where this tips slightly over the line to cutesiness, but mostly the tone is bang on. Seeing the gold coins along the way is one of the delights of the book, so much so that I’d rather not cite them here; it’s better to just discover them.

The book was funded by a kickstarter project, which is an interesting data point. It’s not why you should read it though. You should read it because it kicks arse.

Rationality and Society

Oh those silly rational agents! What ridiculous duffers we were to ever believe in them. If you’ve read anything about business since the 2007/8 crisis you’ll already have read enough of this sentiment to wallpaper your flat with, but in the unlikely event you missed out, it was all pretty much covered in this op-ed by Joe Stiglitz in 2002 anyway.

And of course he’s right to a point. People aren’t perfectly rational, they are biased in certain ways being fascinatingly explored by behavioural economists, economists can be fixated on nice mathematical models.

And yet, and yet.

A lot of these attacks on rationality are intended as attacks on free markets, that rationality in this sense captures people at our worst. But despite the bad press of late, rationality isn’t just the domain of sociopathic capitalist uber-robot-mensch. It is, for instance, a key premise of Rawls argument in A Theory of Justice:

25. THE RATIONALITY OF THE PARTIES

I have assumed throughout that the persons in the original position are rational. In choosing between principles each tries as best he can to advance his interests.

Rawls fuller argument, in a nutshell, said a just society would be the one chosen by rational but ordinary people who did not know what role they would play in it. They would have to choose the structure of society from behind a veil of ignorance which concealed whether they would be rich and priveleged, or poor, or a redhead. Under these conditions, Rawls argued they would choose two rules; firstly liberty, secondly the prosperity of the weakest class. He then argues that redistribution is just to the extent it benefits the poorest in absolute terms; you can’t sacrifice the wealth of the poorest for pure equality where everyone would be poorer.

Rawls cites Amartya Sen and social choice theory, looking to economics not just for part of his argument but part of his premises. A Theory of Justice effectively revived the idealist or contract tradition as a counterpoint to the utilitarian tradition then dominant. He was also a defender of the welfare state liberalism of his time, and a good one. One marker of the breadth of his contribution in reviving an idealist tradition is the phenomenon of libertarian Rawlsians, like, say, Will Wilkinson; they tend to like the veil of ignorance but not the distributive principle.

Only in a social union is the individual complete. — Rawls, A Theory of Justice, again

((Rawls was too much the careful scholar to go in much for quotable quotes: he is readable but longwinded. He also preferred to caveat his sentences with learned references and restrictions on their scope. The sentence above he only let slip in an unguarded moment at the end of a footnote.))

There are two contrasting uses of rationality here, one from social choice theory, one from efficient markets theory, that are slightly different, but only slightly. The point is that rational agents aren’t just a vision of utility maximising robots chewing each other to pieces. The considered reasoning behind the veil of ignorance also shows rationality as a vision of people at their best.

Flu Seasonally Adjusted

Permutations points out an elegant paper from Christakis and Fowler (gloriously open access). They exploit a clever result from social network theory called the friends paradox. This is the phenomenon that your friends have more friends than you do – because social networks typically have a few very connected spoke nodes. They use this to track flu within a university student population. By separately tracking the friend cohort they were able to note the evolution of a flu epidemic several weeks before its full arrival in the general population as represented by the random cohort.

Current surveillance methods for the flu, such as those implemented by the CDC that require collection of data from subjects seeking outpatient care or having lab tests, are typically lagging indicators about the timing of the epidemic (information is typically one to two weeks behind the actual course of the epidemic). […] [W]hile potentially instantaneous, the Google Trends and prediction market methods would only, at best, give contemporaneous information about rates of infection. In contrast, we show that the sensor method described here can detect an outbreak of flu two weeks in advance. That is, the sensor network method provides early detection rather than just rapid warning.

Wiring up a distributed computer of neighbourhood gossips to see into the future is presumably a trick with wider applications. For instance, economic data is not only notoriously bad, but notoriously slow. It’s a field where price data from three month old lagging indicators are siezed on with delight at their timeliness, and GDP figures have to be seasonally adjusted a year after the period they apply to. Economic actors also behave as a network for the flow of information and beer.

So, you should be able to systematically exploit this effect in economic surveys to get both more timely results, and information on the velocity of effects throughout an economy. Eg, if you are surveying businesses, get those businesses to also nominate their suppliers and customers, and track that group as well. It’s possible this technique is already used, and I’d be interested to hear about it. I suspect that its main use is though data collection folk wisdom rather than systematically. So it’s well known that health workers are vulnerable, highly connected nodes for disease spread / containment, and that banks and large retailers are hubs of economic activity, but that knowledge is not generalisable in the same way as the friend cohort in the paper. Perhaps you could even use techniques like this to build a network model of critical financial institutions, from the perspective of vulnerability to systemic failure under a catastrophic crisis.