Running Your Own Engine Match: Testing Claims Instead Of Believing Them

In short Engine strength claims are trivially testable at home with a fixed opening book and a hundred fast games, and doing it once permanently changes how you read forum arguments about engines.

Route ahead 9 sections
  1. Why bother
  2. What you need 1 min
  3. The experiment: does Stockfish at 100ms beat Stockfish at 50ms? 1 min
  4. What the output looks like 2 min
  5. Now test something people actually argue about 2 min
  6. The error bar rule you need to memorise 3 min
  7. Traps that quietly ruin a match 3 min
  8. Turning it into something for your own chess 4 min
  9. What to do after one match 5 min

Somewhere on a chess forum right now, a person is saying that Engine A “crushes” Engine B, or that a new Stockfish build is “obviously stronger”, or that some setting makes Stockfish “play more human”. Nobody in the thread has run a single game. You can do better in an evening, and once you have, you will never read one of those threads the same way.

The tool is cutechess-cli, the command-line sibling of Cute Chess. It is free, it runs on Windows, macOS and Linux, and it plays engines against each other automatically while you make tea. This post walks through a real test, with real numbers, so you can reproduce it.

Why bother

If you are rated 1400, you probably use Stockfish as an oracle. It says +1.8, you feel bad. It says 0.00, you feel relieved. But you have never asked the oracle a question where you could check the answer.

An engine match is the simplest such question. Two configurations play each other from the same starting positions, and the scoreboard tells you which is stronger. It cannot be argued with, because you ran it. (It can be misread, which is the second half of this post.)

If you want the background on how Stockfish, Leela, Maia and NNUE differ in design, the pillar piece Engines Compared: Stockfish, Leela, Maia, NNUE covers it. Here we only care about one thing: how to find out for yourself.

What you need

  • cutechess-cli (from the Cute Chess releases on GitHub).
  • Stockfish, any recent release binary. Pick the build matching your CPU (avx2 or bmi2 is typical).
  • An opening book in EPD or PGN form. The common choice is the 8moves_v3.pgn set, or the UHO (Unbalanced Human Openings) books that the Stockfish testing community uses. Any set of a few thousand short, roughly balanced lines works.

Why a book at all? Because without one, two deterministic engines will play the same game again and again, and a hundred games become one game copied a hundred times. The book injects variety. Each opening is also played twice with colours swapped, so no side gets a lucky start.

The experiment: does Stockfish at 100ms beat Stockfish at 50ms?

Start with a claim nobody doubts, because a test that confirms the obvious tells you your setup works. The claim: doubling thinking time makes an engine stronger.

Here is the command (one logical line, split with backslashes for reading):

cutechess-cli \
  -engine name=SF_100ms cmd=./stockfish option.Threads=1 option.Hash=64 st=0.1 \
  -engine name=SF_50ms  cmd=./stockfish option.Threads=1 option.Hash=64 st=0.05 \
  -each proto=uci timemargin=200 \
  -openings file=8moves_v3.pgn format=pgn order=random plies=16 \
  -games 2 -rounds 50 -repeat \
  -concurrency 4 \
  -draw movenumber=40 movecount=8 score=10 \
  -resign movecount=4 score=800 \
  -pgnout match1.pgn \
  -ratinginterval 10

What matters in there:

  • st=0.1 gives each move a fixed 0.1 seconds. Simple, but see the caveats below.
  • -games 2 -rounds 50 -repeat means 50 openings, each played from both colours: 100 games.
  • -concurrency 4 runs four games at once. Keep Threads=1 per engine and keep concurrency below your physical core count, or the timing gets noisy.
  • -draw and -resign adjudicate dead-drawn and decided games so the match finishes faster.
  • -pgnout saves every game, which you will want later.

What the output looks like

After roughly ten minutes on a four-core laptop, the end of the run looked like this:

Score of SF_100ms vs SF_50ms: 41 - 12 - 47  [0.645] 100
...      SF_100ms playing White: 22 - 5 - 23  [0.670] 50
...      SF_100ms playing Black: 19 - 7 - 24  [0.620] 50
Elo difference: 105.2 +/- 52.1, LOS: 100.0 %, DrawRatio: 47.0 %
Finished match

Read it left to right. 41 wins, 12 losses, 47 draws. Score is 41 + 47/2 = 64.5 points out of 100. A 64.5% score converts to about +105 Elo.

Now the part that changes how you read forums: the error bar. It says +/- 52. So the honest statement is “somewhere between about +53 and +157”, not “+105”. A hundred games is a coarse instrument.

LOS means likelihood of superiority: the chance that the first engine really is the stronger one. Here it is effectively 100%, which is the answer you want. Doubling time helps. Good, the rig works.

Now test something people actually argue about

Take a claim from the wild: “Hash size barely matters at short time controls.” Run 16 MB against 1024 MB, both at the same 100 ms per move, and you will likely get something like:

Score of SF_Hash1024 vs SF_Hash16: 27 - 24 - 49  [0.515] 100
Elo difference: 10.4 +/- 49.8, LOS: 66.2 %, DrawRatio: 49.0 %

A +10 with an error bar of ±50 means: nothing detected. Not “no difference exists”. Just that your test could not see one. A forum poster who ran this and announced “hash makes Stockfish stronger, I measured +10!” has misread a coin flip. A forum poster who announced “hash does nothing, I measured +10, which is nothing” is equally wrong in the other direction.

The error bar rule you need to memorise

Roughly, for 100 games with ~45% draws, the 95% error bar is about ±50 Elo. Error shrinks with the square root of games:

GamesApprox. error (95%)Smallest difference you can trust
100±50~100 Elo
400±25~50 Elo
1,600±12~25 Elo
10,000±5~10 Elo

To halve your uncertainty you need four times the games. This is why Stockfish developers on Fishtest play tens of thousands of games to approve a patch worth a few Elo. A hundred games at home is for large effects only, and that is fine: most forum claims are loud (“crushes”, “destroys”), so they should be visible even at that resolution. If they are not, the claim is weaker than the poster made it sound.

Traps that quietly ruin a match

  1. Too few openings. Replaying the same ten lines and counting 100 games is really 10 games’ worth of variety.
  2. Oversubscribed CPU. Eight concurrent games on four cores means one engine may get starved. Check timemargin losses (“loses on time”) in the log; there should be none.
  3. Fixed time per move versus real clocks. Use tc=10+0.1 (10 seconds plus 0.1 increment) for something closer to real play. The result can differ, especially for engines that manage time differently.
  4. Stopping early when ahead. Decide the game count first. Peeking at a running score and stopping when it looks good will manufacture false positives.
  5. Comparing different hardware. A number from your laptop is not comparable to a number from someone else’s desktop. Only head-to-head results mean anything.
  6. Treating Elo as human rating. +105 between two engine settings says nothing about your Lichess rating. Engine Elo is its own pool.

Turning it into something for your own chess

The match is not only a debunking tool. Open match1.pgn in any viewer and look at the games the weaker side lost. At 50 ms, the losing games often show the shorter-thinking engine misjudging a quiet position, a slow plan or a long endgame. That pattern is itself a lesson: engines err where positions are hard, and so do you.

Two practical ways to use the file:

  • Filter for decisive games, then step through the move where the evaluation swung by more than 1.0 pawn. Ask yourself what you would have played before reading the engine’s choice. This is a ready-made set of critical positions that are not from your own games.
  • Run a match between Stockfish at full strength and Stockfish with option.UCI_LimitStrength=true option.UCI_Elo=1500. Watch how the weakened side loses: not by random blunders but by occasional bad moves in otherwise normal games. That is a more honest picture of “playing like a 1500” than most opponent-bot marketing.

What to do after one match

Pick a claim you have seen in the last month. Write down the prediction before you run anything: which side wins, and by roughly how much. Run 100 games. Compare the result with your prediction and with the error bar.

You will probably find at least one belief you held was too strong, and at least one internet loudmouth who was simply guessing. Both findings are useful. The next time someone posts “+30 Elo, trust me”, you will know to ask how many games, which openings, and what the error bar was.