mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 20:57:10 +00:00
Refactor root history into low ply history
This patch changes root history to low ply history - butterfly history for plies < 4. Doubles weight of this history for root, latter plies have lesser effect. Passed STC: https://tests.stockfishchess.org/tests/view/66f77d2386d5ee47d953b65d LLR: 2.94 (-2.94,2.94) <0.00,2.00> Total: 180992 W: 47362 L: 46830 D: 86800 Ptnml(0-2): 554, 21499, 45928, 21891, 624 Passed LTC: https://tests.stockfishchess.org/tests/view/66fb557986d5ee47d953b8e5 LLR: 2.95 (-2.94,2.94) <0.50,2.50> Total: 42462 W: 11013 L: 10682 D: 20767 Ptnml(0-2): 33, 4518, 11795, 4855, 30 closes https://github.com/official-stockfish/Stockfish/pull/5614 Bench 1264335
This commit is contained in:
committed by
Joost VandeVondele
parent
0186904f53
commit
7ac745a736
+6
-6
@@ -82,20 +82,20 @@ MovePicker::MovePicker(const Position& p,
|
||||
Move ttm,
|
||||
Depth d,
|
||||
const ButterflyHistory* mh,
|
||||
const ButterflyHistory* rh,
|
||||
const LowPlyHistory* lph,
|
||||
const CapturePieceToHistory* cph,
|
||||
const PieceToHistory** ch,
|
||||
const PawnHistory* ph,
|
||||
bool rn) :
|
||||
int pl) :
|
||||
pos(p),
|
||||
mainHistory(mh),
|
||||
rootHistory(rh),
|
||||
lowPlyHistory(lph),
|
||||
captureHistory(cph),
|
||||
continuationHistory(ch),
|
||||
pawnHistory(ph),
|
||||
ttMove(ttm),
|
||||
depth(d),
|
||||
rootNode(rn) {
|
||||
ply(pl) {
|
||||
|
||||
if (pos.checkers())
|
||||
stage = EVASION_TT + !(ttm && pos.pseudo_legal(ttm));
|
||||
@@ -179,8 +179,8 @@ void MovePicker::score() {
|
||||
: pt == ROOK && bool(to & threatenedByMinor) ? 24335
|
||||
: 0);
|
||||
|
||||
if (rootNode)
|
||||
m.value += 4 * (*rootHistory)[pos.side_to_move()][m.from_to()];
|
||||
if (ply < 4)
|
||||
m.value += 8 * (*lowPlyHistory)[ply][m.from_to()] / (1 + 2 * ply);
|
||||
}
|
||||
|
||||
else // Type == EVASIONS
|
||||
|
||||
Reference in New Issue
Block a user