Skip to content

Commit

Permalink
Simplify bestvalue update formula
Browse files Browse the repository at this point in the history
Passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 124960 W: 32598 L: 32472 D: 59890
Ptnml(0-2): 480, 14852, 31694, 14970, 484
https://tests.stockfishchess.org/tests/view/67b348bae00eea114cdba37d

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 150306 W: 38220 L: 38132 D: 73954
Ptnml(0-2): 98, 16430, 42005, 16526, 94
https://tests.stockfishchess.org/tests/view/67b5e37918a66624a7a3f751

closes official-stockfish#5898

Bench: 2146010
  • Loading branch information
FauziAkram authored and Disservin committed Feb 24, 2025
1 parent 0f9ae0d commit 93b9668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1720,8 +1720,8 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta)
return mated_in(ss->ply); // Plies to mate from the root
}

if (!is_decisive(bestValue) && bestValue >= beta)
bestValue = (3 * bestValue + beta) / 4;
if (!is_decisive(bestValue) && bestValue > beta)
bestValue = (bestValue + beta) / 2;

// Save gathered info in transposition table. The static evaluation
// is saved as it was before adjustment by correction history.
Expand Down

0 comments on commit 93b9668

Please sign in to comment.