A>B>C>A!
Publication date: 26 October 2008Originally published 2008 in Atomic: Maximum Power Computing
Last modified 03-Dec-2011.
Real-Time Strategy games teach us many useful things about the real world.
RTS players know, for instance, that any soldier who survives for more than five minutes in any combat zone is incredibly lucky.
And ammunition never runs out.
And the building known as a "barracks" is a specialised machine for converting rare minerals into fully-trained infantrymen.
But RTS, and other, games can also sneakily teach elements of logic. And they can do so with a sense of urgency not otherwise achieved by anything less than the scariest maths teacher you ever had.
So let's continue my occasional series on How You Can Learn Everything About The Universe By Playing Computer Games, with a little look at the world of nontransitive relationships.
In mathematics, a relationship is transitive if, whenever it relates A to B and B to C, it also relates A to C in the same way.
So height, for instance, is transitive. If Albert is shorter than Betty, and Betty is shorter than Charlie, then Albert must be shorter than Charlie.
"Intransitive", or "nontransitive", relationships don't work this way. And games of all kinds, from the surprisingly deep rock-paper-scissors to Street Fighter, are full of them.
In war games, for instance, cavalry beat swordsmen, and pikemen beat cavalry, but swordsmen beat pikemen. Or disintegrator tanks beat zomborgs, and mole-cats beat disintegrator tanks, but zomborgs beat mole-cats.
Intransitive relations are the norm for overall game plans in real-time and turn-based strategy games of almost all kinds. If you choose to defend (turtle) then you'll probably beat someone who throws themselves into an all-out attack. If you all-out attack then you'll probably beat someone who's devoted themselves to expanding. But if you expand like crazy, you'll probably beat someone who turtles.
Fighting games are also absolutely riddled with complex rock-paper-scissors relationships, whipping by in their dozens as the players explore the particular attack/block/throw/special-move permutations of whoever's slugging it out at that moment.
Intransitive relationships can emerge in more subtle ways, though.
Take nontransitive dice, for instance. Ordinary six-sided dice, numbered such that die B will on average beat die A, and die C will on average beat die B - but die A will on average beat die C!
This seems impossible at first glance, which means a set of nontransitive dice can be an excellent money-making proposition. Check out the Wikipedia page on the subject for more information, and do feel free to return to this article after you've won a few hundred bucks down the pub.
One of the reasons why this sort of thing isn't well-known is that nontransitivity often arises from probability - very directly, in the case of nontransitive dice - and probability theory is not an ancient field of study.
Geometry - now that's ancient. People have been working on that since at least the invention of the clay tablet. But nobody really made a dent in probability until the sixteenth century.
This seems kind of weird now, because probability is something that people encounter face-to-face every day. Especially if they play dice games, which are another thing that seems to be about as old as agriculture. But no. For whatever reason, elementary probability errors are extremely common.
The Gambler's Fallacy, for instance - thinking that because a (fair) coin's come up heads three times (or the roulette ball has landed on a black number three times...), tails (or red) must now be "due". Since coin-tossing isn't conditional, this is not the case (and roulette wheels are... almost... random, too).
(Oh, and if X has a 1% chance of happening every time you do Y, and you do Y a hundred times, X is not at all certain to happen.)
But nontransitivity, like probability in general, has great significance in the real world. The Gambler's Fallacy is a natural misconception, and it's also natural for people to assume that all relationships where you can demonstrate some vague sort of hierarchy are transitive, when they actually often aren't.
Suppose you would rather buy a V8 Commodore than a Camry, and would prefer an '82 Jaguar with a small-block Chevy to the Commodore, but would on balance rather have the Camry than the Jag. This does not mean that (a) you are crazy, or (b) there's no way to actually make a choice.
If you demand that all of your choices have transitive relations then you will indeed be completely stuck in this sort of situation. But if you accept it as just being basically intransitive, you can go on to see if there's something else rational that can tip you into one choice or another. In Logic Experiment Land extra factors like "my mate Fred's happy to unload his Commodore for a couple of grand under blue-book value if it means he doesn't have to advertise it" do not arise.
Another example of real-world intransitivity: In preferential voting, every voter expresses a simple transitive hierarchy of preferences. But it's perfectly possible for the aggregate preferences of all the voters to create a "voting paradox" in which it's impossible to decide who should get some of the votes.
(Kenneth Arrow won a Nobel Prize for figuring out just how ghastly this problem is.)
Once you know this, preferential voting systems don't look any simpler, but they start to look less needlessly complex.
Intransitivity is common enough in sport, too. Any statistics nerd can come up with plenty of rock-paper-scissors relationships between players and teams.
What this means - and it's extensible to a lot more than sport - is that the normal sort of tournament, where competitors are matched up in pairs and the winners of each match go on to the next round, can at best only tell you who deserved to win that particular set of match-ups. The winner of a tournament is clearly pretty good, but there's no way at all to actually find the overall "best" competitor in any sort of adversarial competition with numerous participants. Well, unless it's some sort of arena fight where everybody plays at once.
And even then, you know that someone'll just complain about how two of the gladiators were turtling, and one of the other guys was flying planes off the edge of the map.