mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
Add followup moves history for move ordering
STC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 7955 W: 1538 L: 1378 D: 5039 LTC: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 5323 W: 778 L: 642 D: 3903 Bench: 8261839 Resolves #599
This commit is contained in:
committed by
Joona Kiiski
parent
e1a7d135b2
commit
a273b6ef8c
@@ -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<QUIETS>() {
|
||||
|
||||
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<>
|
||||
|
||||
Reference in New Issue
Block a user