- Import supports FEN notation.
- Standard notation for describing positions of a chess game.
- FEN is an acronym for Forsyth–Edwards Notation.
- A single FEN string describes one state of the chess game.
- A FEN file often stores a number of positions described with a FEN string.
- ASCII format.
- First developed by Scottish journalist David Forsyth; later extended by Steven J. Edwards.
- FEN strings are used in PGN files to describe the initial position of a game.
Import & Export
- Import["file.fen"] imports a FEN file, returning graphics showing the positions.
- Import["file.fen",elements] imports the specified elements.
- See the following reference pages for full general information:
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
- General Import elements:
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements
- Game elements:
"ActivePlayer" player who moves next "FENStrings" FEN string for the move "MoveNumber" the move number of the game "PositionRendering" a Graphics rendering of the position
- Import by default uses the "PositionRendering" element for the FEN format.
- Move numbers should not necessarily correspond to the actual number of the move in the game. Typically, 0 means an unknown move number.
- Overall file element:
"PositionCount" number of positions stored in the file
Examplesopen allclose all
List available Import elements:
Import Elements (8)
Import Options (5)
By default, Import displays white pieces at the bottom:
Properties & Relations (2)
Import can produce FEN strings for any position that occurred in a game from a PGN file:
Possible Issues (1)
Even though technically incorrect, FEN strings without move numbers are accepted by Import: