Shouldn't that belucasart wrote: You're right. As pointed out by Martin, I got fooled by the chess programming wiki
I'm currently testing this alternative:I've just ran 1000 games in 6"+0.1", and it scored 52% against my previous code. Thanks for the tip!Code: Select all
if (UseRazoring && depth <= RazorDepth && !is_pv && !is_mate_score(beta) && !in_check) { if (current_eval + RazorMargin(depth) <= alpha) { const int score = qsearch(B, alpha, beta, 0, ply+1, is_pv, si+1); if (score + RazorMargin(depth) <= alpha) //** return score; } }
Code: Select all
if (UseRazoring && depth <= RazorDepth
&& !is_pv && !is_mate_score(beta) && !in_check)
{
if (current_eval + RazorMargin(depth) <= alpha) {
const int score = qsearch(B, alpha-RazorMargin(depth), beta-RazorMargin(depth), 0, ply+1, is_pv, si+1);
if (score <= alpha - RazorMargin(depth)) //**
return score;
}
}