Answers.Body: <p>This depends a great deal on how (and what) you count. In <a href="http://kirill-kryukov.com/chess/discussion-board/viewtopic.php?f=6&amp;t=6639" rel="nofollow noreferrer">a discussion at the CCRL board</a>, Kirill Kryukov offers the following counts on the number of unique legal positions (NULP) for some small numbers of pieces:</p>
  
  <pre><code>Pieces          NULP
    2                  462
    3              368,079
    4          125,246,598
    5       25,912,594,054
    6    3,787,154,440,416
  </code></pre>
  
  <p>But it is important to note that his numbers (which he was in fact soliciting independent confirmation of, so take with a grain of salt) depend on his definition of a legal position:</p>
  
  <blockquote>
    <p>I use simple definition of legality: 1. Side to move does not give check. (2. No pawns on promotion rank or before the starting rank. 3. Exactly one white king and exactly one black king are on the board).</p>
  </blockquote>
  
  <p>Thus he doesn't consider the matter of positions actually being reachable from the starting position of chess, for instance. There is a lot of discussion there to go through if you wish.</p>
  
  <p>Another key point is that these position counts take the symmetries of the chessboard into account. With the 2-piece positions, for example, the naive count (which would be reduced a bit for legality, i.e. non-touching kings) would be roughly <code>64 * 63 = 4,032</code>. The reason his count is so much less is because he is counting unique positions as would be stored in tablebases, where for the sake of saving space positions that are symmetric variants of one another are not counted distinctly. The <code>462</code> 2-piece positions can be pictured like this (and forgive my ugly drawing):</p>
  
  <p><img src="https://i.sstatic.net/IxLFK.png" alt="2-piece position count"></p>
  
  <p>Taking symmetry redundancies into account, there are only 10 unique squares where our first king could be placed (those within the red border). And then, taking legality and further symmetries into account, there are only so many remaining squares where the second king could be placed (indicated by the numbers, for each of the 10 initial squares). These sum up to the <code>462</code> unique positions in question.</p>
  
  <p>To illustrate one case, why is the count <code>30</code> for the d4 square? Of the <code>63</code> remaining squares, <code>8</code> wouldn't be legal. Of the remaining <code>55</code>, the <code>5</code> on the long diagonal are all unique, but the remaining <code>50</code> come in <code>25</code> pairs of squares whose resulting positions are no longer unique with respect to the symmetries of the board (in particular, they are mirror images of one another when reflected across the long diagonal). So there are only <code>5 + 25</code> unique placements of the second king once we place the first king on d4.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-05T17:39:30.837Z
Answers.Text: Although I don't have the position count, the size of the 7-piece Lomonosov tablebase is 140 terabytes.
  http://chessok.com/?page_id=27966
Answers.UserDisplayName: tbischel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-14T00:48:05.460Z
Answers.Text: Another important consideration is whether it is white or black to move
Answers.UserDisplayName: bcdan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-05T01:19:25.427Z
Answers.LastActivityDate: 2014-09-05T01:25:14.803Z
Answers.LastEditDate: 2014-09-05T01:25:14.803Z
Answers.UserDisplayName: ETD
Body: <p>Note that I don't want the exact values, I only need approximations. And I am only interested in small values of n (not more than 12).</p>
  
Tags: <endgame><statistics><tablebases><mathematics>
Title: How many positions are there in n-pieces endgame tablebases for different values of n?
ThreadText: # How many positions are there in n-pieces endgame tablebases for different values of n?
  
  (Asked by: username_0 on 2014-09-05)
  
  Note that I don't want the exact values, I only need approximations. And I am only interested in small values of n (not more than 12).
  
  **Tags:** endgame, statistics, tablebases, mathematics
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-09-05. Score: 5
  
  This depends a great deal on how (and what) you count. In [a discussion at the CCRL board](http://kirill-kryukov.com/chess/discussion-board/viewtopic.php?f=6&t=6639), Kirill Kryukov offers the following counts on the number of unique legal positions (NULP) for some small numbers of pieces:
  
  ```
  Pieces          NULP
    2                  462
    3              368,079
    4          125,246,598
    5       25,912,594,054
    6    3,787,154,440,416
  
  ```
  
  But it is important to note that his numbers (which he was in fact soliciting independent confirmation of, so take with a grain of salt) depend on his definition of a legal position:
  
  > I use simple definition of legality: 1. Side to move does not give check. (2. No pawns on promotion rank or before the starting rank. 3. Exactly one white king and exactly one black king are on the board).
  
  Thus he doesn't consider the matter of positions actually being reachable from the starting position of chess, for instance. There is a lot of discussion there to go through if you wish.
  
  Another key point is that these position counts take the symmetries of the chessboard into account. With the 2-piece positions, for example, the naive count (which would be reduced a bit for legality, i.e. non-touching kings) would be roughly `64 * 63 = 4,032`. The reason his count is so much less is because he is counting unique positions as would be stored in tablebases, where for the sake of saving space positions that are symmetric variants of one another are not counted distinctly. The `462` 2-piece positions can be pictured like this (and forgive my ugly drawing):
  
  ![2-piece position count](https://i.sstatic.net/IxLFK.png)
  
  Taking symmetry redundancies into account, there are only 10 unique squares where our first king could be placed (those within the red border). And then, taking legality and further symmetries into account, there are only so many remaining squares where the second king could be placed (indicated by the numbers, for each of the 10 initial squares). These sum up to the `462` unique positions in question.
  
  To illustrate one case, why is the count `30` for the d4 square? Of the `63` remaining squares, `8` wouldn't be legal. Of the remaining `55`, the `5` on the long diagonal are all unique, but the remaining `50` come in `25` pairs of squares whose resulting positions are no longer unique with respect to the symmetries of the board (in particular, they are mirror images of one another when reflected across the long diagonal). So there are only `5 + 25` unique placements of the second king once we place the first king on d4.
  
  > **Comments:**
  > **username_2**: Although I don't have the position count, the size of the 7-piece Lomonosov tablebase is 140 terabytes. http://chessok.com/?page_id=27966  
  > **username_3**: Another important consideration is whether it is white or black to move  
  
  ---
  
  