mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Simplify Away Countermove Heuristic
Passed Non-regression STC: LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 977824 W: 252072 L: 252888 D: 472864 Ptnml(0-2): 2518, 117120, 250560, 116088, 2626 https://tests.stockfishchess.org/tests/view/6683452d95b0d1e881e81541 Passed Non-regression LTC: LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 81048 W: 20630 L: 20470 D: 39948 Ptnml(0-2): 36, 8915, 22464, 9071, 38 https://tests.stockfishchess.org/tests/view/66886b7b0c9d7c1ab33ed281 closes https://github.com/official-stockfish/Stockfish/pull/5441 bench 1276784
This commit is contained in:
committed by
Joost VandeVondele
parent
daa9e217ab
commit
a45c2bc34a
@@ -125,7 +125,7 @@ Value value_to_tt(Value v, int ply);
|
||||
Value value_from_tt(Value v, int ply, int r50c);
|
||||
void update_pv(Move* pv, Move move, const Move* childPv);
|
||||
void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus);
|
||||
void update_refutations(const Position& pos, Stack* ss, Search::Worker& workerThread, Move move);
|
||||
void update_refutations(Stack* ss, Move move);
|
||||
void update_quiet_histories(
|
||||
const Position& pos, Stack* ss, Search::Worker& workerThread, Move move, int bonus);
|
||||
void update_quiet_stats(
|
||||
@@ -510,7 +510,6 @@ void Search::Worker::iterative_deepening() {
|
||||
}
|
||||
|
||||
void Search::Worker::clear() {
|
||||
counterMoves.fill(Move::none());
|
||||
mainHistory.fill(0);
|
||||
captureHistory.fill(-700);
|
||||
pawnHistory.fill(-1188);
|
||||
@@ -950,11 +949,9 @@ moves_loop: // When in check, search starts here
|
||||
nullptr,
|
||||
(ss - 6)->continuationHistory};
|
||||
|
||||
Move countermove =
|
||||
prevSq != SQ_NONE ? thisThread->counterMoves[pos.piece_on(prevSq)][prevSq] : Move::none();
|
||||
|
||||
MovePicker mp(pos, ttData.move, depth, &thisThread->mainHistory, &thisThread->captureHistory,
|
||||
contHist, &thisThread->pawnHistory, countermove, ss->killers);
|
||||
contHist, &thisThread->pawnHistory, ss->killers);
|
||||
|
||||
value = bestValue;
|
||||
moveCountPruning = false;
|
||||
@@ -1860,7 +1857,7 @@ void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus) {
|
||||
}
|
||||
|
||||
// Updates move sorting heuristics
|
||||
void update_refutations(const Position& pos, Stack* ss, Search::Worker& workerThread, Move move) {
|
||||
void update_refutations(Stack* ss, Move move) {
|
||||
|
||||
// Update killers
|
||||
if (ss->killers[0] != move)
|
||||
@@ -1868,13 +1865,6 @@ void update_refutations(const Position& pos, Stack* ss, Search::Worker& workerTh
|
||||
ss->killers[1] = ss->killers[0];
|
||||
ss->killers[0] = move;
|
||||
}
|
||||
|
||||
// Update countermove history
|
||||
if (((ss - 1)->currentMove).is_ok())
|
||||
{
|
||||
Square prevSq = ((ss - 1)->currentMove).to_sq();
|
||||
workerThread.counterMoves[pos.piece_on(prevSq)][prevSq] = move;
|
||||
}
|
||||
}
|
||||
|
||||
void update_quiet_histories(
|
||||
@@ -1893,7 +1883,7 @@ void update_quiet_histories(
|
||||
void update_quiet_stats(
|
||||
const Position& pos, Stack* ss, Search::Worker& workerThread, Move move, int bonus) {
|
||||
|
||||
update_refutations(pos, ss, workerThread, move);
|
||||
update_refutations(ss, move);
|
||||
update_quiet_histories(pos, ss, workerThread, move, bonus);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user