mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-23 13:17:12 +00:00
Merge commit 'd7c04a942950f1fe3f655bf8b608e8ef21c07628' into cluster
This commit is contained in:
@@ -166,6 +166,8 @@ struct CorrHistTypedef<NonPawn> {
|
||||
template<CorrHistType T>
|
||||
using CorrectionHistory = typename Detail::CorrHistTypedef<T>::type;
|
||||
|
||||
using TTMoveHistory = Stats<std::int16_t, 8192, PAWN_HISTORY_SIZE, COLOR_NB>;
|
||||
|
||||
} // namespace Stockfish
|
||||
|
||||
#endif // #ifndef HISTORY_H_INCLUDED
|
||||
|
||||
+11
-1
@@ -628,6 +628,8 @@ void Search::Worker::clear() {
|
||||
minorPieceCorrectionHistory.fill(0);
|
||||
nonPawnCorrectionHistory.fill(0);
|
||||
|
||||
ttMoveHistory.fill(0);
|
||||
|
||||
for (auto& to : continuationCorrectionHistory)
|
||||
for (auto& h : to)
|
||||
h.fill(5);
|
||||
@@ -1190,7 +1192,8 @@ moves_loop: // When in check, search starts here
|
||||
{
|
||||
int corrValAdj1 = std::abs(correctionValue) / 248873;
|
||||
int corrValAdj2 = std::abs(correctionValue) / 255331;
|
||||
int doubleMargin = 262 * PvNode - 188 * !ttCapture - corrValAdj1;
|
||||
int doubleMargin = 262 * PvNode - 188 * !ttCapture - corrValAdj1
|
||||
- ttMoveHistory[pawn_structure_index(pos)][us] / 128;
|
||||
int tripleMargin =
|
||||
88 + 265 * PvNode - 256 * !ttCapture + 93 * ss->ttPv - corrValAdj2;
|
||||
|
||||
@@ -1481,8 +1484,15 @@ moves_loop: // When in check, search starts here
|
||||
// If there is a move that produces search value greater than alpha,
|
||||
// we update the stats of searched moves.
|
||||
else if (bestMove)
|
||||
{
|
||||
update_all_stats(pos, ss, *this, bestMove, prevSq, quietsSearched, capturesSearched, depth,
|
||||
bestMove == ttData.move, moveCount);
|
||||
if (!PvNode)
|
||||
{
|
||||
int bonus = (ttData.move == move) ? 800 : -600 * moveCount;
|
||||
ttMoveHistory[pawn_structure_index(pos)][us] << bonus;
|
||||
}
|
||||
}
|
||||
|
||||
// Bonus for prior quiet countermove that caused the fail low
|
||||
else if (!priorCapture && prevSq != SQ_NONE)
|
||||
|
||||
@@ -326,6 +326,8 @@ class Worker {
|
||||
Value ev,
|
||||
uint8_t generation8);
|
||||
|
||||
TTMoveHistory ttMoveHistory;
|
||||
|
||||
private:
|
||||
void iterative_deepening();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user