Forsyth-Edwards notation

from Wikipedia, the free encyclopedia

The Forsyth-Edwards notation (FEN) or in its expanded form (X-FEN) is a short notation with which any board position in chess can be written down.

FEN is based on a system developed by Scottish newspaper journalist David Forsyth . This system became popular in the 19th century. It was expanded by Steven J. Edwards to also support use by computers. FEN is an integral part of the Portable Game Notation , in which it is used to enter starting line-ups that differ from the starting line-up of the game.

construction

A FEN is divided into six groups, separated by spaces . These each state:

  1. Figure position
  2. Right to move
  3. Castling rights
  4. Possible en-passant blow
  5. Half-moves played since the last pawn move or the capture of a piece
  6. Number of the next train
  a b c d e f G H  
8th Chess rdt45.svg Chess ndt45.svg Chess bdt45.svg Chess qdt45.svg Chess kdt45.svg Chess bdt45.svg Chess ndt45.svg Chess rdt45.svg 8th
7th Chess pdt45.svg Chess pdt45.svg Chess pdt45.svg Chess pdt45.svg Chess pdt45.svg Chess pdt45.svg Chess pdt45.svg Chess pdt45.svg 7th
6th Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 6th
5 Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 5
4th Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 4th
3 Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 3
2 Chess plt45.svg Chess plt45.svg Chess plt45.svg Chess plt45.svg Chess plt45.svg Chess plt45.svg Chess plt45.svg Chess plt45.svg 2
1 Chess rlt45.svg Chess nlt45.svg Chess blt45.svg Chess qlt45.svg Chess klt45.svg Chess blt45.svg Chess nlt45.svg Chess rlt45.svg 1
  a b c d e f G H  

Diagram 1: The starting position of a game of chess

Template: checkerboard-small / maintenance / new

For example, the starting position of a game of chess in FEN (see diagram 1) is given as follows:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

Figure position

The first group describes the positions of the pieces on the board. This happens in rows from top left (field a8) to bottom right (field h1). Each row is separated from the next by a slash. Each row consists of letters for the figures and numbers for the number of spaces that indicate the list in this row from left (a-line) to right. Several consecutive empty fields on the same line must be indicated by a single digit (1 to 8). A capital letter denotes a white figure and a small letter a black figure, whereby the abbreviations of the English names are used (“r” = rook ( tower ), “n” = knight ( jumper ), “b” = bishop ( runner ), “q "= Queen ( lady )," k "= King ( King )," p "= pawn ( Bauer )). The sum of the pieces and spaces in a row must be equal to the number of lines (8 for a standard chess board).

  a b c d e f G H  
8th Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 8th
7th Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 7th
6th Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 6th
5 Chess --t45.svg Chess --t45.svg Chess kdt45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 5
4th Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess klt45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 4th
3 Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 3
2 Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 2
1 Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg Chess --t45.svg 1
  a b c d e f G H  

Diagram 2: A white king on e4, a black king on c5

Template: checkerboard-small / maintenance / new

For example, a white king on e4 and a black king on c5 result in the following first group (see diagram 2):

8/8/8/2k5/4K3/8/8/8

It's player's turn

The second group indicates the player whose turn it is in this position. Characters are possible w for white (ger .: w hite ) and b for black (ger .: b paint ).

castling

The third group indicates the castling that is still allowed . Here means

  • K: White can castle briefly ( to castle k ingside )
  • Q: White can castle long (English: to castle q ueenside )
  • k: Black can castle briefly
  • q: Black can castle long
  • -: Castling is no longer possible

The order KQkq must be observed. The letters that correspond to castling that are no longer possible are omitted and the dash “-” is written if and only if none of the four castling is possible any more.

En passant

The fourth group indicates a possible en-passant stroke. If a pawn moved two squares forward in the last move, the jumped square is indicated, regardless of whether an en-passant hit on this square is actually possible or not. Otherwise "-" is given.

Example: According to pawn f2 – f4, “f3” is specified in the FEN in the 4th group.

Half moves

The fifth group shows the number of half moves since the last pawn move or capture of a piece. This value is important for monitoring the 50- move draw rule . Possible values ​​are a zero or a positive integer.

Train number

In the sixth group the number of the next train is given. In the starting position the value is 1. After every move by Black it is increased by 1. This indicates the number of moves previously played so that the following moves can be numbered correctly in the notation .

X-FEN (extended FEN)

The classic FEN is not sufficient to display all conceivable positions in the Chess960 (8 × 8 board) or Capablanca Random Chess (10 × 8 board) (CRC). For this reason, a downward-compatible extension of the conventional FEN has been developed for this purpose. This means: All positions that could previously be coded using FEN had to be coded in a 100% identical form through an extension. The X-FEN introduced by Reinhard Scharnagl in 2003 does this. X-FEN (formerly FRC-FEN) has been tried and tested for years.

Games are displayed in PGN (Portable Game Notation) format. With the exception of conventional chess games, if Chess960 or CRC games ( Capablanca Random Chess ) are saved, the respective starting positions must also be recorded. By definition, this happens in traditional chess games using a set-up tag and a FEN string, and in Chess960 and CRC games in a compatible way using an X-FEN string.

definition

The basis of the X-FEN is the conventional FEN. It only differs in the way castling tags and the ep tag are used. It also supports 10 × 8 positions that use José Raúl Capablanca's extended set of figures (additional figures, chancellor and archbishop).

En-passant coding

To improve clarity, the e.-p. Field is indicated if and only if a pawn who has taken a double step immediately before is standing next to an opposing pawn, so that a pseudo-legal e.-p. Stroke actually occurs is possible. It is not checked whether the blow is also legal, i.e. H. after the strike the king of the striking party would not be threatened.

Castling rights coding

The castling tags "KQkq" known from the FEN are used. As usual, small letters mean black castling rights and large letters mean white castling rights. K / k denote the right to g-castling (or i-castling on a 10 × 8 board), Q / q the right to c-castling . In the event that both rooks of the respective party are on the same side of the king and on the back row in the position described, a castling right indicated with K / k / Q / q applies to the one further out, i.e. H. tower further away from the king. If, however, the inner rook has castling rights, then (and only then) the column letter of the tower in question is given instead of a K / k or Q / q, for white again as uppercase and for black as lowercase. This case can never arise from the normal basic position (towers on the a- and h-lines), so that the information is always given with K / k / Q / q, which means that X-FEN is downwards compatible with the previous FEN.

Castling types

Usually the king's castling goal is either two squares from the left (white) edge, or one square from the right edge. However, there are also variants with symmetrically distributed target fields (e.g. Janusschach ), both of which are one field away from the edge. Then the castling block is preceded by an "s". Another prefix "m" means: modern castling (e.g. Embassy Chess or Chess480). Here the king moves a normal castling distance (8 × 8: 2 steps, 10 × 8: 3 steps) to the side, but no more than just before the edge.

10 × 8 chess

Ten consecutive free fields in a row are coded with “10”, nine with “9”. The archbishop (jumper + runner) receives the letter "A" (English archbishop ), a chancellor (jumper + tower) receives "C" (English chancellor ). Black figures are symbolized in the usual way with lower case letters. 10 × 8 example: Capablanca Random Chess .

Filtering of lots

If you only want to consider classic chess games from a PGN file (a problem that already exists with Shuffle Chess ), you only need to ensure that only PGN entries without an existing FEN tag are selected.

example

Example for X-FEN requirements in Chess960. Inner tower castling right.

Position before 11. 0–0

PGN:

[Event "SmirfGUI Computerchess Game"]
[Site "CHESSBOX"]
[Date "2005.06.19"]
[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 w KQkq - 0 1"]
1. h4 g6 2. g3 Bf6 3. a4 Qh6 4. Ra3 Bxh4 
5. gxh4 Qxh4 6. Qh3 Qxh3 7. Rxh3 Ne6 8. Bf3 d6
9. Nbc3 Ng5 10. Rhh1 Bf5 11. 0–0 *

After 10 moves, before 11.0–0, White has castling right with the inner rook on g1, so it must be indicated with a G instead of K:

X-FEN:

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

Shredder FEN

While X-FEN manages the balancing act between FEN downward compatibility and flexibility for modern chess variants, and this comes at the price of a relatively high level of complexity, another "small" solution called Shredder -FEN was developed for the Chess960 capability of chess programs .

format

The Shredder-FEN breaks with the 100% downward compatibility to FEN and simply codes the starting lines of the towers in the castling rights, ie for example HAha instead of KQkq, if the towers are originally on the A and H lines.

distribution

The two leaders on the chess program market, ChessBase / Fritz and Shredder , can only handle Shredder-FEN in their current versions. Other chess engine GUIs (e.g. Arena ) understand both formats.

See also

Web links