How Stockfish Evaluates Chess Positions: A Deep Dive

November 26, 20259 min read

What is Stockfish?

Stockfish is the world's strongest open-source chess engine. It's used by professionals, amateurs, and analysis platforms (including chess.koz.tv) worldwide. But how does it actually evaluate chess positions?

The Basics: How Chess Engines Think

Chess engines don't "understand" chess like humans do. Instead, they:

  1. Generate possible moves - List all legal moves in a position
  2. Search ahead - Explore move sequences (variations)
  3. Evaluate positions - Assign numerical scores to positions
  4. Select the best move - Choose the move leading to the best evaluation

Let's dive into each component.

Search: Looking Ahead

Alpha-Beta Search

Stockfish uses alpha-beta pruning, an optimized version of minimax search:

  • Minimax: Assume both players play optimally
  • Alpha-Beta: Skip variations that can't affect the final decision

This allows Stockfish to search much deeper than checking every possible move.

Depth and Speed

At depth 20, Stockfish might examine billions of positions. Modern chess engines on fast hardware can search 50+ million positions per second.

Selective Search

Not all moves are equal. Stockfish spends more time on:

  • Captures and checks
  • Moves that changed evaluation significantly
  • Promising variations from previous searches

Evaluation: What Makes a Position Good?

Traditional Evaluation (Classical)

Older Stockfish versions used hand-crafted evaluation with components like:

Material Count

Pawn = 100
Knight = 320
Bishop = 330
Rook = 500
Queen = 900

Positional Factors

  • Piece activity and mobility
  • Pawn structure (doubled, isolated, passed pawns)
  • King safety
  • Control of key squares
  • Piece coordination

Game Phase

Different factors matter in opening vs. endgame. A centralized king is terrible in the middlegame but excellent in the endgame.

NNUE: Neural Network Evaluation

Modern Stockfish (including version 17) uses NNUE (Efficiently Updatable Neural Network):

What is NNUE?

A specialized neural network trained on millions of positions, designed to be extremely fast to evaluate.

How it Works

  1. The board position is converted to input features
  2. These feed through network layers
  3. The network outputs an evaluation score

Why NNUE is Better

  • Learns patterns too complex to hand-code
  • Picks up subtle positional factors humans identified but couldn't quantify
  • Updates efficiently (only recalculates changed parts of the position)

Training

NNUE is trained on:

  • Self-play games between strong engine versions
  • Evaluations from very deep searches
  • Millions of positions with known outcomes

Understanding Stockfish Output

Centipawn Evaluation

Stockfish reports evaluations in centipawns:

  • +1.00 = White is ahead by 1 pawn worth
  • -2.50 = Black is ahead by 2.5 pawns worth
  • 0.00 = Roughly equal

Mate Scores

When mate is found:

  • M5 = Mate in 5 moves
  • -M3 = Getting mated in 3 moves

Principal Variation (PV)

The sequence of moves Stockfish considers best for both sides:

+1.25  Nf3 d5 e3 Nf6 d4 e6 Bd3 c5

Depth and Accuracy

What Depth Means

Depth = number of half-moves (plies) the engine searches:

  • Depth 10 = 5 moves for each side
  • Depth 20 = 10 moves for each side

Higher Depth = More Accurate

At higher depths, Stockfish:

  • Finds deeper tactics
  • Evaluates positions more accurately
  • Discovers long-term strategic factors

Diminishing Returns

Most of the benefit comes from the first 15-20 ply. Going from depth 20 to 40 rarely changes the evaluation dramatically except in very tactical positions.

Why Stockfish Isn't Perfect

Horizon Effect

Sometimes the best move requires seeing further than the search depth:

  • A tactic works but loses to a counter-tactic at depth 25
  • Depth 20 search thinks it's good

Fortress Positions

Stockfish might evaluate a drawn fortress as winning because it can't "see" that progress is impossible.

Positional Complexity

Some positions require understanding beyond pattern recognition - plans that unfold over 20+ moves in non-forcing sequences.

How chess.koz.tv Uses Stockfish

Server-Side Analysis

We run Stockfish 17 on our servers, so you get:

  • Fast analysis without using your device's resources
  • Consistent depth (15+ for all positions)
  • Higher depth (20+) for cached positions from Lichess database

Multi-PV Analysis

We analyze the top 3 moves in each position, showing you alternatives, not just the single best move.

Move Classification

Based on centipawn loss, each move is classified:

ClassificationCentipawn Loss
Best/Brilliant0-10
Good10-30
Inaccuracy30-100
Mistake100-300
Blunder300+

Tips for Using Engine Analysis

Don't Just Look at the Best Move

Understand WHY it's best. What threat does it create? What does it prevent?

Consider Multiple Lines

The second and third-best moves are often perfectly playable. Understanding why they're slightly worse is valuable.

Context Matters

A "blunder" in a lost position might be the practical choice. The engine's best move might also lose, just more slowly.

Use Appropriate Depth

For most analysis, depth 15-20 is sufficient. Very deep analysis (30+) is only necessary for theoretical novelties or positions with long tactical sequences.

Conclusion

Stockfish combines sophisticated search algorithms with neural network evaluation to play near-perfect chess. Understanding how it works helps you use analysis tools more effectively.

When you analyze on chess.koz.tv, you're harnessing the same technology used by world championship contenders - completely free.

Start analyzing and see Stockfish in action on your games.

Ready to Put This Into Practice?

Analyze your games for free with Stockfish 17 - no signup required.

Start Analyzing Your Games