X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=0859d772993200007c960cb8198dfae7ac7cfc26;hp=9002c64c41b09b0944a7cc634721b28a805bacdc;hb=a273b6ef8c899f546cf585ace584a1b498c04144;hpb=89723339d93c87f52e148080d5b1dc101ee76685 diff --git a/src/movepick.cpp b/src/movepick.cpp index 9002c64c..0859d772 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -68,8 +68,8 @@ namespace { /// ordering is at the current node. MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const HistoryStats& h, - const CounterMoveStats& cmh, Move cm, Search::Stack* s) - : pos(p), history(h), counterMoveHistory(&cmh), ss(s), countermove(cm), depth(d) { + const CounterMoveStats& cmh, const CounterMoveStats& fmh, Move cm, Search::Stack* s) + : pos(p), history(h), counterMoveHistory(&cmh), followupMoveHistory(&fmh), ss(s), countermove(cm), depth(d) { assert(d > DEPTH_ZERO); @@ -80,7 +80,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const HistoryStats& MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const HistoryStats& h, Square s) - : pos(p), history(h), counterMoveHistory(nullptr) { + : pos(p), history(h), counterMoveHistory(nullptr), followupMoveHistory(nullptr) { assert(d <= DEPTH_ZERO); @@ -105,7 +105,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, } MovePicker::MovePicker(const Position& p, Move ttm, const HistoryStats& h, Value th) - : pos(p), history(h), counterMoveHistory(nullptr), threshold(th) { + : pos(p), history(h), counterMoveHistory(nullptr), followupMoveHistory(nullptr), threshold(th) { assert(!pos.checkers()); @@ -142,7 +142,8 @@ void MovePicker::score() { for (auto& m : *this) m.value = history[pos.moved_piece(m)][to_sq(m)] - + (*counterMoveHistory)[pos.moved_piece(m)][to_sq(m)]; + + (*counterMoveHistory)[pos.moved_piece(m)][to_sq(m)] + + (*followupMoveHistory)[pos.moved_piece(m)][to_sq(m)]; } template<>