Skip to content

Opening Aliases

Status: TEMPLATE. Sections below are scaffolds for collaborative authoring. This doc will eventually carry the full name → ECO table; for now we’re sketching the resolution rules and the taxonomy of opening names we support.

User-facing opening names (e.g., “Sicilian Najdorf”) map to ECO ranges (e.g., B90-B99). This doc defines the canonical map and the resolution rules. It’s chess-domain reference data, not architectural design.

The map is consumed by frontends and translated to the eco_in(range) header predicate (see PREDICATE-LIBRARY.md).

Cover: name-to-ECO is chess-domain reference data that grows and gets corrected over time; separating it from the predicate spec lets it be sourced/curated independently. Different shape of document — a reference table, not a design.

Cover: how name strings are matched against the alias table.

  • Case-insensitive. "sicilian" == "Sicilian" == "SICILIAN".
  • Whitespace normalized. Multiple spaces collapse; leading/trailing trimmed.
  • Hyphens / dashes treated as spaces. "Caro-Kann" and "Caro Kann" both resolve.
  • Most-specific match wins. "Sicilian Najdorf" resolves to B90-B99, not the more general "Sicilian" B20-B99.
  • Unrecognized name → error (no silent fallback to a too-broad range).

Open question: do we support partial matches? "Najdorf" alone — resolve to Sicilian Najdorf, or require the full “Sicilian Najdorf”? The risk: “Najdorf” could also refer to the Najdorf Defense in the French (it doesn’t, but the principle).

Open question: do we surface ambiguous matches (multiple opening names share a substring)? "king's" could match “King’s Indian”, “King’s Indian Attack”, “King’s Gambit”, “King’s English”.

Major opening families (table — to fill)

Section titled “Major opening families (table — to fill)”

Cover: the canonical name → ECO-range table. Authoring this is the bulk of this doc’s eventual content. Group by ECO letter for clarity.

Open list:

  • English — A10-A39
  • English Symmetrical — A30-A39
  • Reti — A04-A09 (subset)
  • King's Indian Attack — A07-A08
  • Bird's Opening — A02-A03
  • Sokolsky (1.b4) — A00
  • Larsen's Opening (1.b3) — A01

B — Semi-open games (1.e4 not followed by 1…e5)

Section titled “B — Semi-open games (1.e4 not followed by 1…e5)”

Open list:

  • Sicilian — B20-B99
  • Sicilian Najdorf — B90-B99
  • Sicilian Dragon — B70-B79
  • Sicilian Scheveningen — B80-B89
  • Sicilian Sveshnikov — B33
  • Sicilian Taimanov — B40-B49
  • Caro-Kann — B10-B19
  • Pirc — B07-B09
  • Modern — B06
  • Scandinavian — B01
  • Alekhine — B02-B05

Open list:

  • French — C00-C19
  • French Winawer — C15-C19
  • French Tarrasch — C03-C09
  • French Advance — C02
  • Ruy Lopez — C60-C99
  • Italian — C50-C59
  • Italian Giuoco Piano — C53
  • Italian Evans Gambit — C51-C52
  • Petroff — C42-C43
  • Scotch — C44-C45
  • Vienna — C26-C29
  • King's Gambit — C30-C39
  • Bishop's Opening — C23-C24

D — Closed games and semi-closed (1.d4 d5 / 1.d4 Nf6)

Section titled “D — Closed games and semi-closed (1.d4 d5 / 1.d4 Nf6)”

Open list:

  • Queen's Gambit — D06-D69
  • Queen's Gambit Declined — D30-D69
  • Queen's Gambit Accepted — D20-D29
  • Slav — D10-D19
  • Semi-Slav — D43-D49
  • Catalan — E00-E09 (E-section even though it’s a 1.d4 opening)
  • London — A48 + D02 (multi-ECO; transposes from A48 also)

Open list:

  • King's Indian Defence — E60-E99
  • King's Indian Sämisch — E80-E89
  • Nimzo-Indian — E20-E59
  • Queen's Indian — E12-E19
  • Catalan — E00-E09 (cross-listed)
  • Bogo-Indian — E11
  • Grünfeld — D80-D99 (cross-listed from D)

Open question: multi-ECO openings (London = A48 + D02, Catalan logged under E but also reachable via 1.d4) — does the alias resolve to a union or to one chosen range? Probably union.

Cover: where the authoritative ECO mappings come from, and how to propose corrections.

Open question: which source do we adopt?

  • ECO encyclopedia (Sahovski Informator, 1974-) — historical authority but commercial, copyrighted text.
  • Wikipedia’s chess-openings tables — open, generally accurate but not formally authoritative.
  • Lichess’s openings.tsv — open, broad coverage, used in their product. Probably the cleanest first source.
  • ChessBase’s PGN ECO-classification database — comprehensive, commercial.

Editorial approach: import Lichess’s open database, then patch corrections as users surface them. Each correction is a one-line change with a rationale comment.

Cover: cases where simple “name → range” isn’t enough.

  • Transpositional openings. “London” can be reached from both 1.d4 d5 2.Nf3 Nf6 3.Bf4 (D02) and 1.d4 Nf6 2.Nf3 g6 3.Bf4 (A48). The alias resolves to the union of both ranges.
  • Sub-sub-variations. “Sicilian Najdorf Poisoned Pawn” — depth at which we stop adding aliases. Probably 3 levels deep is sufficient for V1.
  • Personal names as openings. “Carlsen’s setup”, “Kasparov’s Sicilian” — out of scope; players don’t have ECO codes.
  • Non-ECO classifications. “Hippopotamus”, “Owen’s Defence”, “Borg” — these have ECO codes, just unusual names. Include them.

Cover: the data file format the engine reads.

Open question: where does the table live at runtime?

  • A compiled-in C array — fastest, but adding entries requires a rebuild. Suitable for the canonical set.
  • A separate openings.csv shipped alongside the binary — easy to edit, requires loading at startup.
  • Both — compiled-in canonical set + user-extensible CSV overlay.

For V1, suggest compiled-in array (the table is small enough that even the full set is < 500 entries × 50 bytes ≈ 25 KB; no startup cost).