Skip to content

Commit bab1cc3

Browse files
FauziAkramDisservin
authored andcommitted
Refactor bestvalue adjustment in qsearch
closes #4935 No functional change
1 parent f388e41 commit bab1cc3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Fabian Beuke (madnight)
7272
Fabian Fichter (ianfab)
7373
Fanael Linithien (Fanael)
7474
fanon
75-
Fauzi Akram Dabat (FauziAkram)
75+
Fauzi Akram Dabat (fauzi2)
7676
Felix Wittmann
7777
gamander
7878
Gabriele Lombardo (gabe)

src/search.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,8 +1616,8 @@ Value qsearch(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth) {
16161616
return mated_in(ss->ply); // Plies to mate from the root
16171617
}
16181618

1619-
if (std::abs(bestValue) < VALUE_TB_WIN_IN_MAX_PLY)
1620-
bestValue = bestValue >= beta ? (3 * bestValue + beta) / 4 : bestValue;
1619+
if (std::abs(bestValue) < VALUE_TB_WIN_IN_MAX_PLY && bestValue >= beta)
1620+
bestValue = (3 * bestValue + beta) / 4;
16211621

16221622
// Save gathered info in transposition table
16231623
tte->save(posKey, value_to_tt(bestValue, ss->ply), pvHit,

0 commit comments

Comments
 (0)