Answers.Body: <p>The number is <strong>4672</strong> from Google.</p>
  
  <blockquote>
    <p><a href="https://arxiv.org/pdf/1712.01815.pdf" rel="noreferrer">https://arxiv.org/pdf/1712.01815.pdf</a></p>
  </blockquote>
  
  <pre><code>A move in chess may be described in two parts: selecting the piece to move, and then
  selecting among the legal moves for that piece. We represent the policy π(a|s) by a 8 × 8 × 73
  stack of planes encoding a probability distribution over 4,672 possible moves. Each of the 8×8
  positions identifies the square from which to “pick up” a piece.
  </code></pre>
  
  <p>4672 might sound a big number but it's nothing to what Google (and many other competitors) has been doing to deep learning for image analysis. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-21T15:35:52.390Z
Answers.Text: The paper explains the 4672 number: 8 * 8 * (56 + 8 + 9). Can someone help me understand why there are 9 planes for promotion, instead of 12? I understand there are 3 pawn moves: straight, diagonal left, diagonal right. But pawn can be promoted to 4 kinds: knight, rook, bishop, and queen. So that would have been 12. Why queen was not considered in the paper?
Answers.UserDisplayName: bizi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-16T06:24:07.380Z
Answers.LastActivityDate: 2018-04-16T06:24:07.380Z
Answers.UserDisplayName: SmallChess
Body: <p>In a neural network for chess (or checkers), the output is a piece or square on the board and an end position.</p>
  
  <p>How would one encode this?</p>
  
  <p>As far as I can see choosing a starting square is 8x8=64 outputs and an ending square is 8x8=64 outputs. So the total number of possible moves is 64x64 4096 outputs. Giving a probability for every possible move.</p>
  
  <p>Is this correct? This seems like an awful lot of outputs!</p>
  
Tags: <neural-networks><chess>
Title: How do you encode a chess move in a neural network?
UserDisplayName: zooby
ThreadText: # How do you encode a chess move in a neural network?
  
  (Asked by: username_0 on 2018-04-15)
  
  In a neural network for chess (or checkers), the output is a piece or square on the board and an end position.
  
  How would one encode this?
  
  As far as I can see choosing a starting square is 8x8=64 outputs and an ending square is 8x8=64 outputs. So the total number of possible moves is 64x64 4096 outputs. Giving a probability for every possible move.
  
  Is this correct? This seems like an awful lot of outputs!
  
  **Tags:** neural-networks, chess
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-04-16. Score: 5 | Accepted answer
  
  The number is **4672** from Google.
  
  > <https://arxiv.org/pdf/1712.01815.pdf>
  
  ```
  A move in chess may be described in two parts: selecting the piece to move, and then
  selecting among the legal moves for that piece. We represent the policy π(a|s) by a 8 × 8 × 73
  stack of planes encoding a probability distribution over 4,672 possible moves. Each of the 8×8
  positions identifies the square from which to “pick up” a piece.
  
  ```
  
  4672 might sound a big number but it's nothing to what Google (and many other competitors) has been doing to deep learning for image analysis.
  
  > **Comments:**
  > **username_2**: The paper explains the 4672 number: 8 * 8 * (56 + 8 + 9). Can someone help me understand why there are 9 planes for promotion, instead of 12? I understand there are 3 pawn moves: straight, diagonal left, diagonal right. But pawn can be promoted to 4 kinds: knight, rook, bishop, and queen. So that would have been 12. Why queen was not considered in the paper?  
  
  ---
  
  