mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
committed by
Joona Kiiski
parent
a273b6ef8c
commit
647402ff79
@@ -68,8 +68,10 @@ namespace {
|
||||
/// ordering is at the current node.
|
||||
|
||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const HistoryStats& h,
|
||||
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) {
|
||||
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 +82,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), followupMoveHistory(nullptr) {
|
||||
: pos(p), history(h) {
|
||||
|
||||
assert(d <= DEPTH_ZERO);
|
||||
|
||||
@@ -105,7 +107,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), followupMoveHistory(nullptr), threshold(th) {
|
||||
: pos(p), history(h), threshold(th) {
|
||||
|
||||
assert(!pos.checkers());
|
||||
|
||||
@@ -142,7 +144,7 @@ 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)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user