Forsyth–Edwards Expanded Notation
A general purpose UTF-8-based format for defining chess variants’ board positions.
This document proposes a format for representing most chessboard positions, as
pictures of game at a given moment.
This document is a beta of the FEEN specification.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.
Forsyth–Edwards Expanded Notation) is a lightweight, UTF-8-based format that gives a consistent and easy way to represent most chessboard positions between two-players.
Inspired by FEN (
Forsyth–Edwards Notation), FEEN is able to describe both multidimensional positions and related state, easy for humans to read and write, and easy for machines to import and export, it is completely laws of chess independent and compatible with the main chess variants, including 장기, หมากรุก, 将棋, Western, 象棋, and many others. These properties make FEEN an ideal data-interchange format for recording chessboard positions.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
A specification for a Forsyth–Edwards expanded notation MUST observe the following criteria:
- The details of the system MUST be publicly available and free of unnecessary complexity.
- The details of the system MUST be non-proprietary so that users and software developers are unrestricted by concerns about infringing on intellectual property rights.
- The system MUST work for a variety of programs. The format SHOULD be such that it can be used by chess database programs, chess publishing programs, chess server programs, and chessplaying programs without being unnecessarily specific to any particular application class.
- The system MUST handle positions of games which are playable by many sides.
- The system MUST be easily expandable and scalable. Examples: new chessboards, new opening positions, new actors, new moves, new rules, etc.
- The system MUST be cross-variants. It SHOULD be able to represent boards where sides MAY play different chess variants such as Janggi, Makruk, Shogi, Western, Xiangqi.
- The system MUST handle chessboards of any dimension, such as: 2D, 3D, etc.
- The system MUST handle chessboards of any size, such as: 8x8, 9x9, 9x9x9, etc.
- Finally, the system SHOULD handle the same kinds and amounts of data that are already handled by existing chess software and by print media.
Notation for board positions
A FEEN description MUST have three fields:
- Flatten board
- Active side
- Captured actors
Each field MUST be composed only of UTF-8 characters, and non-blank printing. Adjacent fields MUST be separated by a single UTF-8 space character (i.e., “ “). When a field is blank, it MUST be “
The length of a FEEN position description varies somewhat according to the position and the number of actors.
Actors MUST be identified by a single character; e.g., “
Blank squares are noted using digits 1 through n (where n is the number of blank squares on the last dimension). An empty string “” is used to separate actors, and between each dimension, solidus characters “
/” are used.
Empty chessboard examples
This field MUST contain a single letter: “
bottom moves next, “
Captured actors MUST be listed here. The actors are listed in alphabetical order, separated by an empty string “”.
If neither player has any captured actors, for instance on an initial position, this MUST be “
Captured actors are said to be
in hand at Shogi.
Example from a game with two Shogi players, in a position where bottom (先手) had captured 1 Rook, 1 Gold and 4 Pawns, while top (後手) has captured 2 Bishops, 2 Silvers and 3 Pawns:
rmes1semr/4g4/1p5p1/j1j1j1j1j/9/9/J1J1J1J1J/1P5P1/4G4/RMES1SEMR B -
rnbqkbnr/8/pppppppp/8/8/PPPPPPPP/8/RNBKQBNR B -
lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL B -
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR B -
rheagaehr/9/1c5c1/s1s1s1s1s/9/9/S1S1S1S1S/1C5C1/9/RHEAGAEHR B -
Given the following position between two Western players:
♜♞♝♛♚♝♞♜/♟♟♟♟♟♟♟♟/8/8/8/8/♙♙♙♙♙♙♙♙/♖♘♗♕♔♗♘♖ B -
When this action (in PMN format) is applied:
[ 52, 36, "♙" ]
Then the position becomes:
♜♞♝♛♚♝♞♜/♟♟♟♟♟♟♟♟/8/8/4♙3/8/♙♙♙♙1♙♙♙/♖♘♗♕♔♗♘♖ t -
This work is influenced by several documents.