1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Properly handle odd depths in razor formula

A little bit more aggressive, but should be more
in line with the depths logic.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2008-12-28 19:38:44 +01:00
parent e4fd9a2df7
commit 5d94305af3

View file

@ -1242,14 +1242,14 @@ namespace {
else if ( !value_is_mate(beta)
&& approximateEval < beta - RazorMargin
&& depth < RazorDepth
&& (RazorAtDepthOne || depth > OnePly)
&& (RazorAtDepthOne || depth >= 2*OnePly)
&& ttMove == MOVE_NONE
&& !pos.has_pawn_on_7th(pos.side_to_move()))
{
Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
if ( (v < beta - RazorMargin - RazorMargin / 4)
|| (depth <= 2*OnePly && v < beta - RazorMargin)
|| (depth <= OnePly && v < beta - RazorMargin / 2))
|| (depth < 3*OnePly && v < beta - RazorMargin)
|| (depth < 2*OnePly && v < beta - RazorMargin / 2))
return v;
}