A computer, (or engine) can play chess at a Grandmaster level, even though it’s only thinking about one move ahead. But how many moves does it calculate in advance?
The short answer is twenty or thirty, but that misses an important point: computers can evaluate hundreds of moves in the time required to make one move. One reason for this is computing power. Another lies in how computers work with numbers (and chess boards are just big grids of numbers).
Computer chess programs play by brute force; they try every possible combination of moves until they find the best one. The number of possible combinations increases exponentially as the game progresses, making them difficult—in fact, impossible—to solve using human calculation alone.
To get around this problem, computer chess programs use an algorithm called “minimax,” which looks several moves ahead and takes the move that gives the player’s side the best possible outcome. For example, if you’re one move away from losing, minimax would choose a move that ensures your loss is as small as possible.
This approach works because computers can process so many numbers so quickly. The number of possible board positions increases exponentially with each move, so it’s only necessary to look at a few possibilities to find the best ones.
If chess programs looked further than about 30 moves ahead—the point where every game ends—they’d run out of processing power before finding the solution! So while human players are good at looking far ahead, computers are better at close-ups.
Their choice is limited because every move will be part of a sequence of moves, so they can’t just choose the best one. Instead, it’s necessary to look ahead at every possible outcome from their choice and then select the best of those.
The algorithm that looks one turn ahead is called “alpha-beta pruning,” which allows minimax programs to search many possibilities in a shorter time than would otherwise be possible. Alpha-beta pruning has been around since 1972 when MIT graduate student Robert Kernighan introduced it.
Chess computers can now look 28 or more moves ahead thanks to alpha-beta pruning and other advances in programming technology. That’s enough to beat any human player, but it’s still “looking” only one step at a time.
How Many Moves Ahead Does Stockfish Think?
Stockfish is one of the best Chess engines in the world. On average, Stockfish calculates about 80 moves ahead. Depending on the amount of time the engine is given to run, Stockfish thinks as far as 100 moves ahead, but on average, it searches about half the game tree to find good moves.
Though this might seem like a tiny fraction compared to how far humans can look ahead—grandmasters are said to be able to calculate up to 30 or so moves out—it’s still remarkable for a computer program. Most programs play with less than 50% of the possible positions explored by Stockfish after the first 20 moves.
The number of possibilities is enormous, though, so Stockfish takes advantage of alpha-beta pruning to eliminate unpromising lines of play without having to calculate them out completely. This allows it to reach an impressive depth very quickly—about five or six plies on most boards—without wasting too much effort exploring fruitless lines of play.
How many moves ahead does Leela Chess Zero think?
Leela Chess Zero calculates about 20 or 30 moves ahead, though sometimes it looks as far as 40 or 50 moves. That’s just enough to give a competitive game against other chess engines and good human players.
It doesn’t use alpha-beta pruning because its evaluation function is tuned for positional play, taking into account threats and weaknesses over simple material evaluations such as the number of pieces on the board. As a result, Leela constantly revises its evaluation based on what moves seem most promising. This approach has led to some exciting results in practice: Leela often chooses risky or unusual-looking moves that seem to gain steam as they go along.
How Many Moves Ahead Does AlphaZero Think?
AlphaZero, the updated version of AlphaGo Zero, used various algorithms and techniques to search for many more moves ahead. It would play itself 20 million times per second during self-play training, looking 10 moves ahead in each game. Human games against world-class opponents looked as far as 28 or even 40 moves ahead—way beyond what any other existing chess engine can do.
It used a Monte Carlo tree search to determine what moves are likely to be worth considering and had two deep neural networks to evaluate positions and select moves. The deeper the neural network, the more moves AlphaZero considered.
However, without looking ahead at every possible move in advance, it would have no way of knowing that some paths lead to winning combinations or other strong results. Future chess engines built on this technology may be able to use machine learning techniques to evaluate board positions better and explore many more possibilities than was previously possible.
How Many Moves Ahead Do Chess Grandmasters think?
The peak of capability that a human can achieve in the game of Chess, Grandmasters can look as far as about 20 or 30 moves ahead. That might not seem like much compared to the unlimited possibilities you get with computers, but it’s still an enormous number of positions and options to consider.
This is partially because grandmasters know enough opening theory that they don’t have to waste time evaluating alternative play lines. Instead, they can concentrate on planning their attack and responding to threats from the opponent. Their advantage lies in understanding which positions are worth pursuing and which can be confidently ignored without hampering their plans.
Though grandmasters don’t calculate every possible move, like Maurice Ashley points out in his TED talk, they’re skilled at recognizing patterns in games that allow them to narrow down their search for promising moves quickly. They understand specific strategies will only be effective if their opponent plays a certain way, allowing them to consider only the most favorable responses.
Moreover, grandmasters have a well-developed sense of positional chess that helps them find moves that exploit weaknesses in the opponent’s position. They keep their eyes on the big picture—how all the pieces are arranged to support each other or create opportunities for future moves.
How Many Moves Ahead Does Garry Kasparov Think?
The best Chess player in history, Garry Kasparov can routinely calculate as many as 30 moves ahead. His ability to win games against weaker players with the black pieces, when he is forced to use less familiar moves, has led some scientists to believe his enormous calculating abilities are innate rather than developed. However, most grandmasters can recall specific variations or positions where they have calculated 10 or 12 moves ahead during their games just as easily as Kasparov does.
It’s important to remember that recognizing good moves is only half the battle in chess; the other half is finding a way to make those moves work out in practice. Calculating all possible outcomes of every move at the board takes so much time, and effort that even grandmasters have to rely on intuition to tell them which moves are worth considering.
The ability to calculate so far ahead is almost certainly innate and not something that can be taught—the same way Kasparov was able to teach himself the best moves for black pieces without ever having access to a chess-playing machine.
How Many Moves Ahead Does Magnus Carlsen Think?
Currently and for the past ten years, the number one rated Chess player in the world, Magnus Carlsen has said he thinks as many as eight moves ahead. When faced with an unusual move from a weaker player, he says his first reaction is to disregard it as a trap but will take it seriously if the opponent follows up with another plausible move. In those cases, he calculates as many as eight moves ahead before taking action or putting the pieces back in their starting positions and considering other possibilities.
When playing against fellow grandmasters who know what he’s going to do next, Carlsen sometimes struggles to find a way around their defenses. For that reason, chess fans expect him to have a hard time early on at this year’s tournament against players such as Vishy Anand and Veselin Topalov—both of whom have been studying him for years and know his playing style well.
In a news article from 2018, it is mentioned that Magnus can keep track of more than one opponent at a time when he calculates eight moves ahead during a game, “He would not be able to do this against two opponents with the same effort.”
Also keep in mind, despite the sophistication of chess engines in todays world, chess is not a solved game and very likely will never be.