From 04cab86f1aaa0720980153e862ce8641beee489b Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 9 Oct 2014 18:48:22 +0200 Subject: [PATCH] Increase centralization bonus of bare King Any bare King is detected before starting the search, by counting pieces. Its centralization points are then multiplied by 5. In addition null move is switched off by faking material count R = 4. This helps a lot in Makruk KNFFK end-games. The hash table is invalidated to soften the shock of that. This can only work when white and black King are defined as different pieces, and the feature is triggered by piece 3 and 4 being royal. --- fairymax.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fairymax.c b/fairymax.c index 5ec3380..9b80061 100644 --- a/fairymax.c +++ b/fairymax.c @@ -580,6 +580,9 @@ int main(int argc, char **argv) tlim = (0.6-0.06*(BW-8))*(TimeLeft+(m-1)*TimeInc)/(m+7); if(tlim>TimeLeft/15) tlim = TimeLeft/15; PromPiece = 0; /* Always promote to Queen ourselves */ + for(N=K=0;K>8<2)centr[4]=5;if(!(N&S-2))centr[3]=5;Z+=R>4;R=4;} +printf("# %04x pieces, centr = (%d,%d)\n", N, centr[3], centr[4]); N=0;K=I; if(hill) centr[3] = R>20 ? 1 : 22-R; if (D(Side,-I,I,Q,O,LL|S,3)==I) { @@ -587,7 +590,7 @@ int main(int argc, char **argv) m = GetTickCount() - Ticks; printf("# times @ %u: real=%d cpu=%1.0f\n", m + Ticks, m, (CPUtime() - cpuT)/CLOCKS_PER_SEC); -printf("promo = %d (%c) GT = %d\n", prom, prom + '`', GT); +printf("# promo = %d (%c) GT = %d\n", prom, prom + '`', GT); printf("move "); printf("%c%c%c%c",'a'+(K&15),'0'+BH-(K>>4), 'a'+(L&15),'0'+BH-(L>>4)); -- 1.7.0.4