From: H.G. Muller Date: Tue, 26 Feb 2013 14:15:20 +0000 (+0100) Subject: Fix promotion value Shatranj / Courier / Makruk X-Git-Tag: 4.8S~3 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=728c69e5f456df46ddb7391c7f02be3145ace80d;p=fairymax.git Fix promotion value Shatranj / Courier / Makruk The patch to use true piece value in game-level promotions broke variants in which promotion is to the worthless Ferz. Because in subtrating the default score it did not take into account the division by 8 this has in the search for such variants. --- diff --git a/fairymax.c b/fairymax.c index c893b37..3bd0c69 100644 --- a/fairymax.c +++ b/fairymax.c @@ -232,7 +232,7 @@ int k,q,l,e,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ {if(v+I&&x==K&y==L>==GT) /* if move found */ {Q=-e-i;O=F;LL=L;prom=gt; if(b[y]-u&15)prom=b[y]-=PromPiece, /* (under-)promotion: */ - Q-=abs(w[prom&=15])-w[p]-6*S, /* correct piece & score & */ + Q-=abs(w[prom&=15])-w[p]-(6*S>>sh), /* correct piece & score & */ Z+=PromPiece; /* invalidate hash */ a->D=99;a->V=0; /* lock game in hash as draw*/ R-=i/FAC; /*** total captd material ***/