X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovepick.cpp;h=8f49b1dd434cf66ae1ccce0475d02dd3c45814df;hb=12e79be91039796299187ba1b2f1559552642ea4;hp=e1042ea6005f0255ccb1f4b21f809e0f0e4a3b84;hpb=3913726d1c8ef3b994dd8090c98814fa7e7f5874;p=stockfish diff --git a/src/movepick.cpp b/src/movepick.cpp index e1042ea6..8f49b1dd 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -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); } }