i+=V; /* promotion / passer bonus */\r
} if(z&S && GamePtr<6) v+=(rand()>>10&31)-16;\r
J+=J(0);Z+=J(4)+G-S;\r
- SHAMAX( pl[k]-=!!t; ) /* count pieces per side */\r
+ pl[k]-=!!t; /* count pieces per side */\r
v+=e+i;V=m>q?m:q; /*** new eval & alpha ****/\r
if(z&S)V=m-margin>q?m-margin:q; /* multiPV */\r
C=d-1-(d>5&p>2&!t&!h); /* nw depth, reduce non-cpt.*/\r
return l;} /* & not in check, signal */\r
v=m; /* (prevent fail-lows on */\r
} /* K-capt. replies) */\r
- SHAMAX( pl[k]+=!!t; ) pl[t&31]+=!!t;\r
+ pl[k]+=!!t;pl[t&31]+=!!t;\r
b[G]=b[FF];b[FF]=b[y]=0;b[x]=u;b[H]=t; /* undo move,G can be dummy */\r
} /* if non-castling */\r
if(z&S&&K==I&d>2&v>V&v<l){int *p=ps;char X,Y;\r
{ od[++i]=j; centr[i] = c>='a';\r
blacktype[c&31]=i; piecename[i]=c&31;\r
if(piecetype[c&31]==0) piecetype[c&31]=i; // only first\r
+ pb[i] = pb[i+16] = w[i]>>3 & ~3; // pair bonus, for now 1/8 of piece value, leave low bits for flag\r
succession |= w[i] < -4; // expendable royalty; assume we can promote to it\r
} else {\r
- if(!o[j]) pb[i] = pb[i+16] = of[j--]; // hand-set pair bonus\r
+ if((o[j]^o[j]+8>>4)&1 || of[j]>>4) pb[i] = pb[i+16] = 0; // not color bound (or too complex to see it), so no pair bonus\r
+ if(!o[j]) pb[i] = pb[i+16] = of[j--]; // hand-set pair bonus kludges: 3 for mating minor, negative for non-mating pair.\r
}\r
j++; o[j]=0;\r
/* printf("# c='%c' i=%d od[i]=%d j=%d (%3d,%8x)\n",c?c:' ',i,od[i],j,o[j-1],of[j-1]); /**/\r