mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Merge static history into main history,
thus simplifying and reducing the memory footprint.
I believe using static diff for better move ordering is more suited for
low depths, so restrict writing to low depths.
Todo: probably the condition for writing can be simplified
LTC:
LLR: 2.95 (-2.94,2.94) {-0.75,0.25}
Total: 18752 W: 768 L: 705 D: 17279
Ptnml(0-2): 7, 635, 8034, 688, 12
https://tests.stockfishchess.org/tests/view/5fd631791ac169120188859e
STC:
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 36504 W: 3380 L: 3313 D: 29811
Ptnml(0-2): 116, 2667, 12645, 2682, 142
https://tests.stockfishchess.org/tests/view/5fd5ed861ac1691201888569
closes https://github.com/official-stockfish/Stockfish/pull/3262
bench: 4018036
This commit is contained in:
committed by
Joost VandeVondele
parent
d862ba4069
commit
16adcb5374
@@ -54,9 +54,9 @@ namespace {
|
||||
/// ordering is at the current node.
|
||||
|
||||
/// MovePicker constructor for the main search
|
||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHistory* mh, const ButterflyHistory* sh, const LowPlyHistory* lp,
|
||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHistory* mh, const LowPlyHistory* lp,
|
||||
const CapturePieceToHistory* cph, const PieceToHistory** ch, Move cm, const Move* killers, int pl)
|
||||
: pos(p), mainHistory(mh), staticHistory(sh), lowPlyHistory(lp), captureHistory(cph), continuationHistory(ch),
|
||||
: pos(p), mainHistory(mh), lowPlyHistory(lp), captureHistory(cph), continuationHistory(ch),
|
||||
ttMove(ttm), refutations{{killers[0], 0}, {killers[1], 0}, {cm, 0}}, depth(d), ply(pl) {
|
||||
|
||||
assert(d > 0);
|
||||
@@ -66,9 +66,9 @@ 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 ButterflyHistory* sh,
|
||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHistory* mh,
|
||||
const CapturePieceToHistory* cph, const PieceToHistory** ch, Square rs)
|
||||
: pos(p), mainHistory(mh), staticHistory(sh), captureHistory(cph), continuationHistory(ch), ttMove(ttm), recaptureSquare(rs), depth(d) {
|
||||
: pos(p), mainHistory(mh), captureHistory(cph), continuationHistory(ch), ttMove(ttm), recaptureSquare(rs), depth(d) {
|
||||
|
||||
assert(d <= 0);
|
||||
|
||||
@@ -105,7 +105,6 @@ void MovePicker::score() {
|
||||
|
||||
else if (Type == QUIETS)
|
||||
m.value = (*mainHistory)[pos.side_to_move()][from_to(m)]
|
||||
+ (*staticHistory)[pos.side_to_move()][from_to(m)]
|
||||
+ 2 * (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)]
|
||||
+ 2 * (*continuationHistory[1])[pos.moved_piece(m)][to_sq(m)]
|
||||
+ 2 * (*continuationHistory[3])[pos.moved_piece(m)][to_sq(m)]
|
||||
|
||||
Reference in New Issue
Block a user