
  Fischer Random Chess (Chess960)

*Fischer Random Chess* (also called /Chess960/, /Chess 960/,
/Fischerandom chess/, /FR chess/, or /FullChess/) is a chess
<http://en.wikipedia.org/wiki/Chess> variant
<http://en.wikipedia.org/wiki/Chess_variant> created by Grandmaster
Bobby Fischer <http://en.wikipedia.org/wiki/Bobby_Fischer> (the World
Champion of chess <http://en.wikipedia.org/wiki/World_chess_champion>
from 1972 until 1975). It was originally announced on June 19
<http://en.wikipedia.org/wiki/June_19>, 1996
<http://en.wikipedia.org/wiki/1996>, in Buenos Aires, Argentina
<http://en.wikipedia.org/wiki/Buenos_Aires%2C_Argentina>. Fischer's goal
was to create a chess variant in which chess creativity and talent would
be more important than memorization and analysis of opening moves
<http://en.wikipedia.org/wiki/Chess_opening>. His approach was to create
a randomized initial chess position, which would thus make memorizing
chess opening move sequences far less helpful.


    1 Starting Position

The starting position for Fischer random chess must meet the following
rules:

  * White pawns <http://en.wikipedia.org/wiki/Pawn_(chess)> are placed
    on their orthodox home squares.
  * All remaining white pieces are placed on the first rank.
  * The white king <http://en.wikipedia.org/wiki/King_(chess)> is placed
    somewhere between the two white rooks
    <http://en.wikipedia.org/wiki/Rook_(chess)>.
  * The white bishops <http://en.wikipedia.org/wiki/Bishop_(chess)> are
    placed on opposite-colored squares.
  * The black pieces are placed equal-and-opposite to the white pieces.
    For example, if white's king is placed on b1, then black's king is
    placed on b8. 

Note that the king never starts on file a or h, because there has to be
room for a rook.

There are many procedures for creating this starting position. Hans L.
Bodlaender has proposed the following procedure using one six-sided die
to create an initial position; typically this is done just before the
game commences:

  * Roll the die, and place a white bishop on the black square indicated
    by the die, counting from the left. Thus 1 indicates the first black
    square from the left (a1 in algebraic notation
    <http://en.wikipedia.org/wiki/Algebraic_notation>), 2 indicates the
    second black square from the left (c1), 3 indicates the third (e1),
    and 4 indicates the fourth (g1). Since there are no fifth or sixth
    positions, re-roll 5 or 6 until another number shows.
  * Roll the die, and place a white bishop on the white square indicated
    (1 indicates b1, 2 indicates d1, and so on). Re-roll 5 or 6.
  * Roll the die, and place a queen
    <http://en.wikipedia.org/wiki/Queen_(chess)> on the first empty
    position indicated (always skipping filled positions). Thus, a 1
    places the queen on the first (leftmost) empty position, while a 6
    places the queen on the sixth (rightmost) empty position.
  * Roll the die, and place a knight
    <http://en.wikipedia.org/wiki/Knight_(chess)> on the empty position
    indicated. Re-roll a 6.
  * Roll the die, and place a knight on the empty position indicated.
    Re-roll a 5 or 6.
  * Place a white rook on the 1st empty square of the first rank, the
    white king on the 2nd empty square of the first rank, and the
    remaining white rook on the 3rd empty square of the first rank.
  * Place all white and black pawns on their usual squares, and place
    Black's pieces to exactly mirror White's (so Black should have on a8
    exactly the same type of piece that White has on a1). 

This procedure generates any of the 960 possible initial positions of
Fischer Random Chess with an equal chance; on average, this particular
procedure uses 6.7 die rolls. Note that one of these initial positions
is the standard chess position, at which point a standard chess game
begins.

It's also possible use this procedure to see why there are exactly 960
possible initial positions. Each bishop can take one of 4 positions, the
Queen one of 6, and the two knights can have 5 or 4 possible positions,
respectively. This means that there are 4*4*6*5*4 = 1920 possible
positions if the two knights were different in some way. However, the
two knights are indistinguishable during play; if they were swapped,
there would be no difference. This means that the number of
distinguishable positions is half of 1920, or 1920/2 = 960 possible
distinguishable positions.


    2 Castling


      2.1 Rules for Castling

Once the starting position is set up, the rules for play are the same as
standard chess. In particular, pieces and pawns have their normal moves,
and each player's objective is to checkmate their opponent's king.

Fischer random chess allows each player to castle
<http://en.wikipedia.org/wiki/Castling> once per game, a move by
potentially both the king and rook in a single move. However, a few
interpretations of standard chess games rules are needed for castling,
because the standard rules presume initial locations of the rook and
king that are often untrue in Fischer Random Chess games.

After castling, the rook and king's final positions are exactly the same
positions as they would be in standard chess. Thus, after a-side
castling (notated as O-O-O and known as /queen-side castling/ in
orthodox chess), the King is on c (c1 for White and c8 for Black) and
the Rook is on d (d1 for White and d8 for Black). After h-side castling
(notated as O-O and known as /king-side castling/ in orthodox chess),
the King is on g and the Rook is on f. It is recommended that a player
state "I am about to castle" before castling, to eliminate potential
misunderstanding.

However, castling may only occur under the following conditions, which
are extensions of the standard rules for castling:

 1. *Unmoved:* The king and the castling rook must not have moved before
    in the game, including castling.
 2. *Unattacked:* All of the squares between the king's initial and
    final squares (including the initial and final squares) must not be
    under attack by any opposing piece.
 3. *Vacant:* All the squares between the king's initial and final
    squares (including the final square), and all of the squares between
    the rook's initial and final squares (including the final square),
    must be vacant except for the king and castling rook. 

These rules have the following consequences:

  * If the initial position happens to be the standard chess initial
    position, these castling rules have exactly the same effect as the
    standard chess castling rules.
  * All the squares between the king and castling rook must be vacant.
  * Castling cannot capture any pieces.
  * The king and castling rook cannot "jump" over any pieces other than
    each other.
  * A player may castle at most once in a game.
  * If a player moves his king or both of his initial rooks without
    castling, he may not castle during the rest of the game.
  * In some starting positions, some squares can stay filled during
    castling that would have to be vacant in standard chess. For
    example, after a-side castling (O-O-O), it's possible for to have a,
    b, and/or e still filled, and after h-side castling (O-O), it's
    possible to have e and/or h filled.
  * In some starting positions, the king or rook (but not both) do not
    move during castling.
  * The king may not be in check before or after castling.
  * The king cannot move through check. 


      2.2 How to Castle

When castling on a physical board with a human player, it is recommended
that the king be moved outside the playing surface next to his final
position, the rook then be moved from its starting to ending position,
and then the king be placed on his final square. This is always
unambiguous, and is a simple rule to follow.

Eric van Reem suggests that there are other acceptable ways to castle:

  * If only the rook needs to move (jumping over the king), you can
    simply move only the rook.
  * If only the king needs to move (jumping over the castling rook), you
    can simply move the king.
  * You can pick up both the king and rook (in either order), then place
    them on their final squares (this is called "transposition" castling).
  * You can move the king to its final square and move the rook to its
    final square as two separate moves, in either order (this is called
    "double-move" castling). Obviously, if the rook is on the square the
    king will occupy you'll need to move the rook first, and if the king
    is on the square the rook will occupy you'll need to move the king
    first. 

In contrast, Reinhard Scharnagl strongly recommends that, since castling
is fundamentally a king's move, the king should always move first.

Generally, when playing with human player on a physical board, it's wise
to announce "I'm going to castle" before castling. If you're playing a
timed game, once you're done castling press the appropriate button on
your chess clock to show your move has completed.

When castling using a computer interface, programs should have separate
a-side (O-O-O) and h-side (O-O) castling actions (e.g., as a button or
menu item). Ideally, programs should also be able to detect a king or
rook move that cannot be anything other than a castling move and
consider that a castling move.

When using an electronic board, to castle you should remove the king,
remove the castling rook, place the castling rook on its new position,
and then place the king on its new position. This will creates an
unambiguous move for electronic boards, which often only have sensors
that can detect the presence or absence of an object on each square (and
cannot tell what object is on the square). Ideally, electronic boards
should detect a king or rook move that can only be a castling move as
well, but users should not count on this.


      2.3 Castling Rule Ambiguities

Many published castling rules are unfortunately ambiguous. For example,
the rules first published by Eric van Reem and chessvariants.com, as
literally stated, did not specifically state that there must be vacant
squares between the king and his destination except for the
participating rook. As a result, those rules appeared to some to allow
the king to "leap" over other pieces.

In 2003 David A. Wheeler contacted many active in Fischer Random Chess
to determine the exact castling rules, including Eric van Reem,
Hans-Walter Schmitt, and R. Scharnagl. All agreed that there must be
vacant squares between the king and his destination except for the
participating rook, clarifying the castling rules.


    3 Playing Fischer Random Chess

Examining openings for Fischer Random Chess is in its infancy, but
opening fundamentals still apply. These include: protect the King,
control the center squares (directly or indirectly), and develop your
pieces rapidly starting with the less valuable pieces. Some starting
positions have unprotected pawns that may need to be dealt with quickly.

Some have argued that two games should be played with each initial
position, with players alternating as white and black, since some
initial positions may turn out to give white a much bigger advantage
than standard chess. However, there is no evidence that any position
gives either side a significant advantage.


    4 Recording Games

Since the initial position is usually not the orthodox chess initial
position, recorded games must also record the initial position. Games
recorded using the Portable Game Notation
<http://en.wikipedia.org/wiki/Portable_Game_Notation> (PGN) can record
the initial position using Forsyth-Edwards Notation
<http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation> (FEN), as the
value of the "FEN" tag. Castling is marked as O-O or O-O-O, just as in
standard chess. Note that not all chess programs can handle castling
correctly in Fischer Random Chess games (except if the initial position
is the standard chess initial position). To correctly record a Fischer
Random Chess game in PGN, an additional "Variant" tag must be used to
identify the rules; the rule named "Fischerandom" is accepted by many
chess programs as identifying Fischer Random Chess. Be careful to use
"Variant" and not "Variation", which has a different meaning. This means
that in a PGN-recorded game, one of the PGN tags (after the initial 7
tags) would look like this:

 [Variant "Fischerandom"]

FEN is capable of expressing all possible /starting/ positions of
Fischer Random Chess. However, unmodified FEN cannot express all
possible positions of a Fischer Random Chess game. In a game, a rook may
move into the back row on the same side of the king as the other rook,
or pawn(s) may be underpromoted into rook(s) and moved into the back
row. If a rook is unmoved and can still castle, yet there is more than
one rook on that side, FEN notation as traditionally interpreted is
ambiguous. This is because FEN records that castling is possible on that
side, but not /which/ rook is still allowed to castle.

A modification of FEN, FRC-FEN, has been devised by R. Scharnagl to
remove this ambiguity. In FRC-FEN, the castling markings "KQkq" have
their expected meanings: "Q" and "q" means a-side castling is still
legal (for white and black respectively), and "K" and "k" means h-side
castling is still legal (for white and black respectively). However, if
there is more than one rook on the baseline on the same side of the
king, and the rook that can castle is not the outermost rook on that
side, then the column letter of the rook that can castle is appended
right after the related "K", "k", "Q", or "q". In other words, in
FRC-FEN notation, castling potentials belong to the outermost rooks by
default. This means that the maximum length of the castling value is 8
characters instead of 4 (KkQq plus 4 disambiguation characters), though
positions needing that many characters are extremely improbable. Note
that FRC-FEN is upwardly compatible, that is, a program supporting
FRC-FEN will automatically use the normal FEN codes for a traditional
chess starting position without requiring any special programming.


    5 Starting Position Ids

Some people have wanted each possible starting position to have a unique
standard numeric identifier (id). R. Scharnagl recommends the following
method for defining each position id, where each position has a
different id ranging from 0 to 959.

To create a starting position given an id:

  * Divide the id by 4, producing a truncated integer and a remainder.
    The remainder locates the light-square Bishop: 0 means file b, 1
    means file d, 2 means file f, and 3 means file h.
  * Take the previous truncated integer and divide by 4, producing
    another integer and a remainder. This remainder locates the
    dark-square Bishop: 0 means file a, 1 means file c, 2 means file e,
    and 3 means file g.
  * Take the previous truncated integer and divide by 6, producing
    another integer and a remainder. This remainder locates the queen,
    and identifies the number of the vacant square it occupies (counting
    from the left, where 0 is the leftmost square and 5 is the rightmost
    square).
  * The previous truncated integer now has a value from 0 to 9
    inclusive. Its value, called the KRN code (pronounced "kern"),
    indicates the positions of the king, rooks, and knights among the
    remaining 5 squares. 

The KRN code values are as follows, showing the order from white's
perspective from left to right (where K is king, R is rook, and N is
knight):

KRN code	Position
0	N N R K R
1	N R N K R
2	N R K N R
3	N R K R N
4	R N N K R
5	R N K N R
6	R N K R N
7	R K N N R
8	R K N R N
9	R K R N N

Conversely, given a board position, its id can be computed as follows:

id = (light square Bishop location, where file b is 0) +
     4 * (dark square Bishop location, file a is 0) +
     16 * (Queen location, counting leftmost as 0 and skipping Bishops) +
     96 * (KRN code)

The standard chess position is position id 518. This can be shown by
computing it:

id = (2 because the light square Bishop is on file f) +
     4 * (1 because the dark square Bishop is on file c) +
     16 * (2 because the Queen is on file d, skipping bishop on c) +
     96 * (5, the KRN code) = 518

Computer software can use this algorithm to quickly create any of the
standard positions, by simply selecting a random number from 0 to 959
and using that as the position id. Note that some random number
generators are poor (e.g., they are predictable and/or do not have an
equal distribution of possible values), so implementors should make sure
they use a good random number generator.


    6 Other Ways to Create Initial Positions

There are several other methods that can create initial positions.


      6.1 Coin-Tossing Method

Edward Northam has developed the following approach for creating initial
positions using only two distinguishable coins.

First, two coins (small and large) are used to randomly generate numbers
with equal probability. He suggests doing this by declaring that tails
on the smaller coin counts as 0, tails on the larger coin counts as 1,
and heads on either coin counts as 2. To create numbers in the range 1
through 4, toss both coins and add their values together. To create
numbers in the range 1 through 3, do the same but retoss whenever 4 is
the result. To create numbers in the range 1 through 2, just toss the
larger coin (tails is 1, heads is 2).

Any other technique that randomly generates numbers from 1 to 4 (or at
least 1-2) will work as well, such as as the selection of a closed hand
that may hold a white or black Pawn.

As with a die, the coin tosses can build a starting position one piece
at a time. Before each toss there will be at most 4 vacant squares
available to the piece at hand, and they can be numbered counting from
the a-side (as with the die procedure described above). Place the white
pieces on white's back rank as follows:

 1. Place a Bishop on one of the 4 light squares.
 2. Place a bishop on one of the 4 dark squares.
 3. Place the King. There 6 vacant squares, but only the middle 4 are
    available to the King, since there must be room for a Rook on each
    side of the King.
 4. Place a Rook on the a-side of the King.
 5. Place a Rook on the h-side of the King.
 6. Place the Queen on one of the 3 vacant squares that remain.
 7. Place Knights on the two squares that are left.


      6.2 Drawing Method

David J. Coffin suggests the following procedure, which has the
advantage of not requiring computers, dice, or lookup tables:

 1. Place the eight white pieces in a bag. Draw them one by one and
    place them on squares a1, b1, ... h1.
 2. If the bishops are on the same color, look at the following pairs:
    a1-b1, c1-d1, and e1-f1. Swap the leftmost pair that contains a bishop.
 3. If the king is not between his rooks, swap the king with the closer
    rook. 

However, while all positions can be generated this way, not all
positions have the same probability to be generated. Mathematical
analysis shows that positions with the bishops on a pair a1-b1, c1-d1,
e1-f1, or g1-h1 actually have half the probability to be generated than
the other positions.

Many other algorithms for creating initial positions have been created,
but in many cases they have the same problem: not all positions will be
selected with equal likelihood.


      6.3 Single roll of dice

Robert Belvin describes this approach to use a single roll of 5 dice
(sent to David A. Wheeler in an email dated 2013-11-08).

"You need these dice:

 1. For the dark-square bishop: Dark colored Tetrahedron (4 sided) die.
 2. For the light-square bishop: Light colored Tetrahedron (4 sided) die.
 3. For the Queen: Any color traditional Cubic (6-sided) die.
 4. For the first knight: unique 5-value die (e.g Decahedron, with 1-5
    repeated).
 5. For the second knight: unique, non-Tetrahedron 4-value die (to tell
    it from die #1 and #2; e.g. an Octahedron die with values 1-4 repeated. 

The procedure is as follows: Shake and roll all 5 dice one time only.
Counting from left to right, as viewed from White's side of the board,
place the King and pieces on White's back row:

 1. Count dark squares 1-4 over to place White's dark-square bishop
    based on die #1.
 2. Count light squares 1-4 over to place White's light-square bishop
    based on die #2. There are now 6 empty squares in White's back row.
 3. Count the remaining squares 1-6 over to place White's Queen based on
    die #3. There are now 5 empty squares in White's back row.
 4. Count the remaining squares 1-5 over to place one of White's knights
    based on die #4. There are now 4 empty squares in White's back row.
 5. Count the remaining squares 1-4 over to place the other of White's
    knights based on die #5. There are now 3 empty squares in White's
    back row.
 6. Place White's King in the second (middle) square over, and White's
    Rooks on the other squares, to either side of the King.
 7. Place Black's pieces and King in a mirror image of White's." 


      6.4 Non-Random Setups

The initial setup need not necessarily be random. The players or a
tournament setting may decide on a specific position in advance, for
example.

Edward Northam suggests the following approach for allowing players to
jointly create a position without randomizing tools. First, the back
ranks are cleared of pieces, and the white Bishops, Knights, and Queen
are gathered together. Starting with Black, the players, in turn, place
one of these pieces on White's back rank, where it must stay. The only
restriction is that the Bishops must go on opposite colored squares.
There will be a vacant square of the required color for the second
Bishop, no matter where the previous pieces have been placed. After all
five pieces have been put on the board, the King must be placed on the
middle of the three vacant back rank squares that remain. Rooks go on
the other two.


    7 History

The first Fischer Random Chess tourney was held in Yugoslavia in the
spring of 1996, and was won by Grandmaster
<http://en.wikipedia.org/wiki/Grandmaster> Peter Leko.

In 2001, Leko became the first Fischer Random Chess world champion,
defeating Grandmaster Michael Adams in an eight game match played as
part of the Mainz <http://en.wikipedia.org/wiki/Mainz> Chess Classic.
There were no qualifying matches (also true of the first orthodox world
chess champion titleholders), but both players were in the top five in
the January 2001 world rankings for orthodox chess. Leko was chosen
because of the many novelties he has introduced to known chess theories,
as well as his previous tourney win; in addition, Leko has played
Fischer Random Chess games with Fischer himself. Adams was chosen
because he was the world number one in blitz (rapid) chess and is
regarded as an extremely strong player in unfamiliar positions. The
match was won by a narrow margin, 4.5 to 3.5.

In 2002 at Mainz, an open Fischer Random tournament was held which
attracted 131 players. Peter Svidler won the event.

Other interesting events happened in 2002. The website ChessVariants.com
selected Fischer Random chess as its "Recognized Variant of the Month"
for April 2002. Yugoslavian Grandmaster Svetozar Gligoric published in
2002 the book /Shall We Play Fischerandom Chess?/, popularizing this
variation further.

At the 2003 Mainz Chess Classic, Svidler beat Leko in an eight game
match for the World Championship title by a score of 4.5 - 3.5.


    8 Naming

This particular chess variant has a number of different names. The first
names applied to it include "Fischer Random Chess" and "Fischerandom
Chess".

Hans-Walter Schmitt (chairman of the Frankfurt Chess Tigers e.V.) is an
advocate of this chess variant, and he started a brainstorming process
to choose a new name for it. The new name had to obey the following
requirements on the parts of some leading grandmasters:

 1. It should not use parts of the name of any Grandmaster collegue
 2. It should not include negatively biased or "spongy" elements like
    "random" or "freestyle"
 3. It should be understood worldwide. 

This effort culminated in the name "Chess960", deriving from the number
of different initial positions.

R. Scharnagl, another proponant of this variant, has consistently used
the term FullChess. He believes "FullChess" to also satisfy these
premises, and that it also emphasizes the compatible embedding of the
traditional game of chess.

At this time the terms "Fischer Random Chess" or "Fischerandom chess"
are more common. It is not yet clear if these other, newer terms, or yet
another one will replace it.


    9 External links and references

  * Fischer Random Chess
    http://www.chessvariants.com/diffsetup.dir/fischer.html
  * Fischer Random Chess: Manual Procedure for Generating Piece
    Placements by Hans L. Bodlaender.
    http://www.chessvariants.com/diffsetup.dir/fischer-random-setup.html
  * Rules of Chess960 (Fischer Random Chess ) by Eric van Reem, Mainz
    Chess Classic 2001
    http://www.frankfurtwest.de/ChessClassic/cc03/e/c960/rules.htm
  * Chess Variant FullChess http://www.rescon.de/Compu/fullchess3_e.html
  * "Leko the first ever Kingpin of Fischer Random Chess"
    http://www.geocities.com/MIGHTORS1/Leko/Fischerandom6.html
  * /Shall We Play Fischerandom Chess?/
    http://www.chessville.com/reviews/reviews_Fischerandom.htm
  * Rules of Fischer Random Chess (in Spanish)
    http://www.chessvariants.com/d.sp/fischer.html
  * Rules of Fischer Random Chess (English)
    http://www.eusa.ed.ac.uk/societies/chess/Chess/Trivia/random.html

This article was written by David A. Wheeler, and is available at
https://www.dwheeler.com/essays/Fischer_Random_Chess.html.

You can also see David A. Wheeler's main site
<https://www.dwheeler.com/>, including a beginner's introduction to
chess openings <https://www.dwheeler.com/chessopenings>, quantitive
information on open source software / Free Software (OSS/FS)
<https://www.dwheeler.com/oss_fs_why.html>, and information on how to
write secure programs <https://www.dwheeler.com/secure-programs>. David
A. Wheeler has contributed this text on Fischer Random Chess to the
Wikipedia <http://www.wikipedia.org/>; you can see the Wikipedia copy at
http://en.wikipedia.org/wiki/Fischer_Random_Chess.

