go_next_phase();
}
-MovePicker::MovePicker(const Position& p, Move ttm, const History& h, int threshold)
+MovePicker::MovePicker(const Position& p, Move ttm, const History& h, int parentCapture)
: pos(p), H(h) {
assert (!pos.in_check());
// In ProbCut we consider only captures better than parent's move
- captureThreshold = threshold;
+ captureThreshold = parentCapture;
phasePtr = ProbCutTable;
if ( ttm != MOVE_NONE
for (MoveStack* cur = moves; cur != lastMove; cur++)
{
m = cur->move;
+ cur->score = pos.midgame_value_of_piece_on(move_to(m))
+ - pos.type_of_piece_on(move_from(m));
+
if (move_is_promotion(m))
- cur->score = QueenValueMidgame;
- else
- cur->score = pos.midgame_value_of_piece_on(move_to(m))
- - pos.type_of_piece_on(move_from(m));
+ cur->score += QueenValueMidgame;
}
}