mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Retire eval optimization from null search
Simplify things preparing for further changes. bench: 4983282
This commit is contained in:
parent
4e5d834e8e
commit
69de670353
1 changed files with 2 additions and 9 deletions
|
@ -1105,7 +1105,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
Key posKey;
|
Key posKey;
|
||||||
Move ttMove, move, bestMove;
|
Move ttMove, move, bestMove;
|
||||||
Value bestValue, value, ttValue, futilityValue, futilityBase, oldAlpha;
|
Value bestValue, value, ttValue, futilityValue, futilityBase, oldAlpha;
|
||||||
bool givesCheck, enoughMaterial, evasionPrunable, fromNull;
|
bool givesCheck, enoughMaterial, evasionPrunable;
|
||||||
Depth ttDepth;
|
Depth ttDepth;
|
||||||
|
|
||||||
// To flag BOUND_EXACT a node with eval above alpha and no available moves
|
// To flag BOUND_EXACT a node with eval above alpha and no available moves
|
||||||
|
@ -1114,7 +1114,6 @@ split_point_start: // At split points actual search starts from here
|
||||||
|
|
||||||
ss->currentMove = bestMove = MOVE_NONE;
|
ss->currentMove = bestMove = MOVE_NONE;
|
||||||
ss->ply = (ss-1)->ply + 1;
|
ss->ply = (ss-1)->ply + 1;
|
||||||
fromNull = (ss-1)->currentMove == MOVE_NULL;
|
|
||||||
|
|
||||||
// Check for an instant draw or maximum ply reached
|
// Check for an instant draw or maximum ply reached
|
||||||
if (pos.is_draw<false, false>() || ss->ply > MAX_PLY)
|
if (pos.is_draw<false, false>() || ss->ply > MAX_PLY)
|
||||||
|
@ -1152,12 +1151,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fromNull)
|
if (tte)
|
||||||
{
|
|
||||||
ss->staticEval = bestValue = -(ss-1)->staticEval;
|
|
||||||
ss->evalMargin = VALUE_ZERO;
|
|
||||||
}
|
|
||||||
else if (tte)
|
|
||||||
{
|
{
|
||||||
assert(tte->static_value() != VALUE_NONE || Threads.size() > 1);
|
assert(tte->static_value() != VALUE_NONE || Threads.size() > 1);
|
||||||
|
|
||||||
|
@ -1205,7 +1199,6 @@ split_point_start: // At split points actual search starts from here
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& !InCheck
|
&& !InCheck
|
||||||
&& !givesCheck
|
&& !givesCheck
|
||||||
&& !fromNull
|
|
||||||
&& move != ttMove
|
&& move != ttMove
|
||||||
&& enoughMaterial
|
&& enoughMaterial
|
||||||
&& type_of(move) != PROMOTION
|
&& type_of(move) != PROMOTION
|
||||||
|
|
Loading…
Add table
Reference in a new issue