How Chess Engines Outthink Human Grandmasters at Every Level

Stockfish evaluates millions of positions per second using minimax and alpha-beta pruning. AlphaZero learned from scratch with neural networks. Here's how engines surpass human play.

The InfoNexus Editorial TeamMay 20, 20269 min read

Deep Blue Beat Kasparov in 1997. Today's Engine Would Beat Deep Blue in Minutes

When IBM's Deep Blue defeated Garry Kasparov in their 1997 rematch—the first time a computer had beaten a reigning world champion in a full match under tournament conditions—it evaluated approximately 200 million positions per second using specialized chess hardware. Kasparov's estimated playing strength was around 2800 Elo. Deep Blue played at approximately 2700–2750 Elo. Today's strongest engines, Stockfish and Leela Chess Zero, operate at estimated Elos above 3500—roughly 800 points above the best human players in history. The gap between human and machine chess ability is now so large that games between top engines and top humans are not competitive. Understanding why requires examining both the algorithmic foundations and the revolutionary shift that neural networks introduced.

The Position Evaluation Problem

Chess has approximately 10^43 legal positions and a game tree of roughly 10^120 possible games. No computer can search the entire game tree—the number exceeds the atoms in the observable universe. The fundamental challenge of chess programming is: given a position, determine who is winning and by how much, and identify which moves are worth exploring deeper.

The evaluation function assigns a numerical score to any position: positive scores favor white, negative scores favor black. Classical engines used hand-crafted evaluation criteria:

  • Material count (queen = 9, rook = 5, bishop/knight = 3, pawn = 1 in rough units)
  • Piece mobility (more squares available = better)
  • King safety (shelter from attack)
  • Pawn structure (doubled pawns, isolated pawns, passed pawns)
  • Control of key squares, especially the center
  • Rook placement on open files

Centuries of human chess theory informed these heuristics. The more accurately the evaluation function reflected true chess strength, the better the engine played—even with the same search algorithm.

Minimax: The Core Algorithm

The minimax algorithm assumes both players play optimally. White tries to maximize the evaluation score; black tries to minimize it. At each position, the engine recursively evaluates all legal moves to a specified depth, assigns the resulting positions their evaluation scores, and propagates the best scores backward: at white's turn, take the maximum; at black's turn, take the minimum. The move that leads to the best position under optimal play is the minimax optimal move.

A simple minimax search to depth 6 in a typical chess position requires evaluating roughly 10^6 leaf nodes (positions). At depth 10, this grows to approximately 10^9. Deep Blue searched to depth 6–20 with hardware acceleration. Even at depth 6, this was beyond human planning horizon.

Alpha-Beta Pruning: The Critical Efficiency Gain

Minimax, as described, evaluates many positions that cannot possibly affect the final decision. Alpha-beta pruning eliminates these irrelevant branches. The algorithm maintains two values: alpha (the best score white has secured so far) and beta (the best score black has secured so far). When a branch's score falls outside the alpha-beta window—meaning it cannot influence the final decision—the entire subtree is pruned without evaluation.

In practice, with good move ordering (searching likely-best moves first, making pruning more effective), alpha-beta pruning reduces the search space from O(b^d) to roughly O(b^(d/2))—equivalent to searching twice as deep in the same time. A well-implemented alpha-beta search effectively doubles the engine's search depth at no computational cost. This single optimization is arguably the reason classical engines became competitive with humans before neural networks entered the picture.

Stockfish: Classical Engine Architecture

Stockfish, the strongest classical engine and consistently one of the top two engines overall, uses a highly optimized implementation of alpha-beta search with numerous enhancements:

TechniqueFunctionEffect
Null-move pruningSkips moves to estimate position value quicklyIdentifies clearly bad positions without full search
Late move reductions (LMR)Reduces search depth for moves sorted as unlikelySpends computation on promising moves
Transposition tableStores previously evaluated positionsAvoids re-evaluating positions reached by different move orders
Aspiration windowsNarrow initial alpha-beta window; re-search if score falls outsideFaster search when initial estimate is accurate
NNUE evaluation (since 2020)Neural network evaluation of positionsFar more accurate evaluation than hand-crafted heuristics

Stockfish 16, released in 2023, added NNUE (efficiently updatable neural network) evaluation, replacing the hand-crafted evaluation function with a neural network trained on millions of engine self-play games. The NNUE network runs efficiently because it updates incrementally as pieces move rather than re-evaluating from scratch—a critical optimization that preserves the speed advantages of classical search.

AlphaZero: The Neural Network Approach

DeepMind's AlphaZero, described in a landmark 2017 paper in Science, took a fundamentally different approach. Given only the rules of chess and no domain-specific knowledge (no hand-crafted evaluation, no opening theory, no endgame databases), AlphaZero learned to play chess entirely through self-play using reinforcement learning. Starting from random play, it trained a deep neural network over approximately 9 hours of computation on Google's TPU hardware.

AlphaZero replaced minimax with Monte Carlo Tree Search (MCTS) guided by the neural network. Rather than exhaustively evaluating all branches to a fixed depth, MCTS samples promising branches guided by the network's probability estimates. The network simultaneously estimates both the probability of each move being optimal and the expected outcome from the current position.

  • AlphaZero searched roughly 80,000 positions per second—orders of magnitude fewer than Stockfish's 70 million
  • In a 100-game match against Stockfish 8, AlphaZero won 28 games, drew 72, and lost 0
  • AlphaZero's games exhibited strategic patterns—prolonged pawn sacrifices for positional compensation—that grandmasters found aesthetically striking and analytically instructive
  • Leela Chess Zero (Lc0) replicates AlphaZero's architecture as an open-source project and ranks among the top engines in computer chess competitions

The Elo Gap: Human vs. Machine

The disparity between human and engine performance makes quantitative comparison difficult because standard Elo systems assume competitors can play each other regularly under the same conditions.

Player/EngineEstimated Peak EloEra
Magnus Carlsen (human)28822014 (all-time record)
Garry Kasparov (human)28511999
Deep Blue (IBM)~27501997
Stockfish 16~3550+2023
Leela Chess Zero~3500+2023

At these disparities, human grandmasters—even the world's best—win essentially zero games against top engines under tournament conditions. The engine plays at a level so far above human capacity that its moves appear counterintuitive even to experts, who often cannot evaluate them correctly until dozens of moves later. This inverted relationship—machines teaching humans rather than the reverse—now drives opening preparation at the elite level, where novelties discovered by engines dominate modern grandmaster play.

chess-enginesartificial-intelligencesoftwaregame-theory

Related Articles