EPD: Extended Position Description
EPD
Definition
EPD (Extended Position Description) is a compact, text-based format for describing a single chess position together with optional, machine-readable annotations. It extends the core fields of FEN by adding “opcodes” (key–value pairs) that can specify best moves, engine evaluations, test identifiers, and more. EPD was introduced in the early 1990s by Steven J. Edwards, the same author who standardized PGN and FEN.
How it’s used in chess
- Engine testing and benchmarking: Suites of positions (e.g., tactics or endgames) are stored as EPD with directives like best move (
bm) or avoid moves (am), enabling automated scoring. - Analysis exchange: Tools and GUIs attach evaluation data—centipawn scores (
ce), principal variations (pv), analysis depth (acd)—directly to the position. - Opening and study databases: Positions can be tagged with identifiers (
id) and comments (c0…c9) for classification and retrieval. - Adjudication and composition: EPD records are used to feed test positions to engines for mate detection, draw evaluation, or study verification.
Format and syntax
An EPD record starts with the first four FEN fields, followed by zero or more opcodes, each ending with a semicolon.
- Core fields (from FEN): piece placement, side to move, castling rights, en passant target square.
- Additional data via opcodes: flexible key–value pairs for engines and tools.
Common opcodes (not exhaustive):
id "Label"– Identifier for the position (string in quotes).bm Moves– Best move(s) intended by the test (typically SAN; some tools also accept coordinate algebraic).am Moves– Moves to avoid.ce N– Centipawn evaluation from the side to move (e.g.,ce 23= +0.23).pv Moves– Principal variation (a line the engine recommends).dm N– Distance to mate in N plies (positive for delivering mate).acd N– Analysis depth in plies;acn N– nodes searched;acs N– analysis time in seconds.hmvc N– Halfmove clock;fmvn N– Fullmove number (EPD does not include FEN’s last two fields, so these opcodes carry that info when needed).c0…c9– Comment fields (strings).
Conventions:
- Tokens are space-separated; opcodes end with semicolons.
- String values use double quotes; numeric values are unquoted.
- One EPD record per line is common practice.
- Move notation within opcodes varies by tool; SAN is widely used in public test suites, but always check your engine/GUI’s expected format.
Examples
1) Starting position with identifiers and clocks carried via opcodes:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - id "Startpos"; hmvc 0; fmvn 1;
2) Mate in one (White to move):
6k1/6pp/8/7Q/8/8/8/6K1 w - - bm Qe8#; pv Qe8#; dm 1; id "MateIn1-Example";
Visualize the position:
3) En passant target example (after 1. e4):
rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 id "EP-Target-After-1.e4";
4) A small evaluation and PV annotation for a common opening position (after 1. e4 e5 2. Nf3 Nc6):
r1bqkbnr/pppp1ppp/2n5/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - ce 23; pv Bb5 a6 Ba4 Nf6 O-O; id "OpenGame-2...Nc6";
Strategic and historical significance
- Standardization: Alongside FEN and PGN, EPD helped standardize how chess software communicates, enabling reproducible tests and sharable analysis datasets.
- Engine progress tracking: For decades, public EPD test suites (e.g., WAC, Bratko–Kopec, BT2630) have provided a common yardstick to compare engine strength and heuristics.
- Training and study: Coaches and authors create targeted EPD collections (e.g., “mate in 2,” “rook endings,” or “Sicilian tactics”) that engines and GUIs can grade automatically.
Usage tips and good practices
- Be consistent about move notation (SAN vs coordinate). If your tool expects SAN, include checks and mates (+, #) and disambiguation (e.g., Qe2 vs Qde2).
- Keep one record per line and terminate opcodes with semicolons; omit the trailing semicolon only if your tool allows it.
- When you need halfmove/fullmove counters (e.g., for the 50-move rule), include
hmvcandfmvnopcodes. - Use
idstrings to label positions clearly, especially in large test suites.
Interesting facts
- EPD emerged from the same effort that produced modern PGN standards, aiming for human-readable yet machine-parseable chess data.
- Many famous training sets distributed on the internet are simply text files of EPD lines—easy to version, diff, and script.
- Although UCI does not formalize EPD, most analysis tools and many GUIs can import/export EPD for batch testing.
- Analysts frequently convert iconic moments from top games into EPD snippets to run “what if” engine checks on critical positions.