From: H.G. Muller Date: Mon, 1 Nov 2010 12:27:17 +0000 (+0100) Subject: Keep count of all on-board piece types X-Git-Tag: 4.8P~9 X-Git-Url: http://winboard.nl/cgi-bin?p=fairymax.git;a=commitdiff_plain;h=bdf3b4a8c86501392e95313ef99b46a2f6c217e5 Keep count of all on-board piece types The array pl[] is used to keep track of the number of pieces of each type. It is updated when the piece is captured. For now, it ignores promotions. --- diff --git a/fairymax.c b/fairymax.c index 35d785b..2bf32d1 100644 --- a/fairymax.c +++ b/fairymax.c @@ -188,6 +188,7 @@ int k,q,l,e,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ {v=centr[p]?b[x+257]-b[y+257]:0; /* center positional pts. */ if(!(G&S))b[FF]=b[G],v+=50; /* castling: put R & score */ b[G]=b[H]=b[x]=0;b[y]=u|32; /* do move, set non-virgin */ + pl[t&31]-=!!t; /* updat victim piece count */ v-=w[p]>0|R2&v>V&v