A Panegyric For Human Chess Players
Carl Sagan, in the opening words of his 1977 bestseller book, “The Dragons of Eden”, quotes a phrase from Plato’s Phaedrus, saying “In good speaking, should not the mind of the speaker know the truth of the matter about which he is to speak?” In this occasion I ask myself the same question, and thus I start this article by stating openly that I am no expert in the game of chess (I actually think I have a negative Elo rating!) I am just a fascinated onlooker who happens to marvel at the intricacies of a game that I have never mastered, most probably never will, but one which I greatly enjoy watching and reading about.
For some weird reason we did not mention the game of chess in our article about gaming two years ago; we have, however, used the allegory represented by its quintessential board as a heading picture in three previous articles of this magazine: the one by Graham about artificial intelligence in our August 2019 issue, the title page of our Management issue or June 2021, and the one about Alan Perlis of September 2022.
Despite these clichés, chess deserves a separate issue of its own, and yet another misuse of header images with chessboards and knights. Not because we would like to debate whether it is a sport or not (we think it is), or whether because we would love to mention the names of past and present legendary chess players (we will, anyway), but because chess is at the core of the history of computer programming, and it has had (and continues to have) a timeless appeal to generations of computer scientists.
Not only that, but also because we probably owe the existence of an entire field of research called “artificial intelligence” to the humble game of chess.
In the first chapter of his 1989 book “The Emperor’s New Mind”, British Nobel Laureate Sir Roger Penrose asked the billion-dollar question: “Can a Computer Have a Mind?”
Chess-playing computers probably provide the best examples of machines exhibiting what might be thought of as ‘intelligent behaviour’. In fact, some machines have now (in 1989) reached an extremely respectable level of performance in relation to human players – approaching that of ‘International Master’. (These computers’ ratings would be a little below 2300, where, for comparison, Kasparov, the world champion, has a rating greater than 2700.)
(…)
(This difference is even more noticeable with the difficult Oriental game of ‘go’, where the number of possibilities per move is considerably greater than in chess.)
The dream of a machine playing chess is literally as old as the French Revolution. The Mechanical Turk (not to be confused with Amazon’s exploitation marketplace of the same name), later immortalized by Edgar Allan Poe, dazzled naïve kings and businessmen from 1770 to 1854 on both sides of the North Atlantic. Then came Ajeeb, who did the same from 1868 to the 1920s, following the same design pattern as its predecessor: a concealed human player inside a box. At the end of the nineteenth century, Mephisto was an electromechanical device, operated at a certain distance by a human being, a dramatic effect for unsuspecting audiences between 1868 and 1889.
The first recorded true chess automaton, but often ignored by many, was “El Ajedrecista”, built in 1912 by Leonardo Torres Quevedo in Madrid, Spain. This machine was an actual, independent electromechanical device, and it could play an endgame situation, consisting of moving a white king and a rook to checkmate a human player escaping defeat with a black king. To add praise to its wondrous design, El Ajedrecista could even signal illegal moves, and was the first machine to beat a Grandmaster (in this case, the Polish Savielly Tartakower.)
The birth of computing brought a new impetus to the long-standing dream of a machine playing chess. As explained by Silver, Hubert, Schrittwieser et al. in their 2018 paper about AlphaZero,
The study of computer chess is as old as computer science itself. Charles Babbage, Alan Turing, Claude Shannon, and John von Neumann devised hardware, algorithms and theory to analyse and play the game of chess.
They conveniently forgot to mention Konrad Zuse, however. As mentioned by Graham in a previous article of this magazine,
The Z3 was the first Turing-complete machine, and Zuse went on to write the first computer chess program in the first high-level programming language Plankalkül, a language of his own devising and an unacknowledged forerunner to ALGOL. This was all part of his PhD thesis, but having failed to pay the submission fee to the University of Augsburg he did not obtain a degree.
Later, John von Neumann and Oskar Morgenstern published in 1944 “Theory of Games and Economic Behavior”, a book which features a section (15.7) called “Application to Chess”.
Examples of games with perfect information were already given in 6.4.1.: Chess (without chance moves) and Backgammon (with chance moves). Thus we have established for all these games the existence of a definite value (of a play) and of a definite best strategies.
Claude Shannon wrote an article in 1950 for “The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science”, called “Programming a Computer for Playing Chess”, where he explains:
The chess machine is an ideal one to start with, since: (1) the problem is sharply defined both in allowed operations (the moves) and in the ultimate goal (checkmate); (2) it is neither so simple as to be trivial nor too difficult for satisfactory solution; (3) chess is generally considered to require “thinking” for skilful (sic) play; a solution of this problem will force us either to admit the possibility of a mechanized thinking or to further restrict our concept of “thinking”; (4) the discrete structure of chess fits well into the digital nature of modern computers.
According to Shannon, the thinking of von Neumann and Morgenstern effectively defines an algorithm for a machine to play chess:
These two facts imply (von Neumann and Morgenstern, 1944) that any given position of the chess pieces must be either:
(1) A won position for White. That is, White can force a win, however Black defends.
(2) A draw position. White can force at least a draw, however Black plays, and likewise Black can force at least a draw, however White plays. If both sides play correctly the game will end in a draw.
(3) A won position for Black. Black can force a win, however White plays.
This is, for practical purposes, of the nature of an existence theorem.
Shannon is aware, however, of the staggering amount of calculation such an algorithm would entail:
However, even at this figure there will be 10120 variations to be calculated from the initial position. A machine operating at the rate of one variation per micro-second would require over 1090 years to calculate the first move!
Not very practical indeed. But Shannon defined in this paper the two major requirements for a software program that plays chess:
- A data structure representing the board.
- An evaluation function to determine the best next movement.
Those are, in a nutshell, the core elements of pretty much every chess program. The first requirement is a relatively trivial problem; the second, not so much, and humans have followed two major strategies to solve it:
- Hard-coded algorithms.
- Machine learning.
Even if we, earthlings of the 21st century, would like to believe that the second option is relatively recent, history shows that both strategies grew up somewhat in parallel, until a series of AI winters stalled all progress between the 1970s to the 2010s.
Let us go back in time. An article in the July 1959 edition of the IBM Journal by Arthur Lee Samuel proposed and popularized the concept of machine learning: “Some Studies in Machine Learning Using the Game of Checkers”. But why checkers? Well, the answer is quite simple, really:
A game provides a convenient vehicle for such study as contrasted with a problem taken from life, since many of the complications of detail are removed. Checkers, rather than chess, was chosen because the simplicity of its rules permits greater emphasis to be placed on learning techniques.
“Samuel Checkers” as it is known, ran on an IBM 704, and it is the first time a machine learning system based on a reward function reached “a respectable amateur status”, according to Wikipedia, playing thousands of games against itself in order to learn the game, and this until the mid-1970s!
We will come back to the machine learning strategy; because between the 1970s to the 2000s, the reigning strategy was the purely algorithmic one, slowly growing in power thanks to Moore’s law.
During the 1970s and 1980s, in parallel to the rise of the personal computer, the gaming market was invaded by chess machines, almost forgotten small portable computers that could only play chess. The website “Chess Computer UK” celebrates and showcases them, many of which were quite popular even in my native and crisis-ridden Argentina. The Mephisto line of chess computers deserves a special mention in this category, created by a Swiss company called Saitek that was later bought by the also Swiss-born Logitech.
The aforementioned “Chess Computer UK” website also contains a section with an archive of articles published in various magazines, like our beloved Byte, from the late 1970s to 1986. Who can forget Robert Tinney’s iconic cover for the October 1978 issue of Byte Magazine dedicated to the subject of “Chess for the Microcomputer”?
Another interesting tidbit: did you know that Microchess was the one of the first successful commercial software packages in the history of personal computing? Released in 1976 for the KIM-1 microcomputer at a price of 10 dollars (around 55 USD in 2025), and later ported to other classics of the era such as the Apple II, the Commodore PET, or the TRS-80, it generated millions of dollars of revenue until the mid-90s, despite being (according to chess experts) a relatively poor implementation.
(The revenue generated by Microchess financed the development of VisiCalc, another landmark in the history of software. But I digress. Again.)
Appropriately enough, the secret plan by IBM to build the 5150 Personal Computer was called “Project Chess”. Speaking about PC software games, who can forget wonderful classics such as Chessmaster 2000 or Rebel?
(By the way, the actor featured in the cover of Chessmaster 2000, Will Hare, passed away in 1997, a few months after Deep Blue defeated Kasparov.)
Speaking about which: the road to Deep Blue was long, and its history is better told by its creators themselves, in a 2002 paper by Murray Campbell, A. Joseph Hoane, and Feng-hsiung Hsu:
Earlier efforts in building a chess machine, ChipTest and Deep Thought, took place at Carnegie Mellon University in the 1980s. In 1988 Deep Thought was the first chess machine to beat a Grandmaster in tournament play.
(…) Deep Blue defeated Garry Kasparov in the 1997 match by a score of 3.5–2.5. For this victory, the Deep Blue team was awarded the Fredkin prize for defeating the human world champion in a regulation match.
Boom. The tipping moment of centuries of research in chess-playing machines was, without a doubt, the defeat of Garry Kasparov by Deep Blue in 1997:
Deep Blue derived its chess prowess through brute force computing power. It used 32 processors to perform a set of coordinated, high-speed computations in parallel. Deep Blue was able to evaluate 200 million chess positions per second, achieving a processing speed of 11.38 billion floating-point operations per second, or flops.
That was 11.38 gigaflops of brute force. For comparison, the computer leading the TOP500 list at the time of this publication, “El Capitan”, is able a peak performance of… 2.746.30 petaflops, or 2.7463 × 106 gigaflops. On top of the Green500 list, the JEDI system (love the name) performs at almost 73 gigaflops per watt (!)
Needless to say, the Apple Silicon CPU you are probably using to read this magazine is definitely a worthy opponent for your next game. Hang tight.
To make a really long history really short, less than 20 years after Deep Blue, AlphaZero fulfilled the dream of a “Samuel Chess” once and for all: a neural network able to play chess at an unimaginable level of mastery, but without any brute force.
In lieu of a Mechanical Turk we got a Digital Turk instead, and quite a powerful one at that.
To summarize, we are in 2025, merely 8 years after AlphaGo, 27 years after Deep Blue, 65 years after “Samuel Checkers”, 112 years after El Ajedrecista, 254 years after the Mechanical Turk, and we have long left behind the time when humans could win against a machine playing chess. It is endgame, people.
(Which begs the question: what could be the next step? Quantum computers playing quantum chess? And against whom?)
These days you do not need to code your own chess engine from scratch anymore. There are libraries for Python, C, Go, Rust, Java (here is another one), JavaScript, WASM, C++, C#, and countless more in pretty much every programming language you can imagine, ready to be included in your own software.
Of course, if you are still interested in writing your own chess engine, there is an ad hoc wiki, a page in the Computer History Museum, a whole section of Wikipedia, and a free e-book for that.
Finally, if you are not a programmer but are looking to challenge a suitable computer, there is GNU Chess, Leela Chess Zero, Stockfish, Lichess, Chess.com, GNOME Chess, Fritz, macOS Chess, Crafty, Rybka, and Maia, all ready to help you get better at the game. Oh, and the GNOME Chess Clock could be useful, too.
(By the way, did you know you could not remove the Chess.app application from macOS a few years ago? Also, it has been revamped early this year, have you seen it?)
Speaking about getting better at the game, remember to save them for future reference in files using the PGN format to ensure portability; GNOME Chess and Chess.com both support it already.
At the beginning of Steven Spielberg’s (and, to a certain degree, also Stanley Kubrick’s) 2001 movie “Artificial Intelligence”, a certain Professor Hobby (played by the late William Hurt) says:
To create an artificial being has been the dream of man… since the birth of science. Not merely the beginning of the modern age… when our for-bearers astonished the world with the first thinking machines: primitive monsters that could play chess.
The silver lining of living in the future is that we can take back chess for our own human pleasure; that of the meeting of minds, the silent battle, the surprising challenge. Just us, between fellow organic members of the human race, sharing a delicate and exclusive moment, trying to outsmart each other. It is not about Elo rankings or being the next Miguel Najdorf (creator of the eponymous variation of the Sicilian defense) or the next Faustino Oro; it is about being surprised, about learning new strategies, and about sharing that strong handshake at the end of a tough match.
We humans should let machines play and replay millions of times per second those historical matches in their databases, like the Polish Immortal. Instead, we should focus in enjoying the present moment, as the pieces move through the board, unfolding new and unforeseen combinations. If possible, we should avoid playing chess with pigeons, if you see what I mean.
As a personal anecdote, I remember my professeur de mathématiques Gilbert Elia organizing chess tournaments at the Collège Sismondi where I finished high school in the early nineties. He would ask me to join, and to my pitiful answer “I don’t know how to play” he would just jokingly reply “you’ve got one hour to learn and come join us”.
Now that I think about it, I should have done exactly that. Not only for the game itself, but to have shared that moment with those people in that place.
Cover photo by Mick De Paola on Unsplash, showing the oversized chessboards and Staunton-inspired pieces in Geneva’s Parc des Bastions, where I often met professeur Elia playing chess on Sunday afternoons.