The literature about and around chess is too long to enumerate in an article of a thousand words, and this is clearly not my intent. If you want to learn chess, there are so many good books around, it is hard to pick just one. There are, however, fewer books explaining the art of how to teach a computer to play chess; and the one chosen for this issue of the Library section does a magnificent job at precisely that.
The name of David Levy might not ring a bell immediately, but there cannot be any quick incursion in the world of chess programming without it popping up, and repeatedly: after all, he has written more than 40 books about the subject of chess computer programming.
The Library book of this month is one of those works: “How Computers Play Chess”, published in 1991 and written by David Levy and Monty Newborn.
The late 80s were an interesting moment for computer chess. Garry Kasparov, who reigned as world chess champion from 1985 to 2000, was busy defending the human crown against a cohort of ever more powerful computers by IBM. This invictus status would eventually disappear in 1997. But back in 1989, the potential of a computer beating a human being in the sacrosanct game of chess was still a conjecture, at best.
For Levy and Newborn, the stakes were clear, and the title of the first chapter of the book says it all: “The Challenge is World Champion Kasparov”. Said chapter describes in detail the match between a first iteration of a chess supercomputer by IBM, the less well-known “Deep Thought”. It was a strong contender, having defeated quite a few grandmasters along the way (including the aforementioned Levy), but was no match for Kasparov in August 1989. The same team, led by ACM Grace Murray Hopper Award winner Feng-hsiung Hsu, would strike back with Deep Blue less than seven years later.
The book goes on to describe the history of chess computers, going as back as Babbage, and following with early efforts by Zuse and Shannon. The evolution of chess game engines is studied with examples from both sides of the Berlin Wall.
(Kids: remember that this book was written around the final times of the Cold War, and there were geopolitical arguments at play in every field of human knowledge, including chess and artificial intelligence. If you do not believe me, just read about the highly publicized game of Boris Spassky versus Bobby Fischer in Reykjavík in 1972 for proof.)
After this historical introduction, the book dives into more and more interesting implementation details: opening and endgame databases, coding strategies, search algorithms, and even an evaluation of current (as of 1991) chess programs and software packages on the market.
There is, however, a fabulous thing about this book: each famous match between humans and computers, in every generation of chess engines, is illustrated by its corresponding sequence of moves in standard notation. The idea being that, to understand the growing capabilities of chess engines, there is no better way than to see how good (or bad!) these engines could play at every stage of history, from the late 1950s to the early 1990s.
(Spoiler alert: the almost exponential increase in ability of those engines was nothing short of outstanding.)
It is through this progression that we discover the evolution of chess engines; and at the same time, we can grasp some sense of the subjective evaluation of good and bad moves (typically highlighted with !
or ??
signs throughout the text, as is usually done), and ironically enough, learn some good chess strategies along the way.
Both Levy and Newborn know what they are talking about. David Levy is a skilled player, who has regularly challenged the most powerful chess programs of their time: after winning against Chess 4.7 in 1978, and against the powerful Cray Blitz for the Cray supercomputer in 1984, he was defeated by Deep Thought in 1989. On the other hand, Monty Newborn is the former chairman of the Computer Chess Committee of the Association for Computing Machinery (ACM) and a professor of computer science at McGill University in Montreal.
After the blunder and defeat of Russian grandmaster Vladimir Kramnik against Deep Fritz in 2006, an article on the New York Times quoted:
Today’s outcome may end the interest in future chess matches between human champions and computers, according to Monty Newborn, a professor of computer science at McGill University in Montreal. Professor Newborn, who helped organize the match between Mr. Kasparov and Deep Blue, said of future matches: “I don’t know what one could get out of it at this point. The science is done.”
It is worth noting that Kramnik was well-versed in anti-computer tactics to win the game, as he had shown a few years earlier, but that was not enough in 2006. According to Wikipedia,
Newborn was belatedly correct; as of 2021, that was the last serious attempt by a world-class player to defeat a top chess machine/program.
Endgame, really.
The world has changed a lot since the publication of “How Computers Play Chess”. Kasparov has been beaten by Deep Blue. IBM went on to win at Jeopardy!. And Lee Sedol has lost against AlphaGo. This is why Dr. Levy has shifted his attention to other problems brought by artificial intelligence, like the possibility of marrying robots in Massachusetts in 2050, and other crunchy (and NSFW) subjects. Dr. Levy likes to bet about the future, clearly.
If you are still interested in the latest developments around game engine programming, here go two more recommendations from a sea of extraordinary books: “Guide to Programming a Chess Engine” by Adam Berent, reflecting his own step-by-step process of creating a chess engine in C# from 2008 to 2016. And then, akin to our modern times, “Neural Networks for Chess: The magic of deep and reinforcement learning revealed”, by Dominik Klein (2022), explaining the inner workings of new, machine learning-based engines such as AlphaZero, Leela Chess Zero, and Stockfish NNUE, together with an interesting comparison with brute-force approaches such as that of Deep Blue.
Is programming your own chess engine a way to gain some mastery in the game? Yes and no; it would make wonders to your programming skills, no doubt about that; but I do believe that a healthy and regular dose of chess challenges with actual human beings, preferably in front of a physical chessboard, would have a healthier effect in your psyche. We are social beings, after all; let us not forget that aspect, and let us cultivate it, too.
Of course, if what you want are books about learning how to play chess, I do have some recommendations, starting with “Bobby Fischer Teaches Chess”, one of the biggest bestsellers of its genre, by none other than one of the greatest chess players of the 20th century. I can also heartily recommend “How to Win At Chess: The Ultimate Guide for Beginners and Beyond” by Levy Rozman, a recent but very interesting addition to my chess bookshelf, written by a very well-known and popular streamer. Finally, I can also recommend at least one book from the extensive written works of legendary champion José Raúl Capablanca; in this case, “Arte y Secretos del Ajedrez”, a wonderful and relatively short introduction to the game, in Spanish this time.
This month’s Library book is “How Computers Play Chess” by David Levy and Monty Newborn, and remember: it is best read with a real chessboard by your side.
Cover photo by the author.