Statistics on chess positions

Chess positions are more tricky to define than chess games. I can see at least 4 possible definitions:

  1. Contents of the 64 squares only. This is what I call a diagram.
  2. Add whose turn it is, castling rights, and any en passant square. This is what I call a position. This information is sufficient for chess enumeration and games in which the two players cooperate to achieve a goal ("help" stipulations). This definition is fundamental to chess, and is used to decide whether two chess positions are the same (FIDE Laws of Chess, Article 9.2). To avoid unnecessary duplication of positions, en passant availability is noted only if the en passant capture is possible (by a legal move).
  3. Add to this fifty-move-rule information and repetition-of-position information. This information is necessary for competitive chess. For the fifty-move rule, store the number of plies since the last capture or pawn move (a number between 0 and 99). For the threefold-repetition rule, store every move since the last "irreversible" move (like a capture or a pawn move). Because of this, the concept isn't really interesting, it's almost like representing a position with the list of every move since the beginning.
  4. The Forsyth-Edwards Notation for chess positions is yet another definition. It can be described as definition 2, plus fifty-move-rule information (but no repetition-of-position information). In addition it stores the move number of the game. An en passant square is noted even if no en passant capture is possible.

As you can see many definitions are possible. This page discusses definitions 2 and 1 (in this order).

Note that neither "position" nor "diagram" has a standard definition in chess literature, so when you read something outside of this page you should focus on the intent and not on the actual word used. For example, chess problems are implictly problems about what I call diagrams because castling and en passant information is missing. Recovering this information is sometimes even the problem!

Chess positions

A chess position is "uniquely realizable" if there is only one chess game that leads to the position in the specified number of plies.

Number of distinct chess positions
  uniquely realizable all
ply 0 1 1
ply 1 20 20
ply 2 400 400
ply 3 1862 5362
ply 4 9825 72078
ply 5 53516 822518
ply 6 311642 9417681
ply 7 2018993 96400068
ply 8 12150635 988187354
ply 9 69284509 9183421888
ply 10 382383387 85375278064

Chess diagrams

A chess diagram is "uniquely realizable" if there is only one chess game that leads to the diagram in the specified number of plies. In the language of chess problems, these are called dual-free proof game problems. A "proof game" is a legal (though possibly weird) chess game reaching a given diagram, thereby proving that the diagram is legal (reference). A chess problem must usually be dual-free (have a unique solution) to be considered for publication.

Number of distinct chess diagrams
  uniquely realizable all
ply 0 1 1
ply 1 20 20
ply 2 400 400
ply 3 1862 5362
ply 4 9373 71852
ply 5 51323 815677
ply 6 298821 9260610
ply 7 1965313 94305342
ply 8 11759158 958605819
ply 9 66434263 8866424380
ply 10 365037821 81766238574

Diagrams with n solutions

Sometimes a diagram with multiple solutions can be fun:

François Labelle & computer
Retros mailing list, January 19, 2004
rnbqkbnr/pppp1ppp/4p3/8/8/4P2P/PPPP1PP1/RNBQKBNR
Proof game in 3.5 moves
(2004 solutions)

Which values of n can be obtained in this way? I know the answer for plies 0-10. A summary is given in the table and graph below. It may seem that we can eventually cover all the integers by increasing the ply count, but in 2005 I showed by a counting argument that there exists an n that cannot be obtained no matter the number of plies.

Data on diagrams with n solutions
  largest n with a diagram lowest n without a diagram
ply 0 1 2
ply 1 1 2
ply 2 1 2
ply 3 4 3
ply 4 16 5
ply 5 91 25
ply 6 524 93
ply 7 2899 679
ply 8 16327 3413
ply 9 135024 23993
ply 10 1351762 173609

Plot of the number of diagrams with n solutions vs n

"At home" diagrams

A chess diagram is called "at home" if all the surviving pieces are apparently on their start squares (aka "deletion", "chez soi"). See "At Home" proof games for many examples. Click on a number in the table below to access a file with the diagrams.

Number of "at home" diagrams
  uniquely realizable with 2 solutions all
ply 0 1 0 1
ply 1 0 0 0
ply 2 0 0 0
ply 3 0 0 0
ply 4 0 0 1
ply 5 0 0 0
ply 6 0 0 0
ply 7 0 0 9
ply 8 10 12 74
ply 9 41 30 255
ply 10 116 187 1350
ply 11 335 512 4719
ply 12 1111 1522 18535
ply 13 2619 3599 58489
ply 14 6067 9286 189876

Mirror-symmetric diagrams

The symmetry considered here is horizontal symmetry with black and white interchanged. Mirror-symmetric diagrams are interesting when the ply count is odd. See Asymmetric play to symmetric diagrams for some examples. Click on a number in the table below to access a file with the diagrams.

Number of mirror-symmetric diagrams
  uniquely realizable with 2 solutions all
ply 0 1 0 1
ply 1 0 0 0
ply 2 20 0 20
ply 3 8 0 8
ply 4 85 0 260
ply 5 8 11 177
ply 6 372 6 2816
ply 7 9 8 2392
ply 8 1255 121 26925
ply 9 53 109 25843

Checkmate diagrams

The title says it all: the diagram shows a checkmate. Actually it's more tricky than it looks: checkmate is a property of "position", not diagram, and it is possible for the same diagram to be checkmate or not checkmate depending on what the last move was. For example:

rnbq1bnr/ppppp3/6p1/7k/5QPp/4P3/PPPP1P1P/RNB1K1NR

So technically in the table below I'm counting diagrams that are checkmate for at least one game (in the specified number of plies). For diagrams that are "uniquely realizable" or "with 2 solutions" I make sure that the diagram cannot be realized in any other (non-checkmate) way. I didn't find any example where this mattered in 11 plies or less, but François Perruchaud showed that it matters at ply 13: there is only one way to reach the diagram above in 6.5 moves with checkmate (1.e3 h5 2.Bc4 h4 3.Bxf7+ Kxf7 4.Qf3+ Kg6 5.Qf4 Kh5 6.g3 g6 7.g4#), but the diagram is not uniquely realizable because there are 4 other ways to reach the diagram in 6.5 moves without checkmating (for example 1.e3 h5 2.Bc4 h4 3.Bxf7+ Kxf7 4.Qf3+ Kg6 5.Qe4+ Kh5 6.Qf4 g6 7.g4+).

Click on a number in the table below to access a file with the diagrams.

Number of checkmate diagrams
  uniquely realizable with 2 solutions all
ply 0 0 0 0
ply 1 0 0 0
ply 2 0 0 0
ply 3 0 0 0
ply 4 0 4 4
ply 5 3 38 105
ply 6 51 25 1251
ply 7 1106 1513 26542
ply 8 3813 5797 212907
ply 9 47300 82349 3555181
ply 10 216420 363361 25410051
ply 11 2057581 3735018 340122090
ply 12 10276984 21039750 2355723056

Diagrams with no shorter realization

Often a diagram is achievable in p plies, but in no fewer plies. In that case, a game reaching the diagram in p plies is called a "shortest proof game". In the table below, the column "uniquely realizable" therefore counts the number of dual-free shortest proof game problems. The column "all" is also interesting because each legal diagram appears exactly once in it (indexed by the length of its shortest proof game(s)). This means that the counts in that column eventually drop to zero, and their sum is equal to the number of legal diagrams. As noted on the parent page, the count is known to be non-zero for ply 366.

Number of chess diagrams that cannot be realized in fewer plies
  uniquely realizable all
ply 0 1 1
ply 1 20 20
ply 2 400 400
ply 3 1702 5202
ply 4 8659 69731
ply 5 49401 766337
ply 6 287740 8708079
ply 7 1934794 86540204
ply 8 11569093 880526165
ply 9 65443733 7996545696
ply 10 360231372 73802185449

Tempo diagrams

Diagrams that have a shorter realization can also be interesting. They are especially interesting if the diagram is uniquely realizable in p plies. Imagine the frustration when you're asked for a proof game in p plies, and you can easily do it in fewer plies but the solution in exactly p plies eludes you! One must find a way to waste moves, also called "losing tempo".

The table below counts diagrams that have a unique realization in p plies, but where the shortest possible realization is in p − t plies, where t > 0 is the tempo achieved. The table can be thought of as a breakdown of the numerical difference between the "uniquely realizable" columns from sections "Chess diagrams" and "Diagrams with no shorter realization".

Note that a tempo of 4 is impossible because any solution in p − 4 plies can be turned into 16 solutions in p plies with an initial knight dance, making the diagram not uniquely realizable in p plies. Perhaps surprisingly, some tempos larger than 4 plies are possible (but not multiples of 4). Click on a number in the table below to access a file with the diagrams.

Number of uniquely realizable chess diagrams with a given tempo
  tempo 1 tempo 2 tempo 3 tempo 5 total
ply 0 0 0 0 0 0
ply 1 0 0 0 0 0
ply 2 0 0 0 0 0
ply 3 160 0 0 0 160
ply 4 650 64 0 0 714
ply 5 1786 136 0 0 1922
ply 6 10663 418 0 0 11081
ply 7 29731 788 0 0 30519
ply 8 186637 3426 2 0 190065
ply 9 966404 23492 634 0 990530
ply 10 4719654 86281 501 13 4806449

Below are examples with large tempos constructed by people. As a bonus, those problems even have a unique solution in p − t plies.

Published proof games with large tempos
  tempo 6 tempo 7 tempo 9
ply 20 Michel Caillaud, 1996    
ply 24     Gerd Wilts, 2004
ply 26   Michel Caillaud, 2000 Gerd Wilts, 1997

More values of t (and even multiples of 4) can be obtained by changing the initial position (so-called A→B proof game problems). It is even possible to achieve every natural number (t=1,2,3,4,..) using the same pair of diagrams A & B.


page last updated: March 20, 2012
back to Chess Problems by Computer