Friday, 10 March 2023

Statistics on Chess Games

My diurnal age today, 27004, turns up in an online table of statistics for chess games. Figure 1 shows the table.


Figure 1: source

A ply is a half-move in chess so what the table is saying is that after five plies there are 27004 different ways in which a king can be placed in check. Figure 2 shows such a situation for white checking the black king.


Figure 2: generated by ChessX

The white queen can move to F7 via F3 or H5. Note that we are not interested in the quality of the chess moves here but merely how a check (but not checkmate) can be achieved on the fifth ply. Figure 3 shows a situation where white achieves checkmate (using a variation of fool's mate) on the fifth ply. Looking at the table in Figure 1, it can be seen that mate by White can be achieved in 347 different ways.


Figure 3: generated by ChessX

Since White moves first, the fifth ply must always be made by White. Likewise, mate on the fourth ply can only be achieved by black and in eight ways, each a variation of fool's mate. Figure 4 shows one such configuration.


Figure 4: generated by ChessX

The number 27004 is a member of OEIS A089956:


 A089956

Number of chess games that end in check (but not checkmate) after exactly \(n\) plies.



The initial members of the sequence are:
  • 0 ways after 0 plies
  • 0 ways after 1 ply
  • 0 ways after 2 plies
  • 12 ways after 3 plies
  • 461 ways after 4 plies
  • 27004 ways after 5 plies
  • 798271 ways after 6 plies
The website displaying these statistics also alerted me to some rules of Chess that I wasn't aware of, namely the automatic draws by 5-fold repetition and the 75-move rule. 
I am ignoring the draw by 3-fold repetition because it is a pain to take into account. Actually, a draw by 3-fold repetition isn't automatic: one of the players must make a correct claim for the draw to occur. So if it's legal to ignore the repetition of position, then I believe that it's ok to enumerate those games. Draw by 5-fold repetition (a rule introduced in 2014) is automatic and should affect the number of games. Initially, the rule was not very clear, with one interpretation suggesting that the earliest it can apply is at ply 22. In 2017, the rule was modified, and it is now clear that the earliest draw by 5-fold repetition occurs at ply 16, reducing the number of games at ply 17 by 16^4*20 = 1310720. Draw by the 50-move rule (not automatic), draw by the 75-move rule (automatic), and draw by impossibility of checkmate (automatic) don't apply before even more moves. For the complete rules of chess (including past versions since 2009), look for Laws of Chess in the FIDE Handbook, section E.01.

No comments:

Post a Comment