Code: Select all
if(!inCheck && depth > 1 && h->eval >= beta && wMat + bMat > 5200) {
double delta = max(h->eval - beta, 1.0);
double ddepth = (double)depth;
int r = (int)(0.25 * ddepth + 2.5 + log(delta)/5.0);
MakeMove(&noMove);
inNull++;
score = -Search(-beta, -beta + 1, depth - r, 0);
inNull--;
TakeBack();
if(score >= beta) {
PosStore(beta, depth, LOWER, &noMove);
return beta;
}
if(score < -32000) {
extendBy += 200;
}
}
Code: Select all
} else {
reduce = 1;
if(depth > 3 && g->phase == NEXTMOVE) {
count++;
if(g->node->score < alpha) {
if(count > ((inNull > 0) << 2)) {
s32 m = histTblg[fig][fs][ts];
s32 n = histTbln[fig][fs][ts];
if(n > 49 && m/n < 16) {
reduce += ((1 + log(alpha - g->node->score)) /
(log(m/n+1)+1));
}
}
}
}
if(reduce == 1) {
g->node->score = -Search(-beta, -alpha, depth - 1, extendBy);
} else {
g->node->score = -Search(-alpha - 1, -alpha, depth - reduce, extendBy);
if(g->node->score > alpha)
g->node->score = -Search(-beta, -alpha, depth - 1, extendBy);
}
}
Code: Select all
case ADDMOVES:
h->phase = NEXTMOVE;
AddMoves(h->node, depth);
if(h->node == (h+1)->t) return FALSE;
if(depth > 3) {
for(node = h->node; node < (h+1)->t; node++) {
Sort(node, (h+1)->t);
MakeMove((moves *)&node->m);
if(GetReps())
node->score = 0;
else {
inShort++;
node->score = -Search(-beta - 180, -alpha + 20, depth > 7 ? 3 : 1, extendBy);
inShort--;
}
ClrReps();
TakeBack();
}
}
case NEXTMOVE:
if(h->node + 1 == (h+1)->t) {
h->phase = NOMOVES;
return TRUE;
}
Sort(h->node, (h+1)->t);
RomiChess - Yace : 52.5/100 39-34-27 (=11=11=0=11=01=010==00=1011011=10111=1=01101=11=100001011=0=0=110=1=11001=0=10=0010=0=10=1=11000=000) 53% +21
The first time Romi ever took a 100 game match from Yace!