Changes

Jump to: navigation, search

Extended Position Description

8,673 bytes added, 17:33, 10 May 2018
Created page with "'''Home * Chess * Position * Extended Position Description''' '''Extended Position Description''' ('''EPD''')<br/> describes a chess posi..."
'''[[Main Page|Home]] * [[Chess]] * [[Chess Position|Position]] * Extended Position Description'''

'''Extended Position Description''' ('''EPD''')<br/>
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]] <ref>[http://www.thechessdrum.net/PGN_Reference.txt Standard: Portable Game Notation Specification and Implementation Guide] 16.2: EPD by [[Steven Edwards]]</ref>.

=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.

''[https://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols Terminal and none terminal symbols] of a variant of [https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form BNF] below are embedded in ' ' resp. < >.''
<pre>
<EPD> ::= <Piece Placement>
' ' <Side to move>
' ' <Castling ability>
' ' <En passant target square>
{' ' <operation>}
</pre>
<span id="PiecePlacement"></span>
==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.
<pre>
<Piece Placement> ::= <rank8>'/'<rank7>'/'<rank6>'/'<rank5>'/'<rank4>'/'<rank3>'/'<rank2>'/'<rank1>
<ranki> ::= [<digit17>]<piece> {[<digit17>]<piece>} [<digit17>] | '8'
<piece> ::= <white Piece> | <black Piece>
<digit17> ::= '1' | '2' | '3' | '4' | '5' | '6' | '7'
<white Piece> ::= 'P' | 'N' | 'B' | 'R' | 'Q' | 'K'
<black Piece> ::= 'p' | 'n' | 'b' | 'r' | 'q' | 'k'
</pre>
<span id="Sidetomove"></span>
==Side to move==
Side to move is one lowercase letter for either White ('w') or Black ('b').
<pre>
<Side to move> ::= {'w' | 'b'}
</pre>
<span id="Castling"></span>
==Castling ability==
If neither side can castle, the symbol '-' is used, otherwise each of four individual [[Castling rights|castling rights]] for king and queen castling for both sides are indicated by a sequence of one to four letters.
<pre>
<Castling ability> ::= '-' | ['K'] ['Q'] ['k'] ['q'] (1..4)
</pre>
<span id="Enpassanttargetsquare"></span>
==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.
<pre>
<En passant target square> ::= '-' | <epsquare>
<epsquare> ::= <fileLetter> <eprank>
<fileLetter> ::= 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h'
<eprank> ::= '3' | '6'
</pre>

==Operations==
<pre>
<operation> ::= <opcode> {' '<operand>} ';'
<opcode> ::= <letter> {<letter> | <digit> | '_'} (up to 14)
<operand> ::= <stringOperand>
| <sanMove>
| <unsignedOperand>
| <integerOperand>
| <floatOperand>

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

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

<unsignedOperand>::= <digit19> { <digit> } | '0'
<integerOperand> ::= ['-' | '+'] <unsignedIntegerOperand>
<floatOperand> ::= <integerOperand> '.' <digit> {<digit>}
<digit18> ::= '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8'
<digit19> ::= '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
<digit> ::= '0' | <digit19>
</pre>
<span id="mnemonics"></span>
==Opcode mnemonics==
* '''acd''' analysis count [[Depth|depth]] <ref>[https://www.stmintz.com/ccc/index.php?id=137052 EPD format] by [[Stefan Meyer-Kahlen]], [[CCC]], November 07, 2000</ref>
* '''acn''' analysis count [[Node|nodes]]
* '''acs''' analysis count seconds
* '''am''' avoid move(s)
* '''bm''' best move(s)
* '''c0''' comment (primary, also '''c1''' though '''c9''')
* '''ce''' [[Centipawns|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''' [[ECO|Encyclopedia of Chess Openings]] opening code
* '''fmvn''' fullmove number
* '''hmvc''' [[Halfmove Clock|halfmove clock]]
* '''id''' position identification
* '''nic''' [[NIC-Key|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=
* [[Ferdinand Mosca#ChessArtist|Chess Artist]] by [[Ferdinand Mosca]]
* [[Forsyth-Edwards Notation]] (FEN)
* [[Portable Game Notation]] (PGN)

=Forum Posts=
* [https://www.stmintz.com/ccc/index.php?id=20631 EPD examples: Bratko-Kopec test suite] by [[Steven Edwards|Steven J. Edwards]], [[CCC]], June 15, 1998 » [[Bratko-Kopec Test]]
* [https://www.stmintz.com/ccc/index.php?id=137052 EPD format] by [[Stefan Meyer-Kahlen]], [[CCC]], November 07, 2000
* [https://www.stmintz.com/ccc/index.php?id=155201 Question about EPD] by [[Aaron Tay]], [[CCC]], February 20, 2001
* [http://www.talkchess.com/forum/viewtopic.php?t=32254 XBoard and epd tournament] by [[Vlad Stamate]], [[CCC]], January 31, 2010 » [[Chess Engine Communication Protocol]], [[Engine Testing]]
* [http://www.talkchess.com/forum/viewtopic.php?t=38488 What's wrong with this EPD?] by [[Jouni Uski]], [[CCC]], March 20, 2011
* [http://www.talkchess.com/forum/viewtopic.php?t=57108 epd multipv] by [[J. Wesley Cleveland]], [[CCC]], July 28, 2015 » [[Principal Variation]]
* [http://www.talkchess.com/forum/viewtopic.php?t=59633 Test epd for Linux ?] by Jean Arthuin, [[CCC]], March 25, 2016 » [[Linux]], [[Strategic Test Suite|STS]], [[XBoard]]
* [http://www.talkchess.com/forum/viewtopic.php?t=64003 FEN - Flipper for Windows] by [[Matthias Gemuh]], [[CCC]], May 17, 2017 » [[Color Flipping]], [[Forsyth-Edwards Notation|FEN]]
* [http://www.talkchess.com/forum/viewtopic.php?t=65881 how to create a labeled epd from pgn?] by [[Erin Dame]], [[CCC]], December 02, 2017 » [[Texel's Tuning Method]], [[Portable Game Notation|PGN]]

=External Links=
* [http://www.thechessdrum.net/PGN_Reference.txt Standard: Portable Game Notation Specification and Implementation Guide] 16.2: EPD by [[Steven Edwards]]
* [http://www.marochess.de/php3/epd2html.html EPD to HTML/ASCII Diagram Converter] by [http://www.marochess.de/biograph.html Manfred Rosenboom] <ref>[http://www.rebel.nl/epd2diag.htm EPD2diag] hosted by [[Ed Schroder|Ed Schröder]]</ref>
* [http://40h.000webhostapp.com/ 40H Chess Tools and Utilities] by [[Norman Pollock|Norm Pollock]] » [[Portable Game Notation]] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=58581 An important message to users of 40H utility tools] by [[Norman Pollock|Norm Pollock]], [[CCC]], December 13, 2015</ref> <ref>[http://www.talkchess.com/forum/viewtopic.php?t=59376&start=1 Re: 40H chess downloads has moved] by [[Norman Pollock|Norm Pollock]], [[CCC]], March 12, 2016</ref> <ref>[http://www.talkchess.com/forum/viewtopic.php?t=62554 Moved "40H" tools/utilities to a new URL] by[[Norman Pollock|Norm Pollock]], [[CCC]], December 21, 2016</ref>
* [https://github.com/Mk-Chan/Chess-Tools/blob/master/epd2uci.py Chess-Tools/epd2uci.py at master · Mk-Chan/Chess-Tools · GitHub] by [[Manik Charan]] » [[Python]], [[python-chess]]

=References=
<references />

'''[[Chess Position|Up one Level]]'''

Navigation menu