A Look at Artificial Intelligence and Deep Learning in Chess

Greg Thompson
5 min readNov 9, 2020

AI, Deep Learning, and Neural Networks

Artificial intelligence has long been a pursuit for computer engineers, and has gone through many periods of popularity over the last half century or so. Research into AI advanced heavily with the advent of microcomputers, and since then has gone through lulls, or periods of AI Winter, and surges that have led to further advances in the field of AI.

Machine learning is a subset of AI, with the general premise that a technology using machine learning will improve over time. In the world of chess computers, AI was relatively easy to achieve using supercomputers, but machine learning was much harder to implement, and is still being incorporated in different ways today. Today’s top chess engines are built using neural networks, which act similar to human brains, and are quite remarkable. Let’s jump into some famous (and maybe not-quite-famous) chess computers and engines over the last 50 years that have incorporated AI and machine and deep learning.

Boris

Boris was a chess computer that was developed in 1977. It came in a wooden box and featured a whopping 2.5 KiB of ROM and 256 bytes of RAM. It had an approximate ELO rating of 1100. For reference, there are at least 50 children 7 years or younger in the US today with ELO ratings of 1100 or higher.

I’d like my chances against a chess computer if I had a time machine back to 1977.

Three years after Boris was released, Carnegie Mellon University created the Fredkin Prize, a $100,000 prize for the creators of the first chess computer that could beat the human world chess champion in a match.

Deep Blue

Deep Blue is a chess engine developed by IBM that debuted in 1996 after development for about 10 years under different names. Deep Blue, with the help of a computing system with a 120 MHz microprocessor specifically outfitted to play chess, is able to evaluate around 200 million positions per second when considering moves. Deep Blue is also outfitted with a library of opening positions, games played between grandmasters, and an endgame database.

A simple premise of chess engines is that they evaluate many different moves, opponent moves in response to each move, and so on, to a sufficiently deep level where the strength of a move can be analyzed. During Game 6 of the 2018 World Chess Championship between Fabiano Caruana and Magnus Carlsen, a powerful chess computer quickly announced a missed checkmate in 30 moves by Caruana after a draw by agreement. Neither player could understand the checkmate when told about it, and neither could the grandmasters analyzing the game, even with the help of the computer.

One popular search algorithm for moves used by supercomputers is Alpha-beta pruning, a process that aims to decrease possible nodes that the computer will evaluate, with an aim of minimizing the loss if the worst case scenario would happen for any given move. Its strength comes from the fact that it removes branches of moves once it finds a move that is undesirable for the computer to make.

Back to Deep Blue. In 1996, Deep Blue Played a match against World Champion Gary Kasparov and won the first match, but lost three of the remaining five matches and drew the other two. When they replayed in 1997 after improvements to Deep Blue, the six game match started with five draws, before Deep Blue won the decisive sixth game and the match.

Kasparov vs. Deep Blue - Round 2

Stockfish

Stockfish is a super cool free and open source chess engine that anyone can download and use on their computer. It was incredibly strong and remained among the strongest chess engines for quite some time after its release in 2008. One neat feature of Stockfish is its use of transposition tables. Transposition tables to cache the strengths of calculated moves, so that if a series of alternate moves would result in the same position on the board, the table can be referenced for the strength of the position instead of the position’s strength being re-analyzed. The largest size transposition table Stockfish is able to use is 32 TB.

One advantage Stockfish holds, other than having 10 years of hardware advancements over Deep Blue, is its ability to change how it plays based on results of massive amounts of games that it plays. In 2013, Stockfish released a testing framework named Fishtest, where volunteers have donated over 4000 years of CPU time and have played almost 2.5 billion games in the time since then that Stockfish has used to revise its playing code.

Just this year, in September 2020, Stockfish’s twelfth version was released, which incorporates neural networking into Stockfish’s powerful engine.

AlphaZero

AlphaZero was developed by DeepMind — a UK based AI company that was bought by Google in 2014 has since released some of the most powerful board game engines in history. In December 2017, AlphaZero was released, with nothing but the rules of chess imprinted on it. Less than 24 hours later, after playing games only against itself, AlphaZero was playing at a level comfortably higher than Stockfish, and was able to defeat it in a 100-game match with 28 wins, 0 losses, adn 72 draws.

AlphaZero was able to achieve this incredible feat by using neural networks, which is a group of artificial nodes that communicate similarly to how a human brain communicates. Neural networks are incredible at decision making, as computers gain the ability to process information based on making connections. AlphaZero was met with both positive and negative review in the chess community, and has a playing style unlike any other chess engine.

Conclusion

I hope you enjoyed that brief overview of AI and machine learning in chess engines. What do you think will happen first — a chess engine solves the game of chess, or goes rogue and tries to take over the world?

--

--