FEN is indeed much more common, at least, more commonly seen by "normal users": major online chess sites (chess.com, lichess.org, ...) propose to millions of users at each moment to export the position they're looking at in the FEN format, sometimes also in other formats (including PGN which describes the whole game, as opposed to just the position, with all moves, metadata, possibly analysis with variations and annotations). You will almost never be proposed to share a position in EPD format. However, these same web sites might internally store their opening database and maybe even their entire puzzle database in the EPD format.
As the name says, EPD is an extended position description, and it does extend the FEN format, in a slightly relaxed sense: The first four data fields (Piece placement, Side to move, Castling ability, En passant target square) are exactly the same.
The FEN format then has exactly two more data fields: Halfmove clock, and Fullmove counter. They are specified as two integers following the ep square, and that's what the FEN string ends with. These last two data are not "rigidly" taken over in the EPD format, but implemented through EPD "Operations".
The EPD format has a first part consisting of the above mentioned four main data fields. That part is followed by an arbitrarily long list of so-called "Operations" each of which consist of a mandatory <opcode>
, followed by zero or more space separated arguments called operands, and a mandatory semicolon ;
.
The <opcode>
has the form of a lowercase letter followed by at least one and at most 14 more lowercase letters and/or digits and/or underscores _
. Examples include: bm
(best move),
ce
(centipawn evaluation), c0
(primary comment),
fmvn
(full move number: this is the FEN's Fullmove counter),
hmvc
(FEN's halfmove clock),
id
(position identification), pv
(predicted variation, i.e., continuation), v0
-v9
(variation name, e.g., name of openings and their variations) etc.
The operands may be (signed or unsigned, integer or decimal) numbers or strings (enclosed in "...") or moves in SAN (standard algebraic notation, like e4, Nbd2+ or bxc1=Q#, without quotes, and not preceded by move numbers nor '...' when it's black's move, e.g., in pv
).
It is somewhat surprising that the halfmove clock is not mandatory in the EPD format, although it is necessary to apply the 75 move rule. But we must admit that application of the 3- or 5-fold repetition would also require to know all previous positions - at least, when the last move wasn't a pawn move or capture.