Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Approximate # of Unique chess positions (FEN working)

Author: Uri Blass

Date: 00:02:41 01/19/02

Go up one level in this thread


On January 18, 2002 at 20:53:48, Sune Fischer wrote:

>On January 18, 2002 at 20:52:40, Sune Fischer wrote:
>
>>On January 18, 2002 at 20:24:52, Uri Blass wrote:
>>
>>>On January 18, 2002 at 19:49:25, Sune Fischer wrote:
>>>
>>>>On January 18, 2002 at 19:26:08, Chris Hull wrote:
>>>>
>>>>>On January 18, 2002 at 19:06:26, Chris Hull wrote:
>>>>>
>>>>>>On January 18, 2002 at 17:13:29, Sune Fischer wrote:
>>>>>>
>>>>>>>
>>>>>>>Hehe, this was the old:
>>>>>>>(64*(64 - 4)*62!)/((62 - 30)!*(8!*2!*2!*2*2)^2)= 1.1*10^42
>>>>>>>capture a piece and turn a pawn into a queen:
>>>>>>>(64*(64 - 4)*62!)/((62 - 29)!*7!*8!*2!(2!*2!*2*2)^2)= 1.33*10^41
>>>>>>>
>>>>>>>OK, so its about a factor 10 or maybe about same order of magnitude, they drop
>>>>>>>fairly quickly though.
>>>>>>>
>>>>>>>>Here is the table of numbers Uri's program dumps as it goes (which is the list
>>>>>>>>by category):
>>>>>>>
>>>>>>>I would like to know his approach ;)
>>>>>>>
>>>>>>>
>>>>>>>I'm quite sure it is, unless someone can find a flaw in the product (which there
>>>>>>>could be of cause;)
>>>>>>>A number like 64 squares for the king is very optimistic, most of the squares
>>>>>>>will be attacked, you can't be in check if it isn't your turn, and you can't be
>>>>>>>in check by more than two pieces (right?) and so on, many rules that will
>>>>>>>diminish the final product. In particular the pawn movement, pawns have a rather
>>>>>>>limited number of squares they can go to, if just one pawn has half of 64
>>>>>>>squares, then that is a factor 2 smaller yet.
>>>>>>>
>>>>>>>-S.
>>>>>>>
>>>>>>
>>>>>>Does this take into account all the possible promotions? It is possible to have
>>>>>>9 queens on one side or 9 rooks or 9 bishops or 9 knights, or any combination
>>>>>>thereof. Each possible promotion will make the number larger. 31 pieces on the
>>>>>>board has more possible positions than 32 because you have to take into account
>>>>>>the promotions. If 31 pieces are remaining there is upto 3 possible promotions.
>>>>>>Makes the calculation a little more difficult.
>>>>>>
>>>>>>Chris
>>>>>>
>>>>>
>>>>>Oops, make that 9 queens or 10 rooks, or 10 bishops or 10 knights. Some days my
>>>>>fingers work faster than my brain.
>>>>>
>>>>>Chris
>>>>
>>>>You do have a point Chris.
>>>>I tried to refine the number a little bit:
>>>>
>>>>All 32 pieces:
>>>>(64*(64 - 4)*23^4*21^4*18^4*14^4*62!)/((62 - 14)!*(8!*2!*2!*2*2)^2)
>>>>= 5.13*10^36
>>>>
>>>>I put in the factor: 23^4*21^4*18^4*14^4
>>>>because the d and e pawns has 23 squares, the c and f pawns has 21 squares and
>>>>the b and g has 18, a and h has 14 (unless I miscounted;)
>>>
>>>I do not understand it
>>
>>Actually there are 24 squares for a white d pawn:
>[D]8/pppppppp/PPPPPPPP/PPPPPPP1/1PPPPP2/2PPP3/3P4/8 w - - 0 1

I understand now your idea but with 32 pieces there are only 5 options for white
d pawns because the white d pawn can go to another file only by capture.

d2 d3 d4 d5 d6 d7 are the options.

My 15 options are for white and black pawn on the d file and the same for every
file.

d2 d7
d2 d6
d2 d5
d2 d4
d2 d3
d3 d7
d3 d6
d3 d5
d3 d4
d4 d5
d4 d6
d4 d7
d5 d6
d5 d7
d6 d7

are the possible squares for d pawns when there are no captures.

It is exactly 15 and the same for every file.

My program did not use the 15^8 limit for the pawns squares and assumed that
every pawn can be chosen from 48 squares.

It is not close to be truth when you have 32 pieces but it becomes closer to the
truth when there are less pieces.

It is clear that if both sides have exactly 2 pawns you can choose them from the
48 squares in the board in every possible way.

It is not truth for 3 pawns and h2 h3 g2 is an example for squares that cannot
be squares of white pawns but it is still truth for almost all the cases of 3
pawns.

Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.