Forsyth–Edwards Notation

The Forsyth -Edwards Notation ( FEN ) or in the expanded form (X- FEN ) is a shorthand notation, any board position can be written down in chess with.

FEN is based on a system that the Scottish newspaper journalist David Forsyth has developed. This system was popular in the 19th century. It was expanded by Steven J. Edwards, thereby promoting the use by computers. FEN is an integral part of the Portable Game Notation, where it is used to specify different starting lineups than the ordinary.

  • 2.1 Definition 2.1.1 En passant coding
  • 2.1.2 castling rights - coding
  • 2.1.3 10 × 8 chess
  • 3.1 format
  • 3.2 dissemination

Construction

The FEN is divided into 6 groups, which are separated by spaces ( in EBNF ):

FEN: = character position " " On the train " " castling " " en passant " " half- trains " " train number a b c d e f g h 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 a b c d e f g h Diagram 1: The start position of a chess game For example, is the starting position of a chess game in FEN ( see diagram 1):

Rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR KQkq w - 0 1 Figure position

The first group describing the positions of the pieces on the board. Possible signs are:

Figure position: = row " / " row " / " row " / " row " / " row " / " row " / " row " / " series Row: = { character | Empty fields } Each row in a FEN consists of figures and / or empty fields. The sum of the figures and empty fields in a row must be exactly eight arise.

Figure: = " p" | "r " | " n" | "b " | " q " | " k " | " P " | " R " | " N " | " B " | " Q" | "K" Empty fields: = " 1 " | " 2 " | " 3 " | " 4 " | " 5 " | " 6 " | " 7 " | " 8" From top left (field a8) to bottom right ( field h1) the positions of the pieces on the board are in rows, separated by a slash, indicated. White characters are in uppercase, black characters in lowercase. For the figures, the abbreviations of the English names are used ("r " = Rook (tower), "n " = Knight (Knight ), "b" = Bishop ( runners ), "q " = Queen ( Lady ), "k" = King ( King ), "p" = pawn ( Bauer) ). Consecutive empty frames in a row are indicated by a number ( at least "1", a maximum of "8").

For example, sending a white king on e4 and a black king on c5 following first group ( see Figure 2 ):

8/8/8/2k5/4K3/8/8/8 Players on train

The second group indicates the player who is in this position on the train. Possible strings are ( in EBNF ):

On the train: = "w " | " b" w = white (English: white) b = black (English: black)

Castling

The third group indicates the still allowed reshuffles. Possible strings are:

Castling: = "K" [" Q "] [" k "] [" q" ] | "Q" [" k "] [" q" ] | "k" [" q" ] | "q " | " - " K = white can castle short (English: to castle kingside ) Q = white can castle long (English: to castle queenside ) k = black can castle short q = black can castle long - = No castling longer possible

When specifying the characters the capital letters are to be put in front of the small, the letter " K " before the letter "Q" and "k " before " q".

En passant

The fourth group is a possible en passant to train. Possible strings are:

En passant: = "-" | ( ("a" | "b " | " c" | "d " | " e" | "f " | " g" | "h ") (" 3 " | " 6" ) ) If the last train a farmer two fields is far spent, the skipped field is specified, regardless of whether an "en passant" impact on this field is possible or not. Otherwise, "-" is specified.

For example, according to Bauer f2 - f4 is specified in the FEN in the 4th group " f3 ".

Halfmoves

In the fifth group, the number of half-moves is specified since the last pawn move or of hitting a figure. This value is important to monitor the 50-move draw rule.

Halfmoves: = " 0" | positive integer Train number

In the sixth group, the number of the next train is given. In the initial position the value is 1 after each train of black is increased by the value 1.

Train number: = positive integer X - FEN (extended FEN )

To represent all possible positions in Chess960 (8 × 8 board) or Capablanca Random Chess (10 × 8 board ) ( CRC), the classic FEN is not enough. Therefore this a backward-compatible extension of traditional FEN has been developed. This means that all positions which have so far been using FEN coded had to be coded by an expansion in a 100% identical form. Introduced in 2003 by Reinhard Scharnagl X - FEN does this. X - FEN (formerly FRC - FEN ) has been proven for years.

Games will be shown (Portable Game Notation ) in PGN format. With the exception of conventional chess games must be included when storing Chess960 or CRC games ( Capablanca Random Chess ) and the respective starting positions. The thus occurs by definition in traditional chess games by a SetUp tag and a FEN string in Chess960 and CRC games in a compatible manner through an X - FEN string.

Definition

Basis of X - FEN is the conventional FEN. It differs only in the way castling tags and the ep- day use. It also supports 10 × 8 positions that Jose Raul Capablanca on extended character set ( additional figures Chancellor and Archbishop ) based.

En passant coding

To improve the clarity an indication of an ep- coordinate is only permitted if the affected farmer is placed directly next to an opponent's pawn and the ep field is blank.

Castling rights - coding

It is known from FEN castling tags " KQkq " used. As usual mean little letters black castling rights and large white letters castling rights. " Kk " an ability to identify g - castling (or i- castling at the 10 × 8 chess), " Qq " those for c- castling. New and crux of the scheme is that those granted castling rights normally assigned to the furthest outside own tower on the affected side. However, if this notwithstanding an inner tower have the right to castle, the traditional castling tag will be replaced by the column letter of the tower affected in White by capital letters only in these cases.

Usually the goal castling the king either of two fields from the left (white ) edge, or a field is removed from the right edge. There are, however, both from the edge (eg, Janus Chess ), one box variants with symmetrically distributed target fields. Then the castling block is an " s " prefix. Another prefix "m " means: modern castling (eg Embassy Chess or Chess480 ). Here, the king moves castling a normal distance (8 * 8: 2 steps, 10 × 8: 3 steps ) to the side, up to but immediately upstream of the edge.

10 × 8 chess

Ten consecutive empty fields in a row are coded "10", nine with "9". The Archbishop ( Springer runners ) receives the letter "A " (English Archbishop ), a Chancellor ( Springer Tower ) gets "C " (English Chancellor ). Black figures are symbolized here as usual, with lowercase letters. 10 × 8 example: Capablanca Random Chess.

Compatibility

The starting position of the traditional chess and beyond all 18 pseudo - FRC positions ( castling enabled towers and kings stand on their traditional places ) are completely identical as previously coded together with the resulting sequence positions by X - FEN. Thus X - FEN is fully backward compatible with the conventional FEN.

Filtering of games

If you want to consider only classical chess games from a PGN file ( an existing problem with the shuffle chess ), so only have to take care to select only those entries alone without existing PGN FEN tag.

Example

Right to castle inner tower before 11 0-0

X - FEN:

Rn2k1r1/ppp1pp1p/3p2p1/5bn1/P7/2N2B2/1PPPPP2/2BNK1RR w Gkq - 4 11 PGN:

[Event " Computer Chess Game SmirfGUI " ] [Site " CHESSBOX " ] [ Date " 19/06/2005 " ] [ Time " 10:22:29 " ] [ Round " test " ] [ White " White" ] [ Black " Black" ] [ Result " * " ] [ Annotator " R. Scharnagl " ] [ SetUp "1" ] [ FEN " rnbnkqrb/pppppppp/8/8/8/8/PPPPPPPP/RNBNKQRB KQkq w - 0 1 " ] 1 h4 g6 g3 BF6 2 3 4 R a3 a4 Qh6 Bxh4 5 gxh4 Qxh4 6 QH3 Qxh3 7 RXH3 Ne6 8 Bf3 d6 9 NBC3 Ng5 10 Rhh1 BF5 11 0-0 * Shredder - FEN

While X - FEN FEN- the balancing act between backward compatibility and flexibility for modern chess variants mastered, and this paid for with a relatively high complexity, a more developed "small" solution called Shredder - FEN for Chess960 ability of chess programs.

Format

The Shredder - FEN breaks with the 100 % -owned backward compatibility with FEN and easily encoded in the castling rights, the output lines of the towers, ie for example HAha instead KQkq when the towers originally available on the A- and H-Line.

Dissemination

The two market leaders in the market of chess programs, ChessBase / Fritz and Shredder can only deal with Shredder - FEN in your current programs. Other chess engine GUIs (eg Arena) both formats.

343434
de