mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 03:26:24 +08:00
Join conditions for move sorting heuristics
closes https://github.com/official-stockfish/Stockfish/pull/5078 No functional change.
This commit is contained in:
committed by
Joost VandeVondele
parent
0c22d5bb1a
commit
f77eddfa2f
@@ -607,20 +607,17 @@ Value Search::Worker::search(
|
||||
&& (tte->bound() & (ttValue >= beta ? BOUND_LOWER : BOUND_UPPER)))
|
||||
{
|
||||
// If ttMove is quiet, update move sorting heuristics on TT hit (~2 Elo)
|
||||
if (ttMove)
|
||||
if (ttMove && ttValue >= beta)
|
||||
{
|
||||
if (ttValue >= beta)
|
||||
{
|
||||
// Bonus for a quiet ttMove that fails high (~2 Elo)
|
||||
if (!ttCapture)
|
||||
update_quiet_stats(pos, ss, *this, ttMove, stat_bonus(depth));
|
||||
// Bonus for a quiet ttMove that fails high (~2 Elo)
|
||||
if (!ttCapture)
|
||||
update_quiet_stats(pos, ss, *this, ttMove, stat_bonus(depth));
|
||||
|
||||
// Extra penalty for early quiet moves of
|
||||
// the previous ply (~0 Elo on STC, ~2 Elo on LTC).
|
||||
if (prevSq != SQ_NONE && (ss - 1)->moveCount <= 2 && !priorCapture)
|
||||
update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq,
|
||||
-stat_malus(depth + 1));
|
||||
}
|
||||
// Extra penalty for early quiet moves of
|
||||
// the previous ply (~0 Elo on STC, ~2 Elo on LTC).
|
||||
if (prevSq != SQ_NONE && (ss - 1)->moveCount <= 2 && !priorCapture)
|
||||
update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq,
|
||||
-stat_malus(depth + 1));
|
||||
}
|
||||
|
||||
// Partial workaround for the graph history interaction problem
|
||||
|
||||
Reference in New Issue
Block a user