Extended Position Description

Home * Chess * Position * Extended Position Description

Extended Position Description (EPD) describes a chess position similar to the Forsyth-Edwards Notation (FEN). Unlike FEN, EPD is designed to be expandable by the addition of new operations. EPD was developed by John Stanback and Steven Edwards. Its first implementation is in Stanback's chessplaying program Zarkov. Steven Edwards specified the EPD standard for computer chess applications as part of the Portable Game Notation.

=EPD Syntax= One EPD string or record consists of one text line of variable length composed of four fields separated by a space character followed by zero or more operations. The four data fields, which describe the position, are common with the FEN-Specification, while the halfmove clock and full move counter, obligatory in Forsyth-Edwards Notation are replaced by optional hmvc and fmvn operations, and 0, 1 are their default values.

''Terminal and none terminal symbols of a variant of BNF below are embedded in ' ' resp. < >.''  ::=  ' '  ' '  ' '  {' ' }

Piece Placement
The Piece Placement is determined rank by rank in big-endian order, that is starting at the 8th rank down to the first rank. Each rank is separated by the terminal symbol '/' (slash). One rank, scans piece placement in little-endian file-order from the A to H. A decimal digit counts consecutive empty squares, the pieces are identified by a single letter from standard English names for chess pieces as used in the Algebraic Chess Notation. Uppercase letters are for white pieces, lowercase letters for black pieces.  ::= '/' '/' '/' '/' '/' '/' '/' ::= [ ] {[ ] } [ ] | '8'      ::=  |  ::= '1' | '2' | '3' | '4' | '5' | '6' | '7'  ::= 'P' | 'N' | 'B' | 'R' | 'Q' | 'K'  ::= 'p' | 'n' | 'b' | 'r' | 'q' | 'k'

Side to move
Side to move is one lowercase letter for either White ('w') or Black ('b').  ::= {'w' | 'b'}

Castling ability
If neither side can castle, the symbol '-' is used, otherwise each of four individual castling rights for king and queen castling for both sides are indicated by a sequence of one to four letters.  ::= '-' | ['K'] ['Q'] ['k'] ['q'] (1..4)

En passant target square
The en passant target square is specified after a double push of a pawn, no matter whether an en passant capture is really possible or not. Other moves than double pawn pushes imply the symbol '-' for this FEN field.  ::= '-' | ::=   ::= 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h'    ::= '3' | '6'

Operations
::=  | <sanMove> | <unsignedOperand> | <integerOperand> | <floatOperand>

<stringOperand> ::= '"' { } '"'

<sanMove>       ::= <PieceCode> [<Disambiguation>] <targetSquare> [ ] ['+'|'#'] |        ::= 'O-O' | 'O-O-O' (upper case O, not zero) <PieceCode>     ::= '' | 'N' | 'B' | 'R' | 'Q' | 'K' <Disambiguation> ::= <fileLetter> | <targetSquare>  ::= <fileLetter> <fileLetter> ::= 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h'     ::=  '=' <PiecePromotion> <PiecePromotion> ::= 'N' | 'B' | 'R' | 'Q'

<unsignedOperand>::= { } | '0' <integerOperand> ::= ['-' | '+'] <unsignedIntegerOperand> <floatOperand>  ::= <integerOperand> '.' { } ::= '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' ::= '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'  ::= '0' |

Opcode mnemonics

 * acd analysis count depth
 * acn analysis count nodes
 * acs analysis count seconds
 * am avoid move(s)
 * bm best move(s)
 * c0 comment (primary, also c1 though c9)
 * ce centipawn evaluation
 * dm direct mate fullmove count
 * draw_accept accept a draw offer
 * draw_claim claim a draw
 * draw_offer offer a draw
 * draw_reject reject a draw offer
 * eco Encyclopedia of Chess Openings opening code
 * fmvn fullmove number
 * hmvc halfmove clock
 * id position identification
 * nic New In Chess opening code
 * noop no operation
 * pm predicted move
 * pv predicted variation
 * rc repetition count
 * resign game resignation
 * sm supplied move
 * tcgs telecommunication game selector
 * tcri telecommunication receiver identification
 * tcsi telecommunication sender identification
 * v0 variation name (primary, also v1 though v9)

=See also=
 * Chess Artist by Ferdinand Mosca
 * Forsyth-Edwards Notation (FEN)
 * Portable Game Notation (PGN)

=Forum Posts=
 * EPD examples: Bratko-Kopec test suite by Steven J. Edwards, CCC, June 15, 1998 » Bratko-Kopec Test
 * EPD format by Stefan Meyer-Kahlen, CCC, November 07, 2000
 * Question about EPD by Aaron Tay, CCC, February 20, 2001
 * XBoard and epd tournament by Vlad Stamate, CCC, January 31, 2010 » Chess Engine Communication Protocol, Engine Testing
 * What's wrong with this EPD? by Jouni Uski, CCC, March 20, 2011
 * epd multipv by J. Wesley Cleveland, CCC, July 28, 2015 » Principal Variation
 * Test epd for Linux ? by Jean Arthuin, CCC, March 25, 2016 » Linux, STS, XBoard
 * FEN - Flipper for Windows by Matthias Gemuh, CCC, May 17, 2017 » Color Flipping, FEN
 * how to create a labeled epd from pgn? by Erin Dame, CCC, December 02, 2017 » Texel's Tuning Method, PGN
 * Fun challenge for best cool code by Ed Schröder, CCC, February 28, 2019
 * Re: Fun challenge for best cool code by Harm Geert Muller, CCC, February 28, 2019


 * Scid vs. PC - EPD Export feature by Steven Atkinson, CCC, June 29, 2019 » Scid vs. PC

=External Links=
 * Standard: Portable Game Notation Specification and Implementation Guide 16.2: EPD by Steven Edwards
 * EPD to HTML/ASCII Diagram Converter by Manfred Rosenboom
 * 40H Chess Tools and Utilities by Norm Pollock » Portable Game Notation
 * Chess-Tools/epd2uci.py at master · Mk-Chan/Chess-Tools · GitHub by Manik Charan » Python, python-chess

=References=

Up one Level