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) {
// Constructor for ProbCut: we generate captures with SEE greater
// than or equal to the given threshold.
-MovePicker::MovePicker(const Position& p, Move ttm, Value th, const CapturePieceToHistory* cph) :
+MovePicker::MovePicker(
+ const Position& p, Move ttm, Value th, const CapturePieceToHistory* cph, const PawnHistory& ph) :
pos(p),
captureHistory(cph),
+ pawnHistory(ph),
ttMove(ttm),
threshold(th) {
assert(!pos.checkers());
: pt != PAWN ? bool(to & threatenedByPawn) * 15000
: 0)
: 0;
+
+ m.value += pawnHistory[pawn_structure(pos)][pc][to];
}
else // Type == EVASIONS
+ (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)];
}
}