If there is no castling availability for either side, the single character symbol "-" is used. This indicates potential future castling that may of may not be possible at the moment due to blocking pieces or enemy attacks. The third field represents castling availability. A lower case "w" is used if White is to move a lower case "b" is used if Black is the active player. The second field represents the active color. A solidus character "/" is used to separate data of adjacent ranks. Empty squares are represented by the digits one through eight the digit used represents the count of contiguous empty squares along a rank. White pieces are identified by uppercase SAN piece letters ("PNBRQK") and black pieces are identified by lowercase SAN piece letters ("pnbrqk"). For each rank, the squares are specified from file a to file h. The board contents are specified starting with the eighth rank and ending with the first rank. The first field represents the placement of the pieces on the board. Adjacent fields are separated by a single ASCII space character. Each field is composed only of non-blank printing ASCII characters. However, these positions aren't too common.Ī FEN description has six fields. In some cases, the description could be eighty or more characters in length and so may not fit conveniently on some displays. The length of a FEN position description varies somewhat according to the position. These can all fit on a single text line in an easily read format. Many interesting chess problem sets represented using FEN can be found at the ftp site in the directory pub/chess/SAN_testsuites.įEN specifies the piece placement, the active color, the castling availability, the en passant target square, the halfmove clock, and the fullmove number. Additionally, a position notation can be useful for page layout programs and for confirming position status for e-mail competition. For example, there exist standard position notation databases with many of the classical benchmark tests for chessplaying programs, and by using a common position notation format many hours of tedious data entry can be saved. Having a standard position notation is particularly important for chess programmers as it allows them to share position databases. This new standard, FEN, was first implemented in Edwards' SAN Kit.
The original Forsyth standard has been slightly extended for use with chess software by Steven Edwards with assistance from commentators on the Internet. The first four fields of the FEN specification are the same as the first four fields of the EPD specification.Ī text file composed exclusively of FEN data records should have a file name with the suffix ".fen".įEN is based on a 19th century standard for position recording designed by the Scotsman David Forsyth, a newspaper journalist. EdwardsįEN is "Forsyth-Edwards Notation" it is a standard for describing chess positions using the ASCII character set.Ī single FEN record uses one text line of variable length composed of six data fields. Quoted from the PGN Specification by Steven J. Simple Object Access Protocol ( SOAP) 1.1 This is a simple helper function, it converts a FEN position in a new FEN by applying a move to it. String DoMove ( string fen, string move ) Given a FEN position as input, the return is a list of all the valid moves together with their scores. M5 = color to move gives mate in 5, -M3 = color to move gets mated in 5 moves. An error response is returned when position is invalid or not in database. The score is given as distance to mat, or 0 when the position is a draw. A description of FEN is at the end of this page. The input is the position in FEN notation. A simple VB test application is available. /p>
For those on a windows platform the Microsoft soap toolkit or Pocketsoap can be used. To encode and decode the SOAP request a XML parser is handy. In order to make use of this service you need to be able to make SOAP request and read the responses. The service is described by a WDSL schema file, the schema can be found here: dl See the links section at the end of this page.
To simplify development of SOAP clients several free tools are available. SOAP is a open standard to access webservices based on open Internet and XML standards. The server can be accessed by sending SOAP requests to it. The server has all the 3, 4 and 5 man endgames. This is a simple webservice to access a 7 GB Nalimov endgame tablebase server.