From e4b687bb7d8818f0a9c5604413fc57844fd112e4 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 7 Nov 2010 21:46:33 +0100 Subject: [PATCH] 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. --- fairymax.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) 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