The Mathematics of Chess

(Image Credit: US Chess Federation)

August 23, 2023

Roumaissae Bouaid

10th Grade

Mohamed 5 High School 

Introduction 


Along with the booming success of Netflix’s original series The Queen’s Gambit, in October 2020, chess experienced a resurgence and suddenly became extremely popular.

Interest in chess in 2020 (Image Credit: GoogleTrends)

Although it is challenging to determine chess's age or origin, the legend is that it was invented in seventh-century India. The rules of chess as they are known today emerged in Europe at the end of the 15th century. However, people didn't just play chess but were also captivated by the maths deeply seated in the game. Many mathematicians had theories about chess, and these century-old theories and problems are still of interest -- and are being further developed -- today.

Big Numbers 


A chess game always starts with an opening, which refers to the initial stage of a chess game. Very often, the opening strategy - and even the first move - can affect the entire game. But how many different openings are there to play? 


White, which always opens the chess game, has twenty options for their first move. Then black can respond to it from another twenty options. In other words, black has twenty options for each move white plays. This may not sound like a lot, but it means that just after the first move from each player, there are already 400 different possible positions! The Oxford Companion to Chess lists a total of 1,327 named openings and variants in chess, and openings usually last for multiple moves. 


But there is much more to chess than just the opening positions. American mathematician Claude Shannon calculated the Shannon Number: 10^120.  This is an estimate of the number of all the different possible chess games that can be played. This number is established on an average of possibilities for a pair of moves, with a typical game lasting about 80 plays (40 pairs of moves from black and white). To put into perspective how large the Shannon number is, there are more possible chess games than the number of atoms in the observable universe (10^80)!

(Image Credit: chesseasy.com)

The Eight Queens Puzzle 


After discovering all the mathematically possible games in chess, it’s important to look at the mathematical puzzles. We’ll start with the most famous chess problem: The Eight Queens Puzzle. Max Bezzel published this puzzle in 1848, and Franz Nauck published the first solutions in 1850. Nauck also extended the puzzle to the n queens problem, with n queens on a chessboard of n×n squares. It is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other; therefore, a solution requires that no two queens share the same row, column, or diagonal. There are 92 solutions. However, considering that some solutions only differ by rotational and reflectional symmetry, the puzzle only has twelve fundamental solutions.

The Knight's Tour 


Another mathematical chess problem deals with the oddest piece, the knight, which has a unique movement: it moves two squares vertically and one square horizontally. This problem involves the following question: can the knight move through all of the squares on the board while landing on each square only once? This is a very ancient problem, which was first mentioned by the Arab chess player Al Adli ar-Rumi in 840 AD In his book, “كتاب الشطرنج” (“Book of Chess”), where he presents two possible solutions for this problem. A lot of mathematicians have tried solving this problem, only to find that it has considerable solutions; however, none of them could find the exact number of solutions until 1997, when Australian mathematician Brendan McKay managed to find a better answer. McKay found that this problem has no less than 1,658,420,855,433 possible solutions without counting the symmetrical ones.

(Image Credit: ResearchGate)

(Image Credit: Chess.com)

The Square Rule  


After all these big numbers and complicated chess problems (which are largely theoretical), it’s vital to finalize with something more simple: geometry. The square rule is a visualization tool used to quickly assess if a pawn can promote itself before the enemy king threatens it. As the name implies, it functions by visualizing a square on the board. The pawn can promote if the opposing king can't step into the square on its next move. The first step is to imagine a diagonal line that starts on the pawn and ends on the promotion rank (to the side where the enemy king is). Then, the player must imagine another line starting at the ending square of the previous line and extend it all the way down the file to the rank of the pawn. Then complete the square as shown in the figure. This rule states that the king can capture the pawn if it can step into the square on its next move. If that isn’t the case, then the pawn can reach the promotion square before the king gets to it.

Overall, it may appear at first glance that these two disciplines - mathematics and chess - are unrelated. Despite this, there are many unexpected connections between the two. To quote Martin Gardner, "Chess combines the beauty of mathematical structure with the recreational delights of a competitive game." In other words, how one plays their game of chess simultaneously includes countless mathematical factors, many of which are the deciding point between whether they win or lose. 

Reference Sources

https://trends.google.co.uk/trends/explore?date=2019-01-04%202021-02-04&geo=GB&q=chess

Chess.com Editors. “Square Rule - Chess Terms.” Chess.Com

https://www.chess.com/terms/square-rule-chess#:~:text=Conclusion-,What%20Is%20The%20Square%20Rule%3F,square%20on%20its%20next%20move.

Elran, Dr. Yossi. “The Mathematics of Chess.” Davidson Institute of Science Education, 6 Feb. 2022,

https://davidson.weizmann.ac.il/en/online/sciencepanorama/mathematics-chess

“How Many Chess Games Are Possible?” YouTube, YouTube, 24 July 2015, 

https://www.youtube.com/watch?v=Km024eldY1A

Nishiyama, Yutaka. “A Knight’s Tour Solution [4] | Download Scientific Diagram - Researchgate.” ResearchGate, Feb. 2016,

https://www.researchgate.net/figure/A-knights-tour-solution-4_fig4_301874939

Wikipedia. “Chess Opening.” Wikipedia, 7 Aug. 2023,

https://en.wikipedia.org/wiki/Chess_opening#:~:text=Many%20opening%20sequences%2C%20known%20as,varying%20degrees%20of%20common%20usage

Wikipedia. “Chess Opening.” Wikipedia, 7 Aug. 2023, 

https://en.wikipedia.org/wiki/Chess_opening

Wikipedia. “Chess.” Wikipedia, 2 Aug. 2023, 

https://en.wikipedia.org/wiki/Chess

Wikipedia. “Eight Queens Puzzle.” Wikipedia, 9 Aug. 2023, 

https://en.wikipedia.org/wiki/Eight_queens_puzzle

Wikipedia. “Knight (Chess).” Wikipedia, 26 June 2023, 

https://en.wikipedia.org/wiki/Knight_(chess)

Wikipedia. “Shannon Number.” Wikipedia, 21 Dec. 2022, 

https://en.wikipedia.org/wiki/Shannon_number