const ButterflyHistory* mh,
const CapturePieceToHistory* cph,
const PieceToHistory** ch,
+ const PawnHistory* ph,
Move cm,
const Move* killers) :
pos(p),
mainHistory(mh),
captureHistory(cph),
continuationHistory(ch),
+ pawnHistory(ph),
ttMove(ttm),
refutations{{killers[0], 0}, {killers[1], 0}, {cm, 0}},
depth(d) {
const ButterflyHistory* mh,
const CapturePieceToHistory* cph,
const PieceToHistory** ch,
+ const PawnHistory* ph,
Square rs) :
pos(p),
mainHistory(mh),
captureHistory(cph),
continuationHistory(ch),
+ pawnHistory(ph),
ttMove(ttm),
recaptureSquare(rs),
depth(d) {
m.value += (*continuationHistory[2])[pc][to] / 4;
m.value += (*continuationHistory[3])[pc][to];
m.value += (*continuationHistory[5])[pc][to];
+ m.value += (*pawnHistory)[pawn_structure(pos)][pc][to];
// bonus for checks
m.value += bool(pos.check_squares(pt) & to) * 16384;
+ (1 << 28);
else
m.value = (*mainHistory)[pos.side_to_move()][from_to(m)]
- + (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)];
+ + (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)]
+ + (*pawnHistory)[pawn_structure(pos)][pos.moved_piece(m)][to_sq(m)];
}
}