X-FEN
   HOME

TheInfoList



OR:

X-FEN (formerly FRC-FEN) is an extension of
Forsyth–Edwards Notation Forsyth–Edwards Notation (FEN) is a standard Chess notation, notation for describing a particular board position of a chess game. The purpose of FEN is to provide all the necessary information to restart a game from a particular position. FEN i ...
(FEN) introduced by Reinhard Scharnagl in 2003. It was designed to be able to represent all possible positions in
Fischer random chess Chess960, also known as Fischer Random Chess, is a chess variant that randomizes the starting position of the pieces on the back rank. It was introduced by former world chess champion Bobby Fischer in 1996 to reduce the emphasis on opening prep ...
(FRC) and Capablanca random chess (CRC). It is fully
backward compatible In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with inpu ...
with FEN.


X-FEN definition

X-FEN is based on traditional FEN. It differs only in the way that
castling Castling is a move in chess. It consists of moving the king (chess), king two squares toward a rook (chess), rook on the same and then moving the rook to the square that the king passed over. Castling is permitted only if neither the king ...
and ''
en passant In chess, ''en passant'' (, "in passing") describes the capture by a Pawn (chess), pawn of an enemy pawn on the same and an adjacent that has just made an initial two-square advance. This is a special case in the rules of chess. The capturi ...
'' tags are used. Moreover, 10×8 positions which use
princess Princess is a title used by a female member of a regnant monarch's family or by a female ruler of a principality. The male equivalent is a prince (from Latin '' princeps'', meaning principal citizen). Most often, the term has been used for ...
(knight+bishop) and
empress The word ''emperor'' (from , via ) can mean the male ruler of an empire. ''Empress'', the female equivalent, may indicate an emperor's wife (empress consort), mother/grandmother (empress dowager/grand empress dowager), or a woman who rules ...
(knight+rook) compound pieces are supported.


X-FEN inside of PGN

Games are translated into
Portable Game Notation Portable Game Notation (PGN) is a standard plain text format for recording chess games (both the moves and related data), which can be read by humans and is also supported by most chess software. History PGN was devised around 1993, by Steven J ...
(PGN) format. Each game's starting position must be stored in the PGN for FRC and CRC (but not for traditional chess). Storing the starting position is accomplished with a SetUp tag and an FEN string using the definitions for traditional chess games.


Encoding en-passant

The specification of a target square for an ''en passant'' capture differs slightly from standard FEN. FEN records the square just behind any pawn that has made a two-square push forward in the latest move. As such, whenever a pawn makes a two-square move, the ''en passant'' square is recorded. For example, in the sample game, FEN includes the square e3 as an ''en passant'' square after White makes the first move of the game 1. e4. This is somewhat misleading, as no ''en passant'' captures can be made by Black from the position. X-FEN, on the other hand, includes only true ''en passant'' squares. That is, X-FEN records a value in the field for an ''en passant'' square ''only if there are one or more enemy pawns on the same
rank A rank is a position in a hierarchy. It can be formally recognized—for example, cardinal, chief executive officer, general, professor—or unofficial. People Formal ranks * Academic rank * Corporate title * Diplomatic rank * Hierarchy ...
on an adjacent file''. Thus, after 1.e4, the field for the ''en passant'' square is left blank, as Black cannot make an ''en passant'' capture. However, it is possible that even if an X-FEN records an ''en passant'' square, making that capture would be illegal, because after the capture the king of the capturing player would be in check.


Encoding castling rights

"Kk" identifies the ability of ''g-castling'' (or ''i-castling'' in 10×8 Chess), and "Qq" indicates ''c-castling'' (uppercase for White and lowercase for Black). The new and crucial point of the arrangement is that the castling rights provided by this as default are related to the outermost rook of the affected side. If instead an inner rook is associated with that right, the traditional castling tag will be replaced by the file letter of the involved rook, using upper case for White. frame, left, castling types Usually the king's castling target is either two squares away from the left (white) border or one square from the right border. But there are also variants having symmetrically distributed target squares (e.g. Janus Chess), both a single field distant each. Then an additional "s" has to precede the castling tokens. Another prefix "m" means: modern castling (e.g. Embassy Chess or Chess480). Here, the king will move a regular castling distance (8×8: two steps, 10×8: three steps) aside, but at most just before the border.


10×8 chess

Ten consecutive free squares in a rank are encoded by "10", and nine free squares are represented with a "9". For a
princess Princess is a title used by a female member of a regnant monarch's family or by a female ruler of a principality. The male equivalent is a prince (from Latin '' princeps'', meaning principal citizen). Most often, the term has been used for ...
(knight+bishop) the letter "A" is used, after its name in Capablanca Chess (the ''archbishop''); an
empress The word ''emperor'' (from , via ) can mean the male ruler of an empire. ''Empress'', the female equivalent, may indicate an emperor's wife (empress consort), mother/grandmother (empress dowager/grand empress dowager), or a woman who rules ...
(knight+rook) is encoded using the letter "C" (as it is called the ''chancellor'' in Capablanca chess). As usual, lowercase letters are used for black pieces.


Compatibility

The starting position of traditional chess and moreover all of the 18 Pseudo FRC starting position arrays (with castling enabled rooks and kings situated in their traditional places) and positions resulting from those entirely will be identically encoded by X-FEN just as usual. Thus X-FEN is fully downwards compatible with traditional FEN.


Selecting games

To use only traditional chess games from within a PGN file (a problem present since Shuffle chess), simply select only PGN entries that do not include any FEN tags.


X-FEN example

Castling Right inner rook before 11. O-O frame, left, Example for needed X-FEN in Chess960 X-FEN = rn2k1r1/ppp1pp1p/3p2p1/5bn1/P7/2N2B2/1PPPPP2/2BNK1RR w Gkq - 4 11


References


External links


X-FEN Specification
{dead link, fix-attempted=yes, date=November 2020
Scharnagl's Chess960 website
with X-FEN examples Computer chess X-FEN *X-FEN Chess notation Computer file formats