Fischer random chess numbering scheme

Last updated

The game Fischer random chess, played with conventional chess pieces and rules, starts with a random selection of one of 960 positions for the pieces. Arrangements of the pieces are restricted so that the king is between the rooks and the bishops are on different colored squares. In order to both select a valid arrangement and to then concisely discuss which randomly selected arrangement a particular game used, the Fischer random chess numbering scheme is used: a number between 0 and 959 indicates a valid arrangement and given an arrangement the number can be determined.

Contents

The Fischer random chess numbering scheme can be shown in the form of a simple two-tables representation. Also a direct derivation of starting arrays exists for any given number from 0 to 959. This mapping of starting arrays and numbers stems from Reinhard Scharnagl and is now used worldwide for Fischer random chess. The enumeration has been published first in the internet and then 2004 in his (German language) book "Fischer-Random-Schach (FRC / Chess960) - Die revolutionäre Zukunft des Schachspiels (inkl. Computerschach)", ISBN   3-8334-1322-0.

Two-tables representation

These two tables will serve for a quick mapping of an arbitrary Fischer random chess starting position (short: SP) at White's base row to a number between 0 and 959. First search for the same or the nearest smaller number from the King's Table. Then determine the difference (0 to 15) to the drawn number and select that matching bishops' positioning from the Bishop's Table. According to this first place both bishops at the first base row, then the six pieces in the sequence of the found row of the King's Table upon the six free places left over. Finally the black pieces will be placed symmetrically to White's base row.

Example

abcdefgh
8
Chessboard480.svg
Chess rdt45.svg
Chess ndt45.svg
Chess bdt45.svg
Chess qdt45.svg
Chess kdt45.svg
Chess bdt45.svg
Chess ndt45.svg
Chess rdt45.svg
Chess pdt45.svg
Chess pdt45.svg
Chess pdt45.svg
Chess pdt45.svg
Chess pdt45.svg
Chess pdt45.svg
Chess pdt45.svg
Chess pdt45.svg
Chess plt45.svg
Chess plt45.svg
Chess plt45.svg
Chess plt45.svg
Chess plt45.svg
Chess plt45.svg
Chess plt45.svg
Chess plt45.svg
Chess rlt45.svg
Chess nlt45.svg
Chess blt45.svg
Chess qlt45.svg
Chess klt45.svg
Chess blt45.svg
Chess nlt45.svg
Chess rlt45.svg
8
77
66
55
44
33
22
11
abcdefgh
The standard starting position for chess is denoted by SP-518.

Consider the SP-518 arrangement. The largest multiple of 16 less than 518 is 512, so we search for 512 in the King's table and the remainder, 6, in the Bishop's table. In the King's table, number 512 is "RNQKNR". In the Bishop's table, "--B--B--" is at number 6. We insert the pieces from the King's table into these gaps to get the starting array "RNBQKBNR", which is the starting order in traditional chess.

King's table

Max. Positioning sequence of the other pieces
0QNNRKR  336NRKQRN  672QRKNNR
16NQNRKR352NRKRQN688RQKNNR
32NNQRKR368NRKRNQ704RKQNNR
48NNRQKR384QRNNKR720RKNQNR
64NNRKQR400RQNNKR736RKNNQR
80NNRKRQ416RNQNKR752RKNNRQ
96QNRNKR432RNNQKR768QRKNRN
112NQRNKR448RNNKQR784RQKNRN
128NRQNKR464RNNKRQ800RKQNRN
144NRNQKR480QRNKNR816RKNQRN
160NRNKQR496RQNKNR832RKNRQN
176NRNKRQ512RNQKNR848RKNRNQ
192QNRKNR528RNKQNR864QRKRNN
208NQRKNR544RNKNQR880RQKRNN
224NRQKNR560RNKNRQ896RKQRNN
240NRKQNR576QRNKRN912RKRQNN
256NRKNQR592RQNKRN928RKRNQN
272NRKNRQ608RNQKRN944RKRNNQ
288QNRKRN624RNKQRN R. Scharnagl
304NQRKRN640RNKRQN
320NRQKRN656RNKRNQ

Bishop's table

Remainder Bishop positioning
abcdefgh
0BB------
1B--B----
2B----B--
3B------B
4-BB-----
5--BB----
6--B--B--
7--B----B
8-B--B---
9---BB---
10----BB--
11----B--B
12-B----B-
13---B--B-
14-----BB-
15------BB

Direct derivation

White's starting array can be derived from its number N (0 ... 959) as follows:

a) Divide N by 4, yielding quotient N2 and remainder B1. Place a Bishop upon the bright square corresponding to B1 (0=b, 1=d, 2=f, 3=h).

b) Divide N2 by 4 again, yielding quotient N3 and remainder B2. Place a second Bishop upon the dark square corresponding to B2 (0=a, 1=c, 2=e, 3=g).

c) Divide N3 by 6, yielding quotient N4 and remainder Q. Place the Queen according to Q, where 0 is the first free square starting from a, 1 is the second, etc.

d) N4 will be a single digit, 0 ... 9. Place the Knights according to its value by consulting the following N5N table:

Digit Knight positioning
0NN---
1N-N--
2N--N-
3N---N
4-NN--
5-N-N-
6-N--N
7--NN-
8--N-N
9---NN

e) There are three blank squares remaining; place a Rook in each of the outer two and the King in the middle one.

Starting position IDs in Fischer random chess

For years, Reinhard Scharnagl has championed the desirability of giving each of the starting positions (SP) a unique identification number (idn) in the range 0-959 or, perhaps, 1-960. He has presented his methods on the internet and in books. See the external references. As an application, a random number generator could make one probe into the range at hand for a random number, and produce a random SP. Late in 2005, the program Fritz9 became available. It has a Fischer random chess option, but, for some unexplained reason, it assigns idns to SPs in a different way. Rather than requiring a giant table with 960 entries, both methods can use some smaller tables and some arithmetic.

Preliminaries

Both methods take account of the positions of the bishops first, and ignore the distinction between the king and rooks. Once the positions of the bishops, knights and queen are known, there is only one possibility for the remaining three squares. In the places where division of whole numbers is done, it is always done giving a quotient (designated q1,q2,..) and a remainder (designated r1,r2 ..).

There are 16 ways to put two bishops on opposite colored squares. These are shown and numbered in the table above. The entries actually can be calculated using simple arithmetic, but the table method seems less error prone. For the standard SP the bishop's code is 6.

In any SP, when looking at the arrangement of the other pieces around the bishops, it is helpful to write down the NQ-skeleton for that SP. This is done by ignoring the bishops and replacing the "K" and "R" by a common symbol, say "-". The NQ-skeleton for the standard SP is -NQ-N-. The sections below showing Scharnagl's Methods and the Fritz9 Methods are independent, and may be read in any order.

Scharnagl's methods

The methods described below are appropriate for the idn range 0-959. For the idn range 1-960, he recommends conversion by dividing by 960 and working with the remainder. This has the effect of assigning to idn 0 the SP that was at idn 960, and leaving the other idn SP matchups unchanged. If this calculation is applied in the idn range 0-959, nothing is changed.

For any SP, after skipping over the bishop's, the queen may occupy any one of six possible squares, and they are numbered from left to right (from White's perspective) 0,1,2,3,4,5. The two knights, then, can appear in any of the remaining five squares (skipping over bishops and queen) in 10 ways. These are shown and numbered in the N5N table.

Scharnagl's NQ-skeleton Table
0QNN---192 QN--N- 384 Q-NN-- 576 Q-N--N 768 Q--N-N
16NQN---208 NQ--N- 400 -QNN-- 592 -QN—N 784 -Q-N-N
32NNQ---224 N-Q-N- 416 -NQN-- 608 -NQ—N 800 --QN-N
48NN-Q--240 N--QN- 432 -NNQ-- 624 -N-Q-N 816 --NQ-N
64NN--Q-256 N--NQ- 448 -NN-Q- 640 -N--QN 832 --N-QN
80NN---Q272 N--N-Q 464 -NN--Q 656 -N--NQ 848 --N-NQ
96QN-N--286 QN---N 480 Q-N-N- 672 Q--NN- 864 Q---NN
112NQ-N--304 NQ---N 496 -QN-N- 688 -Q-NN- 880 -Q--NN
128N-QN--320 N-Q--N 512 -NQ-N- 704 --QNN- 896 --Q-NN
144N-NQ--336 N--Q-N 528 -N-QN- 720 --NQN- 912 ---QNN
160N-N-Q-352 N---QN 544 -N-NQ- 736 --NNQ- 928 ---NQN
176N-N--Q368 N---NQ 560 -N-N-Q 752 --NN-Q 944 ---NNQ

For any SP, both the queens position and the N5N configuration are immediately available from the NQ-skeleton. The queen's position is the number of characters to the left of the "Q", giving 2 for the standard SP. The N5N configuration is obtained by omitting the "Q", giving -N-N- for the standard SP, so its N5N code is 5. In general

idn = (bishop's code) + 16* (queen's position) + 96* (N5N code)

For the standard SP, idn = 6 + 16*2 + 96*5 = 518

Going the other way, starting with an idn, divide it by 16 and get

idn = q1*16 + r1. r1 gives the bishop's code, so put the bishops on the board. Then divide q1 by 6.

q1 = q2*6 + r2. r2 gives the queen's position, so put it on the board.

q2 gives the N5N code, so put the knights on the board (of course skipping over the bishops and queen).

Starting with idn = 518, we get 518 = 32*16 + 6, and 32 = 5*6 + 2 so the bishop's code is 6, the queen's position is 2 and the N5N code is 5 with configuration -N-N-. If asterisks denote blank squares, the first rank fills up as: **B**B** **BQ*B** *NBQ*BN*

All of the multiplication and division can be eliminated by using the NQ-skeleton table below. It contains all of the 60 possible NQ-skeletons, and directly refers to all of the SPs with bishop's code 0, i.e. with bishops on a1 and b1.

Given an SP, extract the bishop's code, the NQ-skeleton and its N5N configuration. The six skeletons in each of the 10 blocks in the table all have the same N5N configuration, and the blocks are arranged according to the N5N table above. It is easy, then, to find the appropriate block, and look inside for the entry with the "Q" in the desired place, say at No. M. Then idn = (bishop's code) + M. For the standard SP, we extract 6 -NQ-N- and -N-N-. The desired block is the middle one in the second row, and the desired skeleton is at No. 512. We get idn = 6 + 512 = 518.

Going the other way, given an idn, locate, in the table, the largest number, say M, that is less than or equal to idn. Then idn - M gives the bishop's code, and the skeleton at M shows how to fill in the rest of the pieces. Given idn = 518 we locate 512, with NQ-skeleton -NQ-N-, in the table, and get bishops code = 518 - 512 = 6.

Fritz9 methods

Upon entry to Fischer random chess, Fritz9 prompts the user to enter a position idn or to "draw lots". If the user wishes to choose the first rank configuration of pieces, he/she must know how to get at the idn, but, unfortunately, Fritz9 does not use the standard method described above. The table below shows a quick way to get the Fritz9 idn for any SP.

For any SP, after ignoring the bishops, attention is given first to the knights (rather than to the queen). After taking account of the arrangement of the two knights in six squares (skipping over bishops), the queen is left with four possibilities: 0,1,2,3 (counting from the a-side of the board and skipping over bishops and knights). The queen's position is the number of hyphens to the left of the "Q" in the NQ-skeleton for the SP.

In the table below, the columns correspond to the queen's position, and, in each column, the ordering is alphabetic with "-" last.

Given an SP, extract the bishop's code, the NQ-skeleton and its queen's position. Then, locate, in the appropriate column, the NQ-skeleton at hand, say at No. M. The Fritz9 idn = (bishop's code) + M. For the standard SP, we extract 6 -NQ-N- and 1 and get Fritz9 idn = 6 + 353 = 359.

Fritz9 NQ-skeleton Table

1NNQ---241NN-Q--481NN--Q-721NN---Q
17NQN---257N-NQ--497N-N-Q-737N-N--Q
33NQ-N--273N-QN--513N--NQ-753N--N-Q
49NQ--N-289N-Q-N-529N--QN-769N---NQ
65NQ---N305N-Q--N545N--Q-N785N---QN
81QNN---321-NNQ--561-NN-Q-801-NN--Q
97QN-N--337-NQN--577-N-NQ-817-N-N-Q
113QN--N-353-NQ-N-593-N-QN-833-N--NQ
129QN---N369-NQ--N609-N-Q-N849-N--QN
145Q-NN--385-QNN--625--NNQ-865--NN-Q
161Q-N-N-401-QN-N-641--NQN-881--N-NQ
177Q-N--N417-QN--N657--NQ-N897--N-QN
193Q--NN-433-Q-NN-673--QNN-913---NNQ
209Q--N-N449-Q-N-N689--QN-N929---NQN
225Q---NN465-Q--NN705--Q-NN945---QNN

Anyone with Fritz9 can verify this table by entering in the idns. It directly refers to just those SPs with bishop's code 0 i.e. with the bishops on a1 and b1.

See also

Related Research Articles

<span class="mw-page-title-main">Algebraic notation (chess)</span> Method for recording and describing chess moves

Algebraic notation is the standard method for recording and describing the moves in a game of chess. It is based on a system of coordinates to uniquely identify each square on the chessboard. It is used by most books, magazines, and newspapers. In English-speaking countries, the parallel method of descriptive notation was generally used in chess publications until about 1980. A few players still use descriptive notation, but it is no longer recognized by FIDE, the international chess governing body.

<span class="mw-page-title-main">Rules of chess</span> Rules of play for the game of chess

The rules of chess govern the play of the game of chess. Chess is a two-player abstract strategy board game. Each player controls sixteen pieces of six types on a chessboard. Each type of piece moves in a distinct way. The object of the game is to checkmate the opponent's king. A game can end in various ways besides checkmate: a player can resign, and there are several ways in which a game can end in a draw.

<span class="mw-page-title-main">Fischer random chess</span> Chess variant invented by Bobby Fischer

Fischer random chess, also known as Chess960, is a variation of the game of chess invented by the former world chess champion Bobby Fischer. Fischer announced this variation on June 19, 1996, in Buenos Aires, Argentina. Fischer random chess employs the same board and pieces as classical chess, but the starting position of the pieces on the players' home ranks is randomized, following certain rules. The random setup makes gaining an advantage through the memorization of openings impracticable; players instead must rely more on their skill and creativity over the board.

Descriptive notation is a chess notation system based on abbreviated natural language. Its distinctive features are that it refers to files by the piece that occupies the back rank square in the starting position and that it describes each square two ways depending on whether it is from White or Black's point of view. It was common in English, Spanish and French chess literature until about 1980. In most other languages, the more concise algebraic notation was in use. Since 1981, FIDE no longer recognizes descriptive notation for the purposes of dispute resolution, and algebraic notation is now the accepted international standard.

This glossary of chess explains commonly used terms in chess, in alphabetical order. Some of these terms have their own pages, like fork and pin. For a list of unorthodox chess pieces, see Fairy chess piece; for a list of terms specific to chess problems, see Glossary of chess problems; for a list of named opening lines, see List of chess openings; for a list of chess-related games, see List of chess variants.

Capablanca chess is a chess variant invented in the 1920s by World Chess Champion José Raúl Capablanca. It incorporates two new pieces and is played on a 10×8 board. Capablanca believed that chess would be played out in a few decades. This threat of "draw death" for chess was his main motivation for creating a more complex version of the game.

A fairy chess piece, variant chess piece, unorthodox chess piece, or heterodox chess piece is a chess piece not used in conventional chess but incorporated into certain chess variants and some chess problems. Compared to conventional pieces, fairy pieces vary mostly in the way they move, but they may also follow special rules for capturing, promotions, etc. Because of the distributed and uncoordinated nature of unorthodox chess development, the same piece can have different names, and different pieces can have the same name in various contexts. Most are symbolised as inverted or rotated icons of the standard pieces in diagrams, and the meanings of these "wildcards" must be defined in each context separately. Pieces invented for use in chess variants rather than problems sometimes instead have special icons designed for them, but with some exceptions, many of these are not used beyond the individual games for which they were invented.

Portable Game Notation (PGN) is a standard plain text format for recording chess games, which can be read by humans and is also supported by most chess software.

Forsyth–Edwards Notation (FEN) is a standard notation for describing a particular board position of a chess game. The purpose of FEN is to provide all the necessary information to restart a game from a particular position.

Chess notation systems are used to record either the moves made or the position of the pieces in a game of chess. Chess notation is used in chess literature, and by players keeping a record of an ongoing game. The earliest systems of notation used lengthy narratives to describe each move; these gradually evolved into more compact notation systems. Algebraic notation is now the accepted international standard, with several variants. Descriptive chess notation was used in English- and Spanish-language literature until the late 20th century, but is now obsolescent. Portable Game Notation (PGN) is a text file format based on English algebraic notation which can be processed by most chess software. Other notation systems include ICCF numeric notation, used for international corresponcence chess, and systems for transmission using Morse code over telegraph or radio. The standard system for recording chess positions is Forsyth–Edwards Notation (FEN).

In chess, a relative value is a standard value conventionally assigned to each piece. Piece valuations have no role in the rules of chess but are useful as an aid to assessing a position.

<span class="mw-page-title-main">ChessV</span> Computer program designed to play chess variants

ChessV is a free computer program designed to play many chess variants. ChessV is an open-source, universal chess variant program with a graphical user-interface, sophisticated AI, support for opening books and other features of traditional chess programs. The developer of this program, Gregory Strong, has been adding more variants with each release of ChessV. Over 100 chess variants are supported, including the developer's few own variants and other exotic variants, and can be programmed to play additional variants. ChessV is designed to be able to play any game that is reasonably similar to chess. ChessV is one of only a few such programs that exist. The source code of this program is freely available for download as well as the executable program.

<span class="mw-page-title-main">Promotion (chess)</span> A rule in chess

In chess, promotion is the replacement of a pawn with a new piece. It occurs immediately when the pawn moves to its last rank. The player chooses the new piece to be a queen, rook, bishop, or knight of the pawn's color. The new piece does not have to be a previously captured piece. Promotion is mandatory; the pawn cannot remain as a pawn.

Transcendental chess (TC) also known as pre-chess, is a chess variant invented in 1978 by Maxwell Lawrence. Chess960 (Fischer random chess) is similar but has fewer starting positions. In transcendental chess the beginning positions of the pieces on the back row are randomly determined, with the one restriction that the bishops be on opposite-colored squares. There are 8,294,400 such positions in total. In Chess960 there are 960 possible starting positions, but that is because the king must be located between the rooks and both sides must have the same starting position. In transcendental chess there is no such rule so the position of one side can be any of 42×6!÷22 = 2,880. There is no castling. On the first turn a player, instead of making a move, can transpose any two pieces on the back row.

<span class="mw-page-title-main">Touch-move rule</span> Chess rule requiring a player to move or capture a piece deliberately touched

The touch-move rule in chess specifies that a player, having the move, who deliberately touches a piece on the board must move or capture that piece if it is legal to do so. If it is the player's piece that was touched, it must be moved if the piece has a legal move. If the opponent's piece was touched, it must be captured if it can be captured with a legal move. If the touched piece cannot be legally moved or captured, there is no penalty. This is a rule of chess that is enforced in all formal over-the-board competitions. A player claiming a touch-move violation must do so before themselves touching a piece. Online chess does not use the touch rule, letting players "pick up" a piece and then bring it back to the original square before selecting a different piece, and also allows players to premove pieces while waiting for the opponent to move.

Displacement chess is a family of chess variants in which a few pieces are transposed in the initial standard chess position. The main goal of these variants is to negate players' knowledge of standard chess openings.

A pawnless chess endgame is a chess endgame in which only a few pieces remain, and no pawns. The basic checkmates are types of pawnless endgames. Endgames without pawns do not occur very often in practice except for the basic checkmates of king and queen versus king, king and rook versus king, and queen versus rook. Other cases that occur occasionally are (1) a rook and minor piece versus a rook and (2) a rook versus a minor piece, especially if the minor piece is a bishop.

<span class="mw-page-title-main">Outline of chess</span> Overview of and topical guide to chess

The following outline is provided as an overview of and topical guide to chess:

<span class="mw-page-title-main">FIDE World Fischer Random Chess Championship 2022</span> 2022 world championship of a variation of chess

The FIDE World Fischer Random Chess Championship 2022 is the second official world championship in Fischer Random Chess. The competition follows a similar format to the first championship in 2019, with qualifying stages open to all interested participants taking place online on chess.com and Lichess, and four qualified players join four invited players in the over-the-board final, which will take place at the Berjaya Reykjavik Natura Hotel in Reykjavík, Iceland from 25 to 30 October 2022.