Answers.Body: <p>Several methods to do so are described on <a href="https://en.wikipedia.org/wiki/Chess960_starting_position#Methods_for_creating_starting_positions" rel="noreferrer">Wikipedia</a>. For example:</p>
  <blockquote>
  <p>Roll all the dice in one throw and place White's pieces as follows:</p>
  <ul>
  <li><p>Place a bishop on one of the eight squares (counting from the left, 'a' through 'h' ) as indicated by the octahedron (d8).</p>
  </li>
  <li><p>Place the other bishop on one of the four squares of opposite color as indicated by the tetrahedron (d4).</p>
  </li>
  <li><p>Place the queen on one of the remaining six squares as indicated by the cube (d6).</p>
  </li>
  <li><p>Take the value of the icosahedron (d20), divide by four  (round up), and let 'x' = the quotient, and 'y' = the remainder + 1. Place a knight on the 'x'-th empty square. Then place the other knight on the 'y'-th remaining empty square. In other words, see the d20 as a d5 for the first knight: 1-4, 5-8, 9-12, 13-16 and 17-20. Then for the second knight, look within the group to get a d4. For example, a 20 is in the fifth group and the fourth spot in that group, so place the knights on the fifth square and the fourth square. An 11 is in the third group and the third spot.</p>
  </li>
  </ul>
  <p>You can also use just a d10 since there are only ten unique placements of the knights once the bishops and queen has been placed. Hold one knight on the leftmost square and count one, two, three, four with the other knight on the empty square, then when it loops, move the leftmost knight one square to the right, five, six, seven, then it loops again, eight, nine, and finally with ten both knights are as far right as they go. For example, with a six the knight would be placed on the second of the five empty squares, then the second knight would be place on the second of the three squares that are empty to the right of the knight. Using a d10 in this way after two different colored d4:s and a d6 is a minimal one-roll way since 4×4×6×10 is exactly 960. (And, by subtracting one from each die and multipying with 1, 4, 16 and 96 respectively, then adding those numbers together, you find the number in the Chess960 numbering scheme.) The d8, d4, d6, d20 still give equal chance for all 960 positions, but with every position being represented in four different ways.</p>
  <p>Or alternatively (using an additional die and different calculations): Place the first knight according to the value of the d20 die, by counting the five empty squares and looping back to the left whenever reaching the rightmost empty square. Then with four empty squares remaining, do the same for the other knight using the dodecahedron (d12) die. With this method, every position is represented in 48 different ways.</p>
  <ul>
  <li>Place the king between the rooks on the remaining three squares.</li>
  </ul>
  </blockquote>
  <p>It is stated (but not proven) that this method (and the others) &quot;generat[e] random starting positions with equal probability&quot;.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-26T09:15:55.903Z
Answers.Text: Thanks. That's especially neat with the icosahedron. If we amend my method to use an icosahedron in that way to place the Ns, then we always need exactly 4 throws (d4 for each of the two Bs, d6 for Q, d20 for the two Ns together).
Answers.UserDisplayName: h34
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-26T13:10:00.223Z
Answers.Text: In principle, it should be possible to do it with 3 throws, since 960=20*12*4. The coding becomes more complicated though.
Answers.UserDisplayName: Federico Poloni
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-26T13:12:43.483Z
Answers.Text: Sure, that's essentially the same as [Shannon's noiseless coding theorem](https://en.wikipedia.org/wiki/Shannon%27s_source_coding_theorem).
Answers.UserDisplayName: Glorfindel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-26T13:15:00.783Z
Answers.Text: For instance, one such method would be: d4 tells the position of the black B; d12 tells the position of the white B *and* gives a 1-3 number which is combined with the first digit of the d20 (0 or 1) to encode the position of the Q; then the second digit of the d20 encodes the positions of the Ns.
Answers.UserDisplayName: Federico Poloni
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-26T09:04:38.080Z
Answers.LastActivityDate: 2018-10-26T09:04:38.080Z
Answers.LastEditDate: 2020-06-17T09:59:59.497Z
Answers.UserDisplayName: Glorfindel
Answers.Body: <p>In the year 2005 or earlier, an Edward D. Collins, wrote the following procedure "How to Create a Fischer Random Opening Position".</p>
  
  <p>The pawns  go on their original squares. The pieces will be placed  randomly on the back rank, subject to the rules of  Fischer Random chess. The bishops must be on opposite  colors and the King must be between the two Rooks.  For  each of the first five steps below, simply roll the die  and act accordingly to place the white pieces. After  placing White's pieces, Black's pieces are simply a  mirror image.      </p>
  
  <p>Step #1 Select a black square for the bishop
  If you roll a 1 place a bishop on a1. 
  If you roll a 2 place a bishop on c1. 
  If you roll a 3 place a bishop on e1. 
  If you roll a 4 place a bishop on g1.
  If you roll a 5 or a 6, roll again.</p>
  
  <p>Step #2 Select a white square for the next bishop
  If you roll a 1 place a bishop on b1. 
  If you roll a 2 place a bishop on d1. 
  If you roll a 3 place a bishop on f1. 
  If you roll a 4 place a bishop on h1.
  If you roll a 5 or a 6, roll again.</p>
  
  <p>Step #3 Place the Queen on the empty square of the number that you roll.
  For example, if you roll a 1, place a Queen on the first
  empty square. If you roll a 3, place the Queen on the third
  empty square.</p>
  
  <p>Step #4 Place a knight on the empty square of the number that you roll.
  Again, for example, if you roll a 2, place a knight on the second empty square.  If you roll a 6, roll again.</p>
  
  <p>Step #5 Repeat Step #4 for the other knight. 
  If you roll a 5 or a 6, roll again.</p>
  
  <p>Step #6 Finally, place the King in-between the two rooks.</p>
  
  <p>This procedure creates any of the possible  960 opening setups  with equal probability.</p>
  
  <p>EDIT: The source is <a href="http://www.edcollins.com/chess/fischer-random.htm" rel="nofollow noreferrer">http://www.edcollins.com/chess/fischer-random.htm</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-23T10:41:06.637Z
Answers.Text: That must have been made available earlier or someone else had also come up with the same method and put it online. I remember having played Fisher Random games back in late 1990s using that exact method and a d6 die. I read that from online somewhere like -97 or -98, but obviously I have no recollection from where exactly.
  
  That said, given the rules, the method is relatively obvious and is clearly uniform.
Answers.UserDisplayName: Tommi Kyntola
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-31T02:38:17.450Z
Answers.LastActivityDate: 2018-11-07T08:19:39.620Z
Answers.LastEditDate: 2018-11-07T08:19:39.620Z
Answers.UserDisplayName: djnavas
Answers.Body: <p>Numbering from white's left, and assuming each die carries consecutive integers starting at 1, you can do it in the order BQN as follows:</p>
  
  <ul>
  <li>throw a tetrahedron; if n is up, place the white-squared B on the nth free white square</li>
  <li>do the same for the other B, except place it on the nth free black square</li>
  <li>throw a cube; if n is up, place the Q on the nth free square</li>
  <li>throw a cube; rethrow until a number n≠6 is up; place a N on the nth free square</li>
  <li>throw a tetrahedron; if n is up, place the other N on the nth free square</li>
  <li>now place RKR on the remaining free squares in that order</li>
  </ul>
  
  <p>This method uses two dice: a tetrahedron and a cube. The tetrahedron is thrown 3 times; the cube a minimum of 2 times and a mean of 2.2 times.</p>
  
  <p>Equivalently, use a single dodecahedron and interpret n base 4 or 6 according to whether you would otherwise use a tetrahedron or cube. You then need to throw at least 5 times and a mean of 5.2 times.</p>
  
  <p>This is neat because all you need to remember is "BQN". But I do not know whether this yields all 960 positions with equal probability.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-26T13:55:19.597Z
Answers.Text: If you don't have a tetrahedron, you can, of course, throw a regular six-sided die until you get a result which isn't 5 or 6.
Answers.UserDisplayName: Arthur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-23T10:36:14.540Z
Answers.Text: That does produce the variations uniformly. This is because none the following steps after a die throw depend on the outcome of that die. Only the free spots will shift on the board, but the amount of possibilities will remain constant throughout the process.
  
  The permutations produced by that method of yours is 1920, but since the knights are interchangeable there are actually only 960 different variations possible, all equally likely given that method.
Answers.UserDisplayName: Tommi Kyntola
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-26T08:59:49.317Z
Answers.LastActivityDate: 2018-10-26T09:05:24.583Z
Answers.LastEditDate: 2018-10-26T09:05:24.583Z
Answers.UserDisplayName: h34
Body: <p>Using a set of Platonic dice (tetrahedron, cube, octahedron, dodecahedron, and icosahedron), what way of choosing the initial position in a game of Fischer Random Chess (Chess 960) uses the fewest dice throws?</p>
  
  <p>I am looking for a way that</p>
  
  <ul>
  <li><p>does not simply yield a number between 1 and 960 which you then look up on an ordered list of starting positions</p></li>
  <li><p>allows pieces to be placed in sequence - for example, first the rooks, then the bishops, then the king, or in some other order</p></li>
  <li><p>yields each of the 960 positions with equal probability</p></li>
  </ul>
  
  <p>The rules state that for each player bishops must be on squares of opposite colour and the king must be between the rooks.</p>
  
  <p>You do not have to use every die. If only, say, the octahedron needs to be used, that is fine!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-26T14:30:52.173Z
Comments.Text: I know FIDE took manual for it out of their rules book, but in 2011 or 2012 when I wrote application to draw Fisher Random chess starting positions it was available; it had very clear instructions about steps and their order. If I'll find - I post it. suggest checking FIDE handbook page with google way back machine, or search for about 10 years old FIDE rules version. Also if I overcome my laziness I'll check my application code on weekend.
Comments.UserDisplayName: Drako
Tags: <fischer><chess960>
Title: How to use dice to determine starting position in Fischer Random?
ThreadText: # How to use dice to determine starting position in Fischer Random?
  
  (Asked by: username_0 on 2018-10-26)
  
  Using a set of Platonic dice (tetrahedron, cube, octahedron, dodecahedron, and icosahedron), what way of choosing the initial position in a game of Fischer Random Chess (Chess 960) uses the fewest dice throws?
  
  I am looking for a way that
  
  * does not simply yield a number between 1 and 960 which you then look up on an ordered list of starting positions
  * allows pieces to be placed in sequence - for example, first the rooks, then the bishops, then the king, or in some other order
  * yields each of the 960 positions with equal probability
  
  The rules state that for each player bishops must be on squares of opposite colour and the king must be between the rooks.
  
  You do not have to use every die. If only, say, the octahedron needs to be used, that is fine!
  
  **Tags:** fischer, chess960
  
  > **Comments:**
  > **username_1**: I know FIDE took manual for it out of their rules book, but in 2011 or 2012 when I wrote application to draw Fisher Random chess starting positions it was available; it had very clear instructions about steps and their order. If I'll find - I post it. suggest checking FIDE handbook page with google way back machine, or search for about 10 years old FIDE rules version. Also if I overcome my laziness I'll check my application code on weekend.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2018-10-26. Score: 10
  
  Several methods to do so are described on [Wikipedia](https://en.wikipedia.org/wiki/Chess960_starting_position#Methods_for_creating_starting_positions). For example:
  
  > Roll all the dice in one throw and place White's pieces as follows:
  >
  > * Place a bishop on one of the eight squares (counting from the left, 'a' through 'h' ) as indicated by the octahedron (d8).
  > * Place the other bishop on one of the four squares of opposite color as indicated by the tetrahedron (d4).
  > * Place the queen on one of the remaining six squares as indicated by the cube (d6).
  > * Take the value of the icosahedron (d20), divide by four (round up), and let 'x' = the quotient, and 'y' = the remainder + 1. Place a knight on the 'x'-th empty square. Then place the other knight on the 'y'-th remaining empty square. In other words, see the d20 as a d5 for the first knight: 1-4, 5-8, 9-12, 13-16 and 17-20. Then for the second knight, look within the group to get a d4. For example, a 20 is in the fifth group and the fourth spot in that group, so place the knights on the fifth square and the fourth square. An 11 is in the third group and the third spot.
  >
  > You can also use just a d10 since there are only ten unique placements of the knights once the bishops and queen has been placed. Hold one knight on the leftmost square and count one, two, three, four with the other knight on the empty square, then when it loops, move the leftmost knight one square to the right, five, six, seven, then it loops again, eight, nine, and finally with ten both knights are as far right as they go. For example, with a six the knight would be placed on the second of the five empty squares, then the second knight would be place on the second of the three squares that are empty to the right of the knight. Using a d10 in this way after two different colored d4:s and a d6 is a minimal one-roll way since 4×4×6×10 is exactly 960. (And, by subtracting one from each die and multipying with 1, 4, 16 and 96 respectively, then adding those numbers together, you find the number in the Chess960 numbering scheme.) The d8, d4, d6, d20 still give equal chance for all 960 positions, but with every position being represented in four different ways.
  >
  > Or alternatively (using an additional die and different calculations): Place the first knight according to the value of the d20 die, by counting the five empty squares and looping back to the left whenever reaching the rightmost empty square. Then with four empty squares remaining, do the same for the other knight using the dodecahedron (d12) die. With this method, every position is represented in 48 different ways.
  >
  > * Place the king between the rooks on the remaining three squares.
  
  It is stated (but not proven) that this method (and the others) "generat[e] random starting positions with equal probability".
  
  > **Comments:**
  > **username_0**: Thanks. That's especially neat with the icosahedron. If we amend my method to use an icosahedron in that way to place the Ns, then we always need exactly 4 throws (d4 for each of the two Bs, d6 for Q, d20 for the two Ns together).  
  > **username_3**: In principle, it should be possible to do it with 3 throws, since 960=20*12*4. The coding becomes more complicated though.  
  > **username_2**: Sure, that's essentially the same as [Shannon's noiseless coding theorem](https://en.wikipedia.org/wiki/Shannon%27s_source_coding_theorem).  
  > **username_3**: For instance, one such method would be: d4 tells the position of the black B; d12 tells the position of the white B *and* gives a 1-3 number which is combined with the first digit of the d20 (0 or 1) to encode the position of the Q; then the second digit of the d20 encodes the positions of the Ns.  
  
  ---
  
  ### Answer by username_4 on 2018-10-31. Score: 4
  
  In the year 2005 or earlier, an Edward D. Collins, wrote the following procedure "How to Create a Fischer Random Opening Position".
  
  The pawns go on their original squares. The pieces will be placed randomly on the back rank, subject to the rules of Fischer Random chess. The bishops must be on opposite colors and the King must be between the two Rooks. For each of the first five steps below, simply roll the die and act accordingly to place the white pieces. After placing White's pieces, Black's pieces are simply a mirror image.
  
  Step #1 Select a black square for the bishop
  If you roll a 1 place a bishop on a1.
  If you roll a 2 place a bishop on c1.
  If you roll a 3 place a bishop on e1.
  If you roll a 4 place a bishop on g1.
  If you roll a 5 or a 6, roll again.
  
  Step #2 Select a white square for the next bishop
  If you roll a 1 place a bishop on b1.
  If you roll a 2 place a bishop on d1.
  If you roll a 3 place a bishop on f1.
  If you roll a 4 place a bishop on h1.
  If you roll a 5 or a 6, roll again.
  
  Step #3 Place the Queen on the empty square of the number that you roll.
  For example, if you roll a 1, place a Queen on the first
  empty square. If you roll a 3, place the Queen on the third
  empty square.
  
  Step #4 Place a knight on the empty square of the number that you roll.
  Again, for example, if you roll a 2, place a knight on the second empty square. If you roll a 6, roll again.
  
  Step #5 Repeat Step #4 for the other knight.
  If you roll a 5 or a 6, roll again.
  
  Step #6 Finally, place the King in-between the two rooks.
  
  This procedure creates any of the possible 960 opening setups with equal probability.
  
  EDIT: The source is <http://www.edcollins.com/chess/fischer-random.htm>
  
  > **Comments:**
  > **username_5**: That must have been made available earlier or someone else had also come up with the same method and put it online. I remember having played Fisher Random games back in late 1990s using that exact method and a d6 die. I read that from online somewhere like -97 or -98, but obviously I have no recollection from where exactly.  That said, given the rules, the method is relatively obvious and is clearly uniform.  
  
  ---
  
  ### Answer by username_0 on 2018-10-26. Score: 4
  
  Numbering from white's left, and assuming each die carries consecutive integers starting at 1, you can do it in the order BQN as follows:
  
  * throw a tetrahedron; if n is up, place the white-squared B on the nth free white square
  * do the same for the other B, except place it on the nth free black square
  * throw a cube; if n is up, place the Q on the nth free square
  * throw a cube; rethrow until a number n≠6 is up; place a N on the nth free square
  * throw a tetrahedron; if n is up, place the other N on the nth free square
  * now place RKR on the remaining free squares in that order
  
  This method uses two dice: a tetrahedron and a cube. The tetrahedron is thrown 3 times; the cube a minimum of 2 times and a mean of 2.2 times.
  
  Equivalently, use a single dodecahedron and interpret n base 4 or 6 according to whether you would otherwise use a tetrahedron or cube. You then need to throw at least 5 times and a mean of 5.2 times.
  
  This is neat because all you need to remember is "BQN". But I do not know whether this yields all 960 positions with equal probability.
  
  > **Comments:**
  > **username_6**: If you don't have a tetrahedron, you can, of course, throw a regular six-sided die until you get a result which isn't 5 or 6.  
  > **username_5**: That does produce the variations uniformly. This is because none the following steps after a die throw depend on the outcome of that die. Only the free spots will shift on the board, but the amount of possibilities will remain constant throughout the process.  The permutations produced by that method of yours is 1920, but since the knights are interchangeable there are actually only 960 different variations possible, all equally likely given that method.  
  
  ---
  
  