From 728c69e5f456df46ddb7391c7f02be3145ace80d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 26 Feb 2013 15:15:20 +0100 Subject: [PATCH] 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. --- fairymax.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 ***/ -- 1.7.0.4