mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Do not use evaluate() for razoring
Because razoring is reached 10% of times and about 50% of time first two conditions are met we can save 5% of calls to the fairly costly evaluate(). On the other side statistics have shown 95% of nodes that pass the first two razoring conditions pass also the evaluate() test. So the risk of dropping the third condition seems low enough. Testing seems to validate this. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
67f975e56b
commit
060eef4f4e
1 changed files with 1 additions and 3 deletions
|
@ -1122,9 +1122,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Null move search not allowed, try razoring
|
// Null move search not allowed, try razoring
|
||||||
else if ( depth < RazorDepth
|
else if (depth < RazorDepth && approximateEval < beta - RazorMargin)
|
||||||
&& approximateEval < beta - RazorMargin
|
|
||||||
&& evaluate(pos, ei, threadID) < beta - RazorMargin)
|
|
||||||
{
|
{
|
||||||
Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
|
Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
|
||||||
if (v < beta)
|
if (v < beta)
|
||||||
|
|
Loading…
Add table
Reference in a new issue