From: H.G. Muller Date: Sun, 7 Nov 2010 20:46:33 +0000 (+0100) Subject: Properly calculate material eval in asymmetric setups X-Git-Tag: 4.8Q~23 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e4b687bb7d8818f0a9c5604413fc57844fd112e4;p=fairymax.git Properly calculate material eval in asymmetric setups InitGame assumed that Q=0 in the opening position, but with different armies this needs not be true. Now it is properly calculated. In the calculation of R it as also no longer assumed that piece 3 is royal, and spare Kings are accounted for. --- diff --git a/fairymax.c b/fairymax.c index be12a63..8d6a125 100644 --- a/fairymax.c +++ b/fairymax.c @@ -366,8 +366,10 @@ InitEngine() InitGame() { - int i,j; + int i,j,k=0; + Side = WHITE; Q=0; O=S; + Fifty = 0; R = 0; for(i=0;i<16*BH;i++)b[i]=0; for(i=0;i<32;i++)pl[i]=0; K=BW;W(K--) @@ -377,10 +379,13 @@ InitGame() if(w[oo[K]] == -1)pl[oo[K]]=1; L=8;W(L--)b[16*L+K+257]=(K-BW/2)*(K-BW/2)+(L-3.5)*(L-3.5); /* center-pts table */ } /*(in unused half b[])*/ - Side = WHITE; Q=0; O=S; - Fifty = 0; R = 0; - for(i=0; i