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).


This depends a great deal on how (and what) you count. In a discussion at the CCRL board, 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

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.

  • Although I don't have the position count, the size of the 7-piece Lomonosov tablebase is 140 terabytes. chessok.com/?page_id=27966 – tbischel Sep 5 '14 at 17:39
  • Another important consideration is whether it is white or black to move – bcdan Jul 14 '18 at 0:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.