SAN: Standard Algebraic Notation specification

Revised: 1993.05.15

SAN (Standard Algebraic Notation) is a representation standard for chess moves
using the ASCII Latin alphabet.  Examples of SAN recorded games are found
throughout most modern chess publications.  SAN as presented in this package
uses English language single character abbreviations for chess pieces, although
this is easily changed in the source.  English is chosen over other languages
because it appears to be the most widely recognized.  An alternative to SAN is
FAN (Figurine Algebraic Notation).  FAN uses miniature piece icons instead of
single letter piece abbreviations.  The two notations are otherwise identical.
Details about SAN construction are given both in the FIDE _Laws of Chess_ and
in the source provided with the SAN Kit.

SAN identifies each of the sixty four squares on the chessboard with a unique
two character name.  The first character of a square identifier is the file of
the square; a file is a column of eight squares designated by a single
lowercase letter from "a" (leftmost or queenside) up to and including "h"
(rightmost or kingside).  The second character of a square identifier is the
rank of the square; a rank is a row of eight squares designated by a single
digit from "1" (bottommost [White's first rank]) up to and including "8"
(topmost [Black's first rank]).  The initial squares of some pieces are: white
queen rook at a1, white king at e1, black queen knight pawn at b7, and black
king rook at h8.

SAN identifies each piece by a single uppercase letter (English values: pawn =
"P", knight = "N", bishop = "B", rook = "R", queen = "Q", and king = "K"; other
notational languages may be substituted).  A basic SAN move is given by listing
the moving piece letter (omitted for pawns) followed by the destination square.
Capture moves are denoted by the lowercase letter "x" immediately prior to the
destination square; pawn captures include the file letter of the originating
square of the capturing pawn immediately prior to the "x" character.

SAN kingside castling is indicated by the sequence "O-O"; queenside castling is
indicated by the sequence "O-O-O".  Note that the uppercase letter "O" is used,
not the digit zero.

En passant captures do not have any special notation; they are formed as if the
captured pawn were on the capturing pawn's destination square.

Pawn promotions are denoted by the equal sign "=" immediately following the
destination square with a promoted piece letter (indicating one of knight,
bishop, rook, or queen) immediately following the equal sign.  As above, the
piece letter is in uppercase.

In the case of ambiguities (multiple pieces of the same type moving to the same
square), the first appropriate disambiguating step of the three following steps
is taken:

First, if the moving pieces can be distinguished by their originating files,
the originating file letter of the moving piece is inserted immediately after
the moving piece letter.

Second (when the first step fails), if the moving pieces can be distinguished
by their originating ranks, the originating rank digit of the moving piece is
inserted immediately after the moving piece letter.

Third (when both the first and the second steps fail), the two character square
coordinate of the originating square of the moving piece is inserted
immediately after the moving piece letter.

The result of the SAN actions described so for is called "the basic SAN move
notation".

If the move is a checking move, the plus sign "+" is appended as a suffix to
the basic SAN notation; if the move is a checkmating move, the octothorpe sign
"#" is appended instead.

Thus, SAN moves can be as short as two characters (e.g., "d4"), or as long as
seven characters (e.g., "Qa6xb7#").  The average SAN move length seen in
realistic games is probably just fractionally longer than three characters.

If the SAN rules seem complicated, be assured that the earlier notation systems
of LEN (Long English Notation) and EDN (English Descriptive Notation) are much
more complex, and that LAN (Long Algebraic Notation, the predecessor of SAN) is
unnecessarily bulky.

SAN: EOF
