Chess Engine Online

The Horizon Effect

An engine can hide a bad outcome by pushing it past the end of its search, usually by giving material away. How to spot an evaluation that is doing this.

· 3 min read

Every search stops somewhere. Whatever is happening at that boundary gets scored as though the game paused there, and a position in the middle of a sequence can look very different from how it ends.

The horizon effect is what happens when a search prefers a line specifically because the bad part falls just outside it.

The classic illustration

A piece is trapped and will be lost in three moves. The engine, searching six plies, finds a line where it gives away two pawns with checks, delaying the capture until move four. Now the loss of the piece is beyond the horizon, and the engine scores the position as two pawns down instead of three.

Two pawns is better than three, so it plays the checks. The piece is still lost, and now the pawns are gone as well.

Nobody watching would make that trade. The engine is not being stupid; it is answering the question it was asked, which is what the position looks like six plies from now.

What fixed most of it

Two techniques, both standard for decades.

Quiescence search refuses to score a position while captures are still available. When the main search runs out, a secondary search continues through captures and checks until things settle. That removes the crude version, where a search stopped mid-exchange and counted material it was about to lose.

Extensions give more depth to forcing lines. Checks, captures and single-reply positions are searched further than quiet ones, so a sequence of checks does not gain the attacker any horizon at all.

Between them, the textbook example above will not fool a modern engine at any reasonable depth.

What survives

The version that remains is positional and much harder to see.

Situation What the engine reports What is true
A pawn given to delay a bind Slight advantage The bind is decisive, six moves later
An exchange sacrifice to postpone a passed pawn Roughly equal The pawn queens outside the horizon
A repetition dodged by a weakening move Small edge The weakness costs more than the repetition

The pattern in each is the same. The engine avoids a bad thing it can see by accepting a smaller bad thing now, when the bad thing it can see was not actually avoidable.

How to detect it

The reliable test is stability across depth, and it takes seconds.

Analyse the position at increasing depths and watch the number. An evaluation suffering from the horizon effect deteriorates as depth increases, often sharply and at one specific depth, which is the moment the consequence comes into view. A sound evaluation does not do that.

The second test is to play the engine's line out and look at the resulting position with fresh eyes. If the final position of a line has your pieces scattered and your opponent's coordinated, and the evaluation still says you are fine, search that final position on its own. Frequently it reports something much worse, which means the original assessment was carrying an assumption it could not support.

Why this matters for your own analysis

The practical consequence is a habit rather than a piece of knowledge. When an engine tells you a move is good and your instinct says otherwise, do not simply defer. Search deeper, and search the position at the end of the line separately.

Most of the time the engine is right and your instinct needs updating. Occasionally the engine is looking at a wall six moves away and reporting the view up to five.

Common questions

What is the horizon effect in chess?
A search that stops after a fixed number of moves can be fooled into preferring a line where the bad news happens just past that point. The engine delays an unavoidable loss with checks or sacrifices until it falls outside what it can see, then reports the position as better than it is.
Do modern engines still suffer from it?
Yes, though far less. Quiescence search, which extends the search through captures and checks before scoring a position, removes the crude version. The subtle version survives in positions where the decisive consequence is positional rather than tactical.

Try it on your own position

The analysis board runs the same engine in your browser, free. The app adds what a web page cannot: reading a position straight from a photograph, saved boards, and analysis with no connection.

Download Chess Engine for Stockfish on the App StoreGet Chess Engine for Stockfish on Google Play

Related