Author: blass uri
Date: 09:41:18 07/12/99
Go up one level in this thread
On July 12, 1999 at 11:37:30, blass uri wrote:
>
>On July 12, 1999 at 09:37:12, Andrew Dados wrote:
>
>>On July 12, 1999 at 02:49:49, blass uri wrote:
>>
>>>passed pawns,pawns on the same file and promoted pawns are declared to be good
>>>pawns
>>>The other pawns are declared to be bad pawns and have no chance to promote
>>>before improving their behaviour.
>>>
>>>It is easy to check that the number of white good pawns is at most the sum of
>>>the number of captured white pieces and twice the number of black pieces that
>>>were captured
>>>because every capture of white piece increases the number of white good pawn by
>>>at most 1 and every capture of black piece increases the number of white good
>>>pawns by at most 2.
>>>
>>>I use this observation to develop my new c program to calculate an upper bound
>>>for the number of chess positions.
>>>
>>>please tell me if I have a mistake in the program and if you know a way to
>>>calculate the exact integer.
>>>
>>>I got 9.27397309111305334*10^43
>>>
>>>You should multiply it by 2 because I did not consider side to move.
>>>I also did not consider other things like castling
>>>
>>>
>>>#include
>>>#include
>>>main()
>>>{
>>>clrscr();
>>>char x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,i,j;
>>>long double k,n=0;
>>>long double m[65];
>>>m[0]=1;
>>>for (i=1; i> m[i]=m[i-1]*i;
>>>for (x1=0; x1> for (x2=0;x2> for (x3=0;(x3> for (x4=0;(x4> for (x5=0;(x5> x1+x2+x3+x5> ;x5++)
>>>{
>>>k=m[x2]*m[x3]*m[x4]*m[x5];
>>>i=0;
>>>if (x2>2) i=i+x2-2;
>>>if (x3>2) i=i+x3-2;
>>>if (x4>2) i=i+x4-2;
>>>if (x5>1) i=i+x5-1;
>>>printf("%Lf\n",n);
>>>for (y1=0; y1> for (y2=0;y2> for (y3=0;(y3> for (y4=0;(y4> for (y5=0;(y5> y1+y2+y3+y5> ;y5++)
>>> {
>>> j=0;
>>> if (y2>2) j=j+y2-2;
>>> if (y3>2) j=j+y3-2;
>>> if (y4>2) j=j+y4-2;
>>> if (y5>1) j=j+y5-1;
>>> if ((i<=2*(15-y1-y2-y3-y4-y5)+(15-x1-x2-x3-x4-x5))&&
>>> (j<=2*(15-x1-x2-x3-x4-x5)+(15-y1-y2-y3-y4-y5)))\
>>> n=n+(m[48]/(m[x1]*m[y1]*m[48-x1-y1]))*(m[64-x1-y1]/\
>>> (k*m[y2]*m[y3]*m[y4]*m[y5]*m[62-x2-x3-x4-x5-y2-y3-y4-y5]));
>>> }
>>>}
>>>
>>>printf("%Lf\n",n);
>>>}
>>>
>>>
>>>
>>>Uri
>>
>> Hello Uri! Can you possibly modify output and post position numbers breakdown
>>for total piece numbers in your upperbound? (I'm interested in position number
>>bound for 32-25 pieces especially... they seem to dominate in your sum and they
>>can be brought down a bit with some tricks, I think...).
>
>
>I discovered something illogical is the number of cases with 32 pieces and
>corrected a mistake.
>The correct expression Instead of m[62-x2-x3-x4-x5-y2-y3-y4-y5] is
>m[62-x1-y1-x2-x3-x4-x5-y2-y3-y4-y5]
>
>The number of positions is still smaller than 10^47 but not smaller than 10^44
>
>The case of 29 pieces(27 without king) is the dominate case.
>
>Uri
some numbers:
The upper bound:
3.70106301212072366*10^46
29 pieces on the board:2.18...*10^46
28 pieces on the board 9.45...*10^45
30 pieces on the board 4.58...*10^45
Uri
This page took 0.01 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.