From: H.G.Muller Date: Thu, 10 Apr 2014 16:59:55 +0000 (+0200) Subject: Use linear interpolation with game phase X-Git-Tag: 0.19~5 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=126afa7abacbe6fbae4e631d65da810632bbb51c;p=hachu.git Use linear interpolation with game phase The weight of anticipated promotion gain now decreases linearly with filling of the board, rather than quadratically. As a compensation, it now starts at 23% for a full board, rather than 8%. --- diff --git a/hachu.c b/hachu.c index d2c6ea8..ff76544 100644 --- a/hachu.c +++ b/hachu.c @@ -878,7 +878,7 @@ SetUp(char *array, int var) p[i].pst = p[i].value <= 150 ? PST_ADVANCE : PST_NEUTRAL; // light steppers advance if(j > 0 && p[i].bulk == 6) p[i].pst = PST_WFLYER, p[i].mobWeight = 4; // SM defends zone if((j = p[i].promo) > 0 && g) - p[i].promoGain = (p[j].value - p[i].value - g)*1.25, p[i].value = p[j].value - g; + p[i].promoGain = (p[j].value - p[i].value - g)*0.9, p[i].value = p[j].value - g; else p[i].promoGain = 0; board[p[i].pos] = i; rootEval += p[i].value + PST[p[i].pst + p[i].pos]; @@ -893,7 +893,7 @@ SetUp(char *array, int var) if(j > 0 && p[i].pst == PST_WJUMPER) p[i].pst = PST_BJUMPER; // use black pre-prom bonus if(j > 0 && p[i].bulk == 6) p[i].pst = PST_BFLYER, p[i].mobWeight = 4; // SM defends zone if((j = p[i].promo) > 0 && g) - p[i].promoGain = (p[j].value - p[i].value - g)*1.25, p[i].value = p[j].value - g; + p[i].promoGain = (p[j].value - p[i].value - g)*0.9, p[i].value = p[j].value - g; else p[i].promoGain = 0; if(i == kylin[BLACK]) p[i].promoGain = 1.25*KYLIN, p[i].value += KYLIN; board[p[i].pos] = i; @@ -1727,7 +1727,7 @@ Evaluate (int difEval) } #endif - return difEval - (filling*filling*promoDelta >> 16) + (stm ? score : -score); + return difEval - (filling*promoDelta >> 8) + (stm ? score : -score); } inline void