Fischer random chess numbering scheme: Difference between revisions

Content deleted Content added
Calmapalma (talk | contribs)
No edit summary
m Direct derivation: In chess we refer to light squares and dark squares
Tags: Mobile edit Mobile app edit Android app edit App section source
 
(9 intermediate revisions by 4 users not shown)
Line 1:
{{Short description|Naming a Fischer Random board using numbers}}
{{Refimprove|date=August 2012}}
 
Line 8 ⟶ 9:
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 brightlight 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).
Line 14 ⟶ 15:
'''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. Ignoring '''Bishops''' and '''Queen''', find the positions of two '''Knights''' within the remaining five spaces. Place the '''Knights''' according to its value by consulting the following '''N5N''' table:
 
{| class=wikitable cellpadding="4" cellspacing="0"
Line 45 ⟶ 46:
 
== 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 ===
 
{{Chess diagram small
|tright
|rd|nd|bd|qd|kd|bd|nd|rd
|pd|pd|pd|pd|pd|pd|pd|pd
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
|pl|pl|pl|pl|pl|pl|pl|pl
|rl|nl|bl|ql|kl|bl|nl|rl
|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 ===
Line 137 ⟶ 119:
|}
 
{{Chess diagram small
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.
|tright
|rd|nd|bd|qd|kd|bd|nd|rd
|pd|pd|pd|pd|pd|pd|pd|pd
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
|pl|pl|pl|pl|pl|pl|pl|pl
|rl|nl|bl|ql|kl|bl|nl|rl
|The standard starting position for chess is denoted by SP-518.
}}
 
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.
 
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.
 
===Scharnagl's methods===
 
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.
 
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.
Line 181:
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.
 
{| class=wikitable cellpadding="4" cellspacing="0"
In the table below, the columns correspond to the queen's position, and, in each column, the ordering is alphabetic with "-" last.
|- style="background:#eeeeee;" align="center"
| Digit
| colspan="6" | Knight positioning
|- align="center"
| '''0''' || N || N || - || - || - || -
|- align="center"
| '''1''' || N || - || N || - || - || -
|- align="center"
| '''2''' || N || - || - || N || - || -
|- align="center"
| '''3''' || N || - || - || - || N || -
|- align="center"
| '''4''' || N || - || - || - || - || N
|- align="center"
| '''5''' || - || N || N || - || - || -
|- align="center"
| '''6''' || - || N || - || N || - || -
|- align="center"
| '''7''' || - || N || - || - || N || -
|- align="center"
| '''8''' || - || N || - || - || - || N
|- align="center"
| '''9''' || - || - || N || N || - || -
|- align="center"
| '''10''' || - || - || N || - || N || -
|- align="center"
| '''11''' || - || - || N || - || - || N
|- align="center"
| '''12''' || - || - || - || N || N || -
|- align="center"
| '''13''' || - || - || - || N || - || N
|- align="center"
| '''14''' || - || - || - || - || N || N
|}
 
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-RNQKNR and 1 and get Fritz9 idn = 6 + 353 = 359.
 
'''Fritz9 NQ-skeleton Table'''
Line 189 ⟶ 223:
{| class=wikitable
|-
| 1 || NNQ---NNQRKR || 241 || NN-Q--NNRQKR || 481 || NN--Q-NNRKQR || 721 || NN---QNNRKRQ
|-
| 17 || NQN---NQNRKR || 257 || N-NQ--NRNQKR || 497 || N-N-Q-NRNKQR || 737 || N-N--QNRNKRQ
|-
| 33 || NQ-N--NQRNKR || 273 || N-QN--NRQNKR || 513 || N--NQ-NRKNQR || 753 || N--N-QNRKNRQ
|-
| 49 || NQ--N-NQRKNR || 289 || N-Q-N-NRQKNR || 529 || N--QN-NRKQNR || 769 || N---NQNRKRNQ
|-
| 65 || NQ---NNQRKRN || 305 || N-Q--NNRQKRN || 545 || N--Q-NNRKQRN || 785 || N---QNNRKRQN
|-
| 81 || QNN---QNNRKR || 321 || -NNQ--RNNQKR || 561 || -NN-Q-RNNKQR || 801 || -NN--QRNNKRQ
|-
| 97 || QN-N--QNRNKR || 337 || -NQN--RNQNKR || 577 || -N-NQ-RNKNQR || 817 || -N-N-QRNKNRQ
|-
| 113 || QN--N-QNRKNR || 353 || -NQ-N-RNQKNR || 593 || -N-QN-RNKQNR || 833 || -N--NQRNKRNQ
|-
| 129 || QN---NQNRKRN || 369 || -NQ--NRNQKRN || 609 || -N-Q-NRNKQRN || 849 || -N--QNRNKRQN
|-
| 145 || Q-NN--QRNNKR || 385 || -QNN--RQNNKR || 625 || --NNQ-RKNNQR || 865 || --NN-QRKNNRQ
|-
| 161 || Q-N-N-QRNKNR || 401 || -QN-N-RQNKNR || 641 || --NQN-RKNQNR || 881 || --N-NQRKNRNQ
|-
| 177 || Q-N--NQRNKRN || 417 || -QN--NRQNKRN || 657 || --NQ-NRKNQRN || 897 || --N-QNRKNRQN
|-
| 193 || Q--NN-QRKNNR || 433 || -Q-NN-RQKNNR || 673 || --QNN-RKQNNR || 913 || ---NNQRKRNNQ
|-
| 209 || Q--N-NQRKNRN || 449 || -Q-N-NRQKNRN || 689 || --QN-NRKQNRN || 929 || ---NQNRKRNQN
|-
| 225 || Q---NNQRKRNN || 465 || -Q--NNRQKRNN || 705 || --Q-NNRKQRNN || 945 || ---QNNRKRQNN
|}
 
Line 230 ⟶ 264:
 
{{DEFAULTSORT:Fischer Random Chess Numbering Scheme}}
[[Category:Fischer random chessChess960|numbering scheme]]