EPD is "Extended Position Description".
It is a standard for describing chess positions along with an extended set of structured attribute values using the ASCII character set. It is intended for data and command interchange among chessplaying programs. It is also intended for the representation of portable opening library repositories and for problem test suites.
EPD is an open standard and is freely available for use by both research and commercial programs without charge. The only requirement for use is that any proposed extensions be coordinated through the technical contact given at the start of this document.
A single EPD record uses one text line of variable length composed of four data fields followed by zero or more operations. A text file composed exclusively of EPD data records should have a file name with the suffix ".epd".

Image description

download pdf file


EPD was created in 1993 and is based in part on the earlier FEN standard (Forsyth­Edwards Notation) for representing chess positions. Compared to FEN, EPD has added extensions for use with opening library preparation and also for general data and command interchange among advanced chess programs. EPD was developed by John Stanback and Steven Edwards; its first implementation was in Stanback's commercial chessplaying program Zarkov and its second implementation was in Edwards' research chessplaying program Spector. So many programs have since adopted EPD that no one knows the exact sequence thereafter.
EPD is employed for storing test suites for chessplaying programs and for recording the results of programs running these test suites.
Example test suites are available for researchers via anonymous ftp from the chess.onenet.net site in the pub/chess/Tests directory. The ASCII text file pub/chess/Tests/Manifest gives descriptions of the contents of the various test suite files.
EPD is used to provide a linkage mechanism between chessplaying programs and position database programs to support the automated direction of analysis generation.

The four EPD data fields

Each EPD record contains four data filed that describe the current position. From left to right starting at the beginning of the record, these are the piece placement, the active color, the castling availability, and the en passant target square of a position. These can all fit on a single text line in an easily read format. The length of an EPD position description varies somewhat according to the position and any associated operations. In some cases, the description could be eighty or more characters in length and so may not fit conveniently on some displays. However, most EPD records pass among programs only and so are not usually seen by program users.
Note: due to the likelihood of future expansion of EPD, implementors are encouraged to have their programs handle EPD text lines of up to 4096 characters long including the traditional ASCII NUL character as a terminator. This is an increase from the earlier suggestion of a maximum length of 1024 characters. Depending on the host operating system, the external representation of EPD records will include one or more bytes to indicate the end of a line. These do not count against the length limit as the internal representation of an EPD text record is stripped of end of line bytes and instead is terminated by the traditional ASCII NUL character.
Each of the four EPD data fields are composed only of non­blank printing ASCII characters. Adjacent data fields are separated by a single ASCII space character.

Piece placement data

The first field represents the placement of the pieces on the board.
The board contents are specified starting with the eighth rank and ending with the first rank. For each rank, the squares are specified from file a to file h. White pieces are identified by uppercase SAN (Standard Algebraic Notation) piece letters ("PNBRQK") and black pieces are identified by lowercase SAN piece letters ("pnbrqk"). Empty squares are represented by the digits one through eight; the digit used represents the count of contiguous empty squares along a rank. The contents of all eight squares on each rank must be specified; therefore, the count of piece letters plus the sum of the vacant square counts must always equal eight. The solidus character "/" (forward slash) is used to separate data of adjacent ranks. There is no leading or trailing solidus in the piece placement data; hence there are exactly seven of solidus characters in the placement field.
The piece placement data for the starting array is:

Active color

The second field represents the active color. A lower case "w" is used if White is to move; a lower case "b" is used if Black is the active player.
The piece placement and active color data for the starting array is:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w

Castling availability

The third field represents castling availability. This indicates potential future castling that may or may not be possible at the moment due to blocking pieces or enemy attacks. If there is no castling availability for either side, the single character symbol "­" is used. Otherwise, a combination of from one to four characters are present. If White has kingside castling availability, the uppercase letter "K" appears. If White has queenside castling availability, the uppercase letter "Q" appears. If Black has kingside castling availability, the lowercase letter "k" appears. If Black has queenside castling availability, then the lowercase letter "q" appears. Those letters which appear will be ordered first uppercase before lowercase and second kingside before queenside. There is no white space between the letters.
The piece placement, active color, and castling availability data for the starting array is:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq

En passant target square

The fourth field is the en passant target square. If there is no en passant target square then the single character symbol "­" appears. If there is an en passant target square then is represented by a lowercase file character (one of "abcdefgh") immediately followed by a rank digit. Obviously, the rank digit will be "3" following a white pawn double advance (Black is the active color) or else be the digit "6" after a black pawn double advance (White being the active color).
An en passant target square is given if and only if the last move was a pawn advance of two squares. Therefore, an en passant target square field may have a square name even if there is no pawn of the opposing side that may immediately execute the en passant capture.
The piece placement, active color, castling availability, and en passant target square data for the starting array is:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq ­