mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
rename !(PvNode || cutNode) to allNode
Passed STC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 108992 W: 28178 L: 28039 D: 52775 Ptnml(0-2): 356, 12428, 28762, 12621, 329 https://tests.stockfishchess.org/tests/view/66c73a51bf8c9d8780fda532 closes https://github.com/official-stockfish/Stockfish/pull/5549 No functional change
This commit is contained in:
parent
a0597b1281
commit
54def6f7eb
1 changed files with 5 additions and 4 deletions
|
@ -509,6 +509,7 @@ Value Search::Worker::search(
|
|||
|
||||
constexpr bool PvNode = nodeType != NonPV;
|
||||
constexpr bool rootNode = nodeType == Root;
|
||||
const bool allNode = !(PvNode || cutNode);
|
||||
|
||||
// Dive into quiescence search when the depth reaches zero
|
||||
if (depth <= 0)
|
||||
|
@ -1141,7 +1142,7 @@ moves_loop: // When in check, search starts here
|
|||
|
||||
// Increase reduction if next ply has a lot of fail high (~5 Elo)
|
||||
if ((ss + 1)->cutoffCnt > 3)
|
||||
r += 1 + !(PvNode || cutNode);
|
||||
r += 1 + allNode;
|
||||
|
||||
// For first picked move (ttMove) reduce reduction, but never allow
|
||||
// reduction to go below 0 (~3 Elo)
|
||||
|
@ -1163,7 +1164,7 @@ moves_loop: // When in check, search starts here
|
|||
// beyond the first move depth.
|
||||
// To prevent problems when the max value is less than the min value,
|
||||
// std::clamp has been replaced by a more robust implementation.
|
||||
Depth d = std::max(1, std::min(newDepth - r, newDepth + (PvNode || cutNode)));
|
||||
Depth d = std::max(1, std::min(newDepth - r, newDepth + !allNode));
|
||||
|
||||
value = -search<NonPV>(pos, ss + 1, -(alpha + 1), -alpha, d, true);
|
||||
|
||||
|
@ -1341,7 +1342,7 @@ moves_loop: // When in check, search starts here
|
|||
// Bonus for prior countermove that caused the fail low
|
||||
else if (!priorCapture && prevSq != SQ_NONE)
|
||||
{
|
||||
int bonus = (122 * (depth > 5) + 39 * (PvNode || cutNode) + 165 * ((ss - 1)->moveCount > 8)
|
||||
int bonus = (122 * (depth > 5) + 39 * !allNode + 165 * ((ss - 1)->moveCount > 8)
|
||||
+ 107 * (!ss->inCheck && bestValue <= ss->staticEval - 98)
|
||||
+ 134 * (!(ss - 1)->inCheck && bestValue <= -(ss - 1)->staticEval - 91));
|
||||
|
||||
|
@ -1362,7 +1363,7 @@ moves_loop: // When in check, search starts here
|
|||
}
|
||||
|
||||
// Bonus when search fails low and there is a TT move
|
||||
else if (moveCount > 1 && ttData.move && (cutNode || PvNode))
|
||||
else if (moveCount > 1 && ttData.move && !allNode)
|
||||
thisThread->mainHistory[us][ttData.move.from_to()] << stat_bonus(depth) / 4;
|
||||
|
||||
if (PvNode)
|
||||
|
|
Loading…
Add table
Reference in a new issue