Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ddugovic committed May 26, 2023
2 parents e0d7e65 + c701745 commit 96eb35d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ George Sobala (gsobala)
gguliash
Giacomo Lorenzetti (G-Lorenz)
Gian-Carlo Pascutto (gcp)
Goh CJ (cj5716)
Gontran Lemaire (gonlem)
Goodkov Vasiliy Aleksandrovich (goodkov)
Gregor Cramer
Expand Down
18 changes: 8 additions & 10 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void Thread::search() {
else
break;

delta += delta / 4 + 2;
delta += delta / 3;

assert(alpha >= -VALUE_INFINITE && beta <= VALUE_INFINITE);
}
Expand Down Expand Up @@ -632,10 +632,9 @@ namespace {

// At non-PV nodes we check for an early TT cutoff
if ( !PvNode
&& ss->ttHit
&& !excludedMove
&& tte->depth() > depth - (tte->bound() == BOUND_EXACT)
&& ttValue != VALUE_NONE // Possible in case of TT access race
&& ttValue != VALUE_NONE // Possible in case of TT access race or if !ttHit
&& (tte->bound() & (ttValue >= beta ? BOUND_LOWER : BOUND_UPPER)))
{
// If ttMove is quiet, update move sorting heuristics on TT hit (~2 Elo)
Expand Down Expand Up @@ -920,8 +919,7 @@ namespace {
// there and in further interactions with transposition table cutoff depth is set to depth - 3
// because probCut search has depth set to depth - 4 but we also do a move before it
// so effective depth is equal to depth - 3
&& !( ss->ttHit
&& tte->depth() >= depth - 3
&& !( tte->depth() >= depth - 3
&& ttValue != VALUE_NONE
&& ttValue < probCutBeta))
{
Expand Down Expand Up @@ -1084,7 +1082,7 @@ namespace {
&& lmrDepth < 7
&& !ss->inCheck
&& ss->staticEval + 207 + 223 * lmrDepth + PieceValue[pos.variant()][EG][pos.piece_on(to_sq(move))]
+ captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] * 1078 / 7000 < alpha)
+ captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] / 7 < alpha)
continue;

Bitboard occupied;
Expand Down Expand Up @@ -1141,7 +1139,7 @@ namespace {
#ifdef HELPMATE
if (pos.is_helpmate()) {} else
#endif
if (!pos.see_ge(move, Value(-27 * lmrDepth * lmrDepth - 33 * lmrDepth / 2)))
if (!pos.see_ge(move, Value(-27 * lmrDepth * lmrDepth - 16 * lmrDepth)))
continue;
}
}
Expand Down Expand Up @@ -1436,10 +1434,11 @@ namespace {
else
{
// Reduce other moves if we have found at least one score improvement (~1 Elo)
// Reduce more for depth > 3 and depth < 12 (~1 Elo)
if ( depth > 1
&& beta < 14001
&& value > -12754)
depth -= 1;
depth -= depth > 3 && depth < 12 ? 2 : 1;

assert(depth > 0);
alpha = value; // Update alpha! Always alpha < beta
Expand Down Expand Up @@ -1579,9 +1578,8 @@ namespace {

// At non-PV nodes we check for an early TT cutoff
if ( !PvNode
&& ss->ttHit
&& tte->depth() >= ttDepth
&& ttValue != VALUE_NONE // Only in case of TT access race
&& ttValue != VALUE_NONE // Only in case of TT access race or if !ttHit
&& (tte->bound() & (ttValue >= beta ? BOUND_LOWER : BOUND_UPPER)))
return ttValue;

Expand Down

0 comments on commit 96eb35d

Please sign in to comment.