Skip to content

Commit f65bde6

Browse files
authored
Merge pull request official-stockfish#1512 from IIvec/master
New master
2 parents fb57cd8 + 8a8640a commit f65bde6

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

src/search.cpp

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ namespace {
680680
// At non-PV nodes we check for an early TT cutoff
681681
if ( !PvNode
682682
&& ss->ttHit
683-
&& tte->depth() >= depth
683+
&& tte->depth() > depth
684684
&& ttValue != VALUE_NONE // Possible in case of TT access race
685685
&& (ttValue >= beta ? (tte->bound() & BOUND_LOWER)
686686
: (tte->bound() & BOUND_UPPER)))
@@ -794,15 +794,11 @@ namespace {
794794
}
795795
else
796796
{
797-
// In case of null move search use previous static eval with a different sign
798-
if ((ss-1)->currentMove != MOVE_NULL)
799-
ss->staticEval = eval = evaluate(pos);
800-
else
801-
ss->staticEval = eval = -(ss-1)->staticEval;
797+
ss->staticEval = eval = evaluate(pos);
802798

803799
// Save static evaluation into transposition table
804-
if(!excludedMove)
805-
tte->save(posKey, VALUE_NONE, ss->ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval);
800+
if (!excludedMove)
801+
tte->save(posKey, VALUE_NONE, ss->ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval);
806802
}
807803

808804
// Use static evaluation difference to improve quiet move ordering
@@ -836,7 +832,7 @@ namespace {
836832
&& (ss-1)->statScore < 23767
837833
&& eval >= beta
838834
&& eval >= ss->staticEval
839-
&& ss->staticEval >= beta - 20 * depth - improvement / 15 + 168 * ss->ttPv + 177
835+
&& ss->staticEval >= beta - 20 * depth - improvement / 15 + 177
840836
&& !excludedMove
841837
&& thisThread->selDepth + 5 > thisThread->rootDepth
842838
&& pos.non_pawn_material(us) > BishopValueMg
@@ -1222,11 +1218,11 @@ namespace {
12221218
// In general we want to cap the LMR depth search at newDepth. But if reductions
12231219
// are really negative and movecount is low, we allow this move to be searched
12241220
// deeper than the first move (this may lead to hidden double extensions).
1225-
int deeper = r >= -1 ? 0
1226-
: moveCount <= 3 && r <= -3 ? 2
1227-
: moveCount <= 5 ? 1
1228-
: PvNode && depth > 6 ? 1
1229-
: 0;
1221+
int deeper = r >= -1 ? 0
1222+
: moveCount <= 3 ? 2
1223+
: moveCount <= 5 ? 1
1224+
: PvNode && depth > 6 ? 1
1225+
: 0;
12301226

12311227
Depth d = std::clamp(newDepth - r, 1, newDepth + deeper);
12321228

0 commit comments

Comments
 (0)