British chess masters Luke McShane and Nigel Short engage in a game of chess atop the London Eye to promote The London Chess Classic Tournament.
Marco Secchi/Getty ImagesChess is traditionally seen as a human activity that demands intellect and strategy, so how is it possible for a computer to compete? Chess AI simplifies the intricate game of chess into mathematical models and algorithms. In contrast, humans approach the game from a much more intuitive perspective.
Anyone who has watched someone learn to play chess knows that beginners start with a limited set of skills. Once they grasp the basic movement rules of each piece, they can begin "playing" chess. Early losses are often moments of discovery — "I didn’t consider that!" or "I didn't anticipate that!" are frequent reactions.
The human brain processes experiences, remembers various chessboard patterns, learns specific strategies, and gradually absorbs the subtleties of the game, one move at a time. Computers, however, don't do any of this. Instead, they don't "think" in the traditional sense — they rely on a series of calculations that help them choose the best possible move.
As computer chess engines have improved, the quality of their calculated moves has reached extraordinary levels. Today, AI-driven chess programs are the best players in the world, despite operating without any intuition. Though chess is complex, these engines depend purely on calculations. But how exactly do they do it? Let’s explore further.
Computers and Chess

AI chess may be complex, but it is built on simple, blind computation at its core.
Imagine you begin with a chessboard set up for the start of a game. Each player controls 16 pieces. Let's assume white moves first. White has 20 possible opening options:
- The white player can advance any pawn by one or two squares.
- The white player can move either knight in two distinct ways.
The white player selects one of the 20 available moves and makes it.
For the black player, the options remain identical: 20 possible moves. Therefore, black chooses one of these moves.
Now it’s white’s turn again. The next move depends on the first move made by white, but there are roughly 20 possible moves white can make based on the current position, and then black has about 20 choices to make, continuing in this pattern.
AI isn't limited to just computers. Grandmasters are harnessing its power to revolutionize the way they approach chess. Chess engines assist top players by providing deep game analysis, assessing positions and suggesting moves that even the most skilled human players might overlook. Grandmasters can feed their games into AI engines to review past games, spot missed opportunities, and consider alternative strategies. In this way, AI serves as a valuable tool to enhance human chess abilities.
This is how a computer perceives chess. It approaches the game by considering "all possible moves," constructing a vast tree representing each move, as shown here:
In this tree, white has 20 possible moves. Based on white’s move, black has 20 * 20 = 400 possible responses. Then for white, it’s 400 * 20 = 8,000, followed by 8,000 * 20 = 160,000 for black, and so on. If you were to fully develop this tree for all possible chess moves, the total number of board positions would be approximately
1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 or 10 — give or take a few.
That’s an astonishingly large number. For perspective, only 10 nanoseconds have passed since the Big Bang. There are believed to be only 10 atoms in the entire universe. When you factor in that the Milky Way contains billions of stars, and there are billions of galaxies, you can begin to comprehend just how many atoms that really is. But even that vast number pales in comparison to the number of possible chess moves. Chess truly is an incredibly complex game!
It's not feasible for any computer to calculate the entire tree. Instead, a chess computer aims to generate the tree of board positions 5, 10, or 20 moves ahead. With roughly 20 possible moves for each board position, a 5-level tree would contain 3,200,000 possible positions. A 10-level tree would have about 10,000,000,000,000 (10 trillion) positions. The depth of the tree a computer can generate depends on its processing speed. The fastest chess computers can generate and evaluate millions of positions every second.
Once the tree is created, the computer must then "evaluate the board positions." It uses a search algorithm to explore potential moves and their outcomes several levels ahead. To determine the optimal move, the AI assigns a value to each board position it encounters. This is where the evaluation function comes into play. For example, if the computer is playing as white and a specific position has 11 white pieces and 9 black pieces, the simplest evaluation function might look like this:
Clearly, this formula is too simplistic for chess—after all, not all pieces hold equal value. So, the formula could adjust the value assigned to each piece type. As the programmer refines the evaluation function, it incorporates more complexities such as the piece's position, control of the center, the king’s vulnerability to check, the opponent’s queen’s safety, and many more factors. Regardless of how intricate the function becomes, it ultimately boils down to a single number that reflects the "quality" of the given board position.
Three-Level Tree Diagram

This diagram represents a three-level tree that looks three moves ahead and evaluates the potential value of the resulting board positions.
In this tree, the computer plays as white. The black player has made a move, leaving the board position shown at the top of the tree. From there, white has three possible moves. For each of those three moves, black can then respond with three possible moves. From each of these nine resulting positions, white has two possible moves to choose from. (In real life, a position usually has about 20 possible moves, but drawing all those options would be too complex.)
To determine the best course of action, the computer analyzes the tree by working upwards from the bottom. Its calculations are designed to identify the best board positions from each of the possible moves black might make, selecting the maximum value.

Moving one level up, the computer assumes that black will always choose the worst possible move for white, thus selecting the minimum value.
At the final step, the computer takes the maximum of the top three values, which in this case is 7. This becomes the move that the computer will make. Once black plays its move, the computer repeats this entire process: it generates a new tree, evaluates all the board positions, and determines its next move.
This method is known as the minimax algorithm, as it alternates between maximizing and minimizing values as it ascends the tree. By utilizing a technique called alpha beta pruning, the algorithm can operate much faster—roughly twice as fast—and requires significantly less memory. As evident, the process is entirely mechanical, without any thought involved. It’s simply a brute-force calculation that applies an evaluation function to every possible board position within a tree of a specific depth.
What's intriguing is that this technique is quite effective. With a sufficiently fast computer, the algorithm can look far ahead and play an excellent game. If you integrate learning techniques that adjust the evaluation function based on previous games, the machine can even improve over time.
The crucial point to remember is that this process is nothing like human thinking. When we fully understand how human thought works and build a computer that uses these methods to play chess, we’ll truly have something remarkable...
The Influence of Contemporary Chess Engines
At the core of every AI-powered chess system lies a robust chess engine. This engine merges search algorithms, evaluation functions, and, in some advanced systems, machine learning methods. Chess engines have evolved into the ultimate competitors in the game, consistently surpassing even the finest human grandmasters. Whether through brute-force computation or adaptive learning, AI has transformed the traditional chess landscape, becoming an essential resource for players aiming to analyze their games and refine their strategies.
