<http://gambiter.com/>
Menu Menu

  * Chess <http://gambiter.com/chess/>
  * Go <http://gambiter.com/go/>
  * Poker <http://gambiter.com/poker/>
  * Contract bridge <http://gambiter.com/bridge/>

  * Chess <http://gambiter.com/chess/>
  * Go <http://gambiter.com/go/>
  * Backgammon <http://gambiter.com/backgammon/>
  * Connection games <http://gambiter.com/connection/>

  * Poker <http://gambiter.com/poker/>
  * Contract bridge <http://gambiter.com/bridge/>
  * Card games <http://gambiter.com/cards/>
  * Cards classifier <http://gambiter.com/cards/classified-index.html>

  * Domino <http://gambiter.com/domino/>
  * Gambling <http://gambiter.com/gambling/>
  * List of dice games <http://gambiter.com/dice/List_dice_games.html>
  * Rummy games <http://gambiter.com/rummy/>

  * Scrabble <http://gambiter.com/scrabble/>
  * Monopoly <http://gambiter.com/monopoly/>
  * Sudoku <http://gambiter.com/sudoku/>
  * Mahjong <http://gambiter.com/mahjong/>

Chess tournaments

  * Chess World Cup
    <http://gambiter.com/chess/tournaments/chess_world_cup.html>
  * FIDE Grand Prix
    <http://gambiter.com/chess/tournaments/FIDE_grand_prix.html>
  * Olympiad <http://gambiter.com/chess/tournaments/chess_olympiad.html>
  * World Championship
    <http://gambiter.com/chess/tournaments/World_chess_championship.html>
  * List of strong tournaments
    <http://gambiter.com/chess/tournaments/List_strong_chess_tournaments.html>
  * List of world championships
    <http://gambiter.com/chess/tournaments/List_world_chess_championships.html>

Chess strategy

  * Checkmate patterns <http://gambiter.com/chess/Checkmate_pattern.html>
  * Chess openings <http://gambiter.com/chess/openings/chess_opening.html>
  * Chess strategy <http://gambiter.com/chess/chess_strategy.html>
  * Chess tactics <http://gambiter.com/chess/chess_tactic.html>
  * Chess theory <http://gambiter.com/chess/chess_theory.html>
  * Endgames <http://gambiter.com/chess/endgame/chess_endgame.html>
  * Pawn structure <http://gambiter.com/chess/Pawn_structure.html>
  * Problems/Compositions
    <http://gambiter.com/chess/problems/chess_problem.html>

Computer chess

  * Computer chess <http://gambiter.com/chess/computer/Computer_chess.html>
  * Chess engines <http://gambiter.com/chess/computer/chess_engine.html>
  * Chess software
    <http://gambiter.com/chess/computer/List_chess_software.html>
  * Cheating in chess <http://gambiter.com/chess/Cheating_chess.html>

Chess players

  * Chess prodigy <http://gambiter.com/chess/players/chess_prodigy.html>
  * List of Grandmasters
    <http://gambiter.com/chess/players/List_chess_grandmasters.html>
  * Grandmasters by country
    <http://gambiter.com/chess/players/List_chess_grandmasters_by_country.html>
  * Top player comparison
    <http://gambiter.com/chess/players/Comparison_top_chess_players_throughout_history.html>
  * World rankings <http://gambiter.com/chess/FIDE_world_rankings.html>

FIDE

  * FIDE <http://gambiter.com/chess/organizations/FIDE.html>
  * Chess titles <http://gambiter.com/chess/chess_title.html>
  * Rating systems <http://gambiter.com/chess/chess_rating_system.html>
  * Correspondence chess
    <http://gambiter.com/chess/Correspondence_chess.html>

Chess variants

  * List of chess variants
    <http://gambiter.com/chess/variants/List_chess_variants.html>
  * Shogi <http://gambiter.com/shogi/>
  * Xiangqi <http://gambiter.com/xiangqi/>

Chess rules and history

  * Glossary <http://gambiter.com/chess/Glossary_chess.html>
  * Rules of chess <http://gambiter.com/chess/Rules_chess.html>
  * Checkmate <http://gambiter.com/chess/Checkmate.html>
  * Chess notation <http://gambiter.com/chess/chess_notation.html>
  * Draw <http://gambiter.com/chess/Draw.html>
  * Outline of chess <http://gambiter.com/chess/Outline_chess.html>
  * History <http://gambiter.com/chess/history/History_chess.html>
  * Timeline of chess
    <http://gambiter.com/chess/history/Timeline_chess.html>

Home <http://gambiter.com/> :: Chess <http://gambiter.com/chess/> ::
Computer chess <http://gambiter.com/chess/computer/Computer_chess.html>


  X-FEN

*X-FEN* is an extension of Forsyth-Edwards Notation (FEN).

The traditional Forsyth-Edwards Notation is not sufficient to represent
all possible positions in 8x8 Chess960
<http://gambiter.com/chess/variants/Chess960.html> (aka Fischer Random
Chess) or 10x8 Capablanca random chess
<http://gambiter.com/chess/variants/Capablanca_random_chess.html> (CRC).
Consequently, an extension of FEN was needed, with the requirement of
being fully backward compatible. X-FEN (formerly FRC-FEN), introduced by
Reinhard Scharnagl in 2003, accomplishes this.


    X-FEN definition

X-FEN is based on traditional FEN. It differs only in the way that
castling <http://gambiter.com/chess/Castling.html> and /en passant
<http://gambiter.com/chess/En_passant.html>/ tags are used. Moreover,
10x8 positions, which rely on José Raúl Capablanca
<http://gambiter.com/chess/players/Jose_raul_capablanca.html>'s extended
piece set (additional pieces Chancellor and Archbishop), are supported.


      X-FEN inside of PGN

Games are translated into PGN
<http://gambiter.com/chess/computer/Portable_game_notation.html> format
(Portable Game Notation). Each game's starting position must be stored
in the PGN for Chess960 and Capablanca random chess
<http://gambiter.com/chess/variants/Capablanca_random_chess.html>(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 an en passant
<http://gambiter.com/chess/En_passant.html> target differs slightly from
standard Forsyth-Edwards Notation. FEN records the /en passant/ square
field as the square just behind a 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. From the sample game given in
Forsyth-Edwards Notation, we see that 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 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, either because of discovered check (where the king lies on
the same rank as the two pawns, or same diagonal as one of them, or same
file as the capturing pawn, in line with an enemy queen, rook or
bishop), or because making the move leaves the player in check.


      Encoding castling rights

Castling tags "KkQq" are used as known from FEN. As usual lower case
letters indicate castling rights for Black, and upper case letters those
for White. "Kk" identifies the ability of /g-castling/, and "Qq"
indicates /c-castling/ (rsp. /i-castling/ at 10x8 Chess). 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.

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 (8x8: two steps, 10x8: three steps) aside, but
at most just before the border.


      10x8 chess

Ten consecutive free squares in a rank are encoded by "*10*", and nine
free squares are represented with a "*9*". For an Archbishop (Knight +
Bishop) the letter "*A*" is used; a Chancellor (Knight + Rook) is
encoded using the letter "*C*". 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

Example for needed X-FEN in Chess960


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

[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. O-O *

  * 0Facebook
    <https://www.facebook.com/sharer.php?src=sp&u=http%3A%2F%2Fgambiter.com%2Fchess%2Fcomputer%2FX-FEN.html&title=X-FEN&utm_source=share2>
  * Twitter
    <https://twitter.com/intent/tweet?text=X-FEN&url=http%3A%2F%2Fgambiter.com%2Fchess%2Fcomputer%2FX-FEN.html&utm_source=share2>

COMMENTS
Tabletop games: Rules and Strategy

  * Chess <http://gambiter.com/chess/>
  * Go <http://gambiter.com/go/>
  * Poker <http://gambiter.com/poker/>
  * Contract bridge <http://gambiter.com/bridge/>

2008-2016 © Policy <http://gambiter.com/policy.html> :: Contact
us max@gambiter.com <mailto:max@gambiter.com>

