Chess Opening Theory/Pachinko Index

Why do we need an index?
Because this is a book and not an encyclopedia, so there has to be a logical order in which to read the various pages. And because it helps ensure that equally important openings get equal coverage. The internet can have "shallow bias" when it comes to discussing chess openings. Miscellaneous first and second moves by both players, especially exciting gambits, get proportionally more attention than important variations further along the branches of the tree. For example, there is a truckload of theory on the Blackmar-Diemer Gambit (1.d4 d5 2.e4?!) and there is a truckload of theory on the Latvian Gambit (1.e4 e5 2.Nf3 f5?!). But the Sveshnikov Sicilian line 1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e5 6.Nbd5 d6 7.Bg5 a6 8.Na3 b5 9.Bxf6 gxf6 10.Nd5 has two sub-variations, 10...f5 and 10...Bg7, and in real-world, high-level chess, both of those sub-variations are more significant openings than the entire Blackmar-Diemer Gambit or the entire Latvian Gambit.

How do you index a book on chess opening theory?
Good question. It makes no sense to use alphabetical order. ECO codes (Encyclopedia of Chess Openings) have been the standard since the 1960s. There are a few reasons ECO codes might be sub-optimal for our purposes:
 * ECO is a commercial endeavour. Cribbing off a commercial system is not really the wiki way. Go open source or go home!
 * Although this is hardly ECO's fault, openings go in and out of style, and the 500 ECO codes are assigned to what used to be the 500 top openings in the 1960s. So the Staunton Gambit has two codes, the Centre Game has two codes, while several big beasts including the Sveshnikov Sicilian, c3 Sicilian, Advance French, Modern, Scandinavian and Scotch make do with one each.
 * Because of that, an opening book arranged in ECO order will have some very long pages and some very short ones.
 * All the possible codes from A to E and from 00 to 99 are allocated. The system can't be expanded unless Chess Informant announces a volume F or mathematicians discover some more two-digit numbers.
 * The trunk-and-branch structure of ECO means you can get a position that's classified under one code, and a move later it's switched to a different code. The codes refer to routes rather than destinations. There is room for a complementary approach based on destinations.

What's the Pachinko Index?
It's a free and hopefully future-proof complement to ECO codes developed for this Wikibook. It's represented by the symbol π (pi) - not to be confused with the number 3.1415926.

There are 2 letters and 2 numbers. Like this: Ru-57. They may remind you of chemical isotopes.

What do the letters mean?
They're the highest level of the structure, the equivalent of ECO volumes. We can define new ones as needed. Currently there are 11 volumes:
 * 1) [Si] - the Open Sicilian, 1.e4 c5 2.Nf3
 * 2) [As] - the Anti-Sicilians, 1.e4 c5 2.everything else
 * 3) [Kp] - mutual king's pawn, 1.e4 e5, except for the Ruy Lopez
 * 4) [Ru] - the Ruy Lopez, 1.e4 e5 2.Nf3 Nc6 3.Bb5
 * 5) [Fr] - the French Defence, 1.e4 e6
 * 6) [Ks] - the semi-open defences, 1.e4 everything else
 * 7) [Ka] - a very small volume devoted to the King's Indian Attack, a particular White formation played against almost anything
 * 8) [In] - the Indian Defences, 1.d4 Nf6
 * 9) [Qp] - mutual queen's pawn, 1.d4 d5
 * 10) [Qs] - the semi-closed defences, 1.d4 everything else
 * 11) [Fl] - flank openings, anything other than 1.d4 or 1.e4 by White

What do the numbers mean?
Within each volume there are 81 possible two-digit indexes. The numbers used are 1-9, there is no zero. Each index is one unit of opening theory. A unit isn't quite the same as a line in the traditional sense, because lines can transpose into each other, whereas Pachinko Indexes are (supposed to be) mutually exclusive. The idea is that once you've reached a particular Pachinko Index, you can no longer transpose out of it to a different one. This is not a 100% guarantee, but the assigned indexes have been checked and transpositions limited as far as possible.

They are also (supposed to be) roughly equal in size. This size corresponds to 1 game in 1,000, or to make the math easier, 1 game for every 500 games in your database that begin 1.e4 (1.e4 games represent about 50% of the total). If "something" happens in 1 game in every 1,000, it gets its own Pachinko Index. So you can read up on a single index in your lunch break, the way you can read a chapter of a book.

Why is there no zero?
This is the, ahem, clever bit. The system is effectively base-9 so that it can be infinitely expanded fractal-style and the "missing" 10th code can be used to link different levels together. If the codes from Si-21 to Si-29 are all allocated and we need to fit another code in there, we just spin off a new volume where Si-2 gets replaced by, let's say, Nd. The second digit in the old volume becomes the first digit in the new volume, so Si-21 maps to Nd-11, Si-26 maps to Nd-61, etc. The codes in the old volume do not get recycled - they are permanently linked to the new volume.

Why doesn't the line played in my game seem to fit into any Pachinko Index?
It's probably something that happens in fewer than 1 game out of every 1,000. There are a couple ways of handling those. One is to use a partial Pachinko Index, so if you find a random second move against the Caro-Kann that isn't covered by codes Ks-11 to Ks-19, you could just call it Ks-1 or even just Ks. (This is another reason for not using zeroes - it makes partial codes possible.) The other is to append either w or b and then a move number to the end of the Pachinko Index, so Fr-31b9 would be an opening that was heading towards Fr-31 until Black deviated from it on move 9.

Flexibility is always nice.

Why "Pachinko Index"?
Because the words Pachinko and Index exist in almost every language. And because the individual units are like buckets in a pachinko machine - the ball may take tens or hundreds of different paths through the pins to arrive at the same one.

Isn't this rather reinventing the wheel?
Not just the wheel. The whole darned tractor.