The Role of AI in Modern Chess

Sai Mannam

Image available: https://www.thenewatlantis.com/wp-content/uploads/legacy/20190820_TNA58Wilkenfeldbanner.jpg

Image available: https://www.thenewatlantis.com/wp-content/uploads/legacy/20190820_TNA58Wilkenfeldbanner.jpg

Over the past centuries, chess has been a game enjoyed by people of all ages and classes. Being traced as far back as 500 A.D., chess has taken many variations and the rules have changed as it was introduced to various parts of the world. In recent times, artificial intelligence has been playing an ever-greater role in the progression of chess. With such an influence, many have wondered the implications for the game itself. Will AI involvement make chess against humans boring and disinteresting? Is there any point in human play as these supercomputers have far exceeded man’s ability? We will take a closer look in the following article. 

History of Chess

The exact origins of chess have been up to debate, but the earliest known game pieces have been found throughout various parts of Asia. One of the earliest known forms of chess was called chaturanga, a Sanskrit name derived from the Mahabharata (an Indian epic). As time went on, the game became popular in other parts of the world. Its rules kept changing until the late 19th century. Once a standardized format for gameplay had been created, chess theory developed. Some of the most famous games during the 1800s were daring attacks where defense strategies were not prioritized. Players did not heed to this aggression, and their main aim was to checkmate the king without regard for sacrificed pieces. Positional chess then became more popular and the dominant theory until the 1920s. It involved occupying the center of the board in the opening moves. The 1920s then introduced the hypermodernism school of thought which focused on controlling the center with minor pieces (like bishop and knight) rather than just occupying it with pawns.  The soviets went on to rule a dynasty in the chess championships. From 1927 to 2006, players from the Soviet Union and Russia (with two exceptions) held the world champion title. During that time, the advent of chess computers also started budding.

Garry Kasparov, from 1984 to 2005, held the title of chess world champion. He was known to be the first major player to use computers extensively. In the late 1980s and early 1990s, he was able to beat the strongest chess computers at that time. He was defeated, however, by the Deep Blue in 1997. This was the first time that a chess computer had defeated a world champion. A few years later, the Hydra supercomputer easily defeated Michael Adams, a 7th ranked player, and the increasing powers of chess engines was noticed by everyone. By the early 2000s, there was a consensus that computers are much more powerful than humans can ever be at chess.

Figure 1. Tree Search.

Figure 1. Tree Search.

How does it Work?

It is worth taking a look into the process by which chess computers like Deep Blue and Hydra calculate moves. These supercomputers use techniques in artificial intelligence to provide a framework to calculate their next best move. The game of chess is a Tree Search problem, whereby the current positions of the chess pieces on the board are considered and the actions that the algorithm can take next is dependent on all the legal chess moves available to the engine (Fig. 1). The possible outcomes include win (+1), loss (0), or draw (1/2). Chess is a zero-sum game where the total payoff to all players is equal in any outcome of the game.

The game tree that defines possible sets of moves that two players make in chess can be used in understanding how a chess AI decides on a move. The evaluation function is the main component of describing how good a move is. This function takes in a particular board arrangement and provides a real number assignment to that state. It aims to quantify the current state to maximize gain for itself and minimize the opponent’s room for winning. Parameters for measuring this evaluation function can be provided based on the rules of the chess game. This can include assigning an extremely high value to a state where the engine has the opponent’s king in checkmate or a higher value when it has more chess pieces on the board than the opponent. Integrating these measures creates a function, which can then be used in the evaluation of measuring success of a particular move.

Figure 2. Minmax search tree example.

Figure 2. Minmax search tree example.

The evaluation function is only a single component of the barebone architecture used to create a chess AI. It is integrated into an algorithm that searches through possible moves and chooses the next best move from the values obtained. The most basic search tree used in chess is the Minimax algorithm (Fig. 2). In the search, there are two types of nodes: Min and Max. The Max nodes can be considered the chess engine’s series of moves and the Min nodes are the set of moves the opponent can make. Using the evaluation function, the engine uses the Minimax algorithm to find moves that maximize its own utility (value obtained from function) and minimize the opponent’s.

Difficulties in Implantation

Now this may seem like a simple task at first glance, but finding which moves would optimize success in the game proves rather difficult to put into practice. There are many components of this algorithm to consider, however, that has made the creation of these supercomputer chess AIs such a magnificent feat. American mathematician Claude Shannon was interested in the complexity of game trees. In AI, game complexity involves considering the total number of games that are possible to be played, decisions made within the games (quantified as nodes in the tree), and the time it takes to sort through all possible values. The amount of computational power required to analyze this for chess is way too high. Dr. Shannon estimated that there were 10120 different games of chess, which is exponentially higher than the number of atoms in the observable universe (1080 in case you were wondering). Thus, simply using this architecture is not enough to create these engines. The evaluation function makes use of heuristics to reduce time complexity. Using available information, nodes that are impossible for winning are pruned and the search looks deeper into viable options. This is similar to how advanced chess players do not consider all possible moves: they simply use their previous experiences to think deeper on fewer options that would maximize their winning potential. Translating this line of logic into a chess engine has been more efficient with the advent of Deep Learning Networks. Specifically, a Convolutional Neural Network is used to extract specific features over different dimensions of the data. These layers are then synthesized into the function to create a topology of possible moves that can lead to success. Integrating all these parameters into one AI has been the focus for the people behind these engines.

Is there still value in playing Chess?

This has subsequently brought many to question the future of chess: will professional chess be obsolete now that computers are much better than humans? Since AI has superseded human knowledge, is there any point in further human involvement with chess? Many players believe that their beloved game has become less creative. Grandmasters just memorize the first 20 opening moves for each position based on computer analysis, and the fun and unpredictability which drew many to the game was taken away. Vladimir Kramnik, a retired competitive player, remarks, “You don’t even play your own preparation; you play your computer’s preparation.”

Although the game may not be what it once was, there are a lot of benefits to be conferred for an individual who plays chess. These include improving intelligence, empathy, memory, problem-solving, and creative abilities. The cognitive and theoretical challenges that chess presents enables this vast array of abilities to develop. Because many parts of the brain are working together, the chess player is able to retain all these benefits. Due to the cerebral requirements chess demands, scientists have also found that it could act as a protective factor in dementia

Additionally, computers were first built to defeat humans at the game of chess; now these engines are becoming more collaborative and engaging for the user. Jon Kleinberg, a Professor of Computer Science at Cornell University, built a chess engine to play like a human. This allows the chess player to have a better chess experience, and the researchers have been gaining insight into what mistakes humans make at different levels of chess. This provides them with data to show the users on how they can improve their game to become a better chess player. In a way, initiatives like these have been revitalizing the beauty and art of the game that drew many to it. Eli David, a researcher at the University of Israel working on machine-learning-powered chess engines, has stated, “Instead of making computer chess stronger and trashing humans, we can focus on chess as an art in the form of a game.” Allowing this symbiotic relationship between humans and machines, the emotional and technical experiences that come with the game can be re-energized and in many cases strengthened.

Although AI has played a major role in the game of chess in terms of directing chess’ future course, humans still love to watch and play chess for the same reason they love to watch and play other sports. We have a unique ability of appreciating others. Though appreciating an AI playing another AI is possible, the excitement in Kasparov’s 25th move against Michael Adams or Paul Morphy’s Opera House Game cannot be brought about by a chess engine. Because connecting with another human and praising their genius can only be done when two humans are playing with each other, professional chess and people’s love for the game is here to stay. Chess will not be the same with the advent of AI, but we are finding ways for AI to harmoniously shape the future of the game.

REFERENCES

  1. “10 Benefits of Playing Chess: Plus Potential Downsides.” 2020.

  2. “Deep Blue.” Stanford CS221, https://stanford.edu/~cpiech/cs221/apps/deepBlue.html. Accessed 2 June 2021.

  3. “History of Chess - From Early Stages to Magnus.” Chess, https://www.chess.com/article/view/history-of-chess. Accessed 2 June 2021.

  4. Lefkowitz, Melanie. “Chess Engine Sacrifices Mastery to Mimic Human Play.” Cornell Chronicle, 2021, https://news.cornell.edu/stories/2021/01/chess-engine-sacrifices-mastery-mimic-human-play.

  5. Lillo-Crespo, Manuel, et al. “Chess Practice as a Protective Factor in Dementia.” International Journal of Environmental Research and Public Health, vol. 16, no. 12, Multidisciplinary Digital Publishing Institute, June 2019, p. 2116, doi:10.3390/ijerph16122116.

  6. Simonite, Tom. “AI Ruined Chess. Now, It’s Making the Game Beautiful Again.” Wired, 2020, https://www.wired.com/story/ai-ruined-chess-now-making-game-beautiful/.

  7. Soltis, Andrew E. “Chess.” Britannica, 2020, https://www.britannica.com/topic/chess/additional-info#contributors.

  8. Walker, Levi. “The Anatomy of a Chess AI.” Medium, 2020, https://medium.com/the-innovation/the-anatomy-of-a-chess-ai-2087d0d565#:~:text=The minimax algorithm takes advantage,is a zero-sum game.&text=An example of a minimax,on the min. or max.