mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Better check evasion move sorting
Use in addition the counter move history table for sorting quiet check evasion moves in main and quiecence search. Also rename "contHistory" to "continuationHistory" while there. STC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 73284 W: 16433 L: 15938 D: 40913 http://tests.stockfishchess.org/tests/view/5b4f526e0ebc5902bdb7a401 LTC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 12135 W: 2171 L: 1997 D: 7967 http://tests.stockfishchess.org/tests/view/5b4fc0ef0ebc5902bdb7ae0e Closes https://github.com/official-stockfish/Stockfish/pull/1685 Bench 4817583
This commit is contained in:
committed by
Stéphane Nicolet
parent
3913726d1c
commit
12e79be910
@@ -61,7 +61,7 @@ namespace {
|
||||
/// MovePicker constructor for the main search
|
||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHistory* mh,
|
||||
const CapturePieceToHistory* cph, const PieceToHistory** ch, Move cm, Move* killers)
|
||||
: pos(p), mainHistory(mh), captureHistory(cph), contHistory(ch),
|
||||
: pos(p), mainHistory(mh), captureHistory(cph), continuationHistory(ch),
|
||||
refutations{{killers[0], 0}, {killers[1], 0}, {cm, 0}}, depth(d) {
|
||||
|
||||
assert(d > DEPTH_ZERO);
|
||||
@@ -73,8 +73,8 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist
|
||||
|
||||
/// MovePicker constructor for quiescence search
|
||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHistory* mh,
|
||||
const CapturePieceToHistory* cph, Square rs)
|
||||
: pos(p), mainHistory(mh), captureHistory(cph), recaptureSquare(rs), depth(d) {
|
||||
const CapturePieceToHistory* cph, const PieceToHistory** ch, Square rs)
|
||||
: pos(p), mainHistory(mh), captureHistory(cph), continuationHistory(ch), recaptureSquare(rs), depth(d) {
|
||||
|
||||
assert(d <= DEPTH_ZERO);
|
||||
|
||||
@@ -115,9 +115,9 @@ void MovePicker::score() {
|
||||
|
||||
else if (Type == QUIETS)
|
||||
m.value = (*mainHistory)[pos.side_to_move()][from_to(m)]
|
||||
+ (*contHistory[0])[pos.moved_piece(m)][to_sq(m)]
|
||||
+ (*contHistory[1])[pos.moved_piece(m)][to_sq(m)]
|
||||
+ (*contHistory[3])[pos.moved_piece(m)][to_sq(m)];
|
||||
+ (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)]
|
||||
+ (*continuationHistory[1])[pos.moved_piece(m)][to_sq(m)]
|
||||
+ (*continuationHistory[3])[pos.moved_piece(m)][to_sq(m)];
|
||||
|
||||
else // Type == EVASIONS
|
||||
{
|
||||
@@ -125,7 +125,9 @@ void MovePicker::score() {
|
||||
m.value = PieceValue[MG][pos.piece_on(to_sq(m))]
|
||||
- Value(type_of(pos.moved_piece(m)));
|
||||
else
|
||||
m.value = (*mainHistory)[pos.side_to_move()][from_to(m)] - (1 << 28);
|
||||
m.value = (*mainHistory)[pos.side_to_move()][from_to(m)]
|
||||
+ (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)]
|
||||
- (1 << 28);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user