Chess Analysis
ES
Blog

How a chess game review recognises the opening you played

A chess game review does not guess which opening you played. It looks up each position your game reaches against a dataset of named openings, and only ever shows the name of a position that actually matched it, never one that merely looks close.

Where do the opening names come from?

The names and ECO codes come from Lichess's chess-openings dataset, a public, CC0-licensed list of about 3,900 named positions, each tagged with its ECO code, the letter-and-two-digit classification from A00 to E99 used across chess publishing. The server turns that dataset into a file it loads into memory once; the list does not change from one review to the next, because these are fixed reference data, not a shifting statistic.

How does the review match your position to a name?

Every position your game reaches is turned into the same kind of fingerprint the review uses elsewhere to look positions up, and that fingerprint is checked against the dataset. A match gives the position its exact name; no match gives it none. The review never shows the name of a similar-looking position, only of the one actually on the board.

What happens when two move orders reach the same position?

Several move orders can transpose into the same position, the same pieces on the same squares reached through a different sequence of moves. When that happens, the name shown is the one belonging to the shortest of those move orders in the dataset, even when your own game took the long way round to reach it.

Does the opening name disappear once you leave the named line?

No. A game's opening is the last named position reached along its main line, searched only as far as the longest named line in the dataset goes, 36 half-moves. Once your moves leave every named line, or once that search window ends, the review keeps showing the name of the last position that matched, it does not clear it just because the game carries on past it. The opening field is empty only when no position along that search ever matched one of the roughly 3,900 named positions in the dataset, for example because of an unusual first move that is not in it.

Where do you see this today?

The Explorer shows the name and ECO code of whichever position you are looking at, and every game in your library carries the name and ECO code of the opening it reached.

Curious which opening name your own games get, and which position it stops at? Review one of your games and check the name against the position on the board.

Import a game from Lichess or Chess.com and see where it was decided.