mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Small tt verify simplification
Also fix probcut comment Passed non-regression STC LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 69728 W: 18080 L: 17909 D: 33739 Ptnml(0-2): 161, 7157, 20044, 7354, 148 https://tests.stockfishchess.org/tests/view/68324b116ec7634154f9b478 closes https://github.com/official-stockfish/Stockfish/pull/6094 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
9b79b75c9b
commit
dfa176fc7e
@@ -701,18 +701,12 @@ Value Search::Worker::search(
|
||||
do_move(pos, ttData.move, st);
|
||||
Key nextPosKey = pos.key();
|
||||
auto [ttHitNext, ttDataNext, ttWriterNext] = tt.probe(nextPosKey);
|
||||
ttDataNext.value =
|
||||
ttHitNext ? value_from_tt(ttDataNext.value, ss->ply + 1, pos.rule50_count())
|
||||
: VALUE_NONE;
|
||||
undo_move(pos, ttData.move);
|
||||
|
||||
// Check that the ttValue after the tt move would also trigger a cutoff
|
||||
if (!is_valid(ttDataNext.value))
|
||||
return ttData.value;
|
||||
|
||||
if (ttData.value >= beta && -ttDataNext.value >= beta)
|
||||
return ttData.value;
|
||||
|
||||
if (ttData.value <= alpha && -ttDataNext.value <= alpha)
|
||||
if ((ttData.value >= beta) == (-ttDataNext.value >= beta))
|
||||
return ttData.value;
|
||||
}
|
||||
else
|
||||
@@ -916,9 +910,7 @@ Value Search::Worker::search(
|
||||
if (depth >= 3
|
||||
&& !is_decisive(beta)
|
||||
// If value from transposition table is lower than probCutBeta, don't attempt
|
||||
// probCut 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.
|
||||
// probCut there
|
||||
&& !(is_valid(ttData.value) && ttData.value < probCutBeta))
|
||||
{
|
||||
assert(probCutBeta < VALUE_INFINITE && probCutBeta > beta);
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
#error "Stockfish requires GCC 9.3 or later for correct compilation"
|
||||
#endif
|
||||
|
||||
// Enforce minimum Clang version
|
||||
#if defined(__clang__) && (__clang_major__ < 10)
|
||||
// Enforce minimum Clang version
|
||||
#if defined(__clang__) && (__clang_major__ < 10)
|
||||
#error "Stockfish requires Clang 10.0 or later for correct compilation"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define ASSERT_ALIGNED(ptr, alignment) assert(reinterpret_cast<uintptr_t>(ptr) % alignment == 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user