summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c80d52c)
If we can moveCountPrune and next quiet move has negative stats,
then go directly to the next move stage (Bad_Captures).
Reduction formula is tweaked to compensate for the decrease in move count that is used in LMR.
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 6847 W: 1276 L: 1123 D: 4448
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 48687 W: 6503 L: 6226 D: 35958
Bench:
5919519
Closes #1036
/// left. It picks the move with the biggest value from a list of generated moves
/// taking care not to return the ttMove if it has already been searched.
/// left. It picks the move with the biggest value from a list of generated moves
/// taking care not to return the ttMove if it has already been searched.
-Move MovePicker::next_move() {
+Move MovePicker::next_move(bool skipQuiets) {
+ while ( cur < endMoves
+ && (!skipQuiets || cur->value >= VALUE_ZERO))
if ( move != ttMove
&& move != ss->killers[0]
&& move != ss->killers[1]
if ( move != ttMove
&& move != ss->killers[0]
&& move != ss->killers[1]
MovePicker(const Position&, Move, Depth, Square);
MovePicker(const Position&, Move, Depth, Search::Stack*);
MovePicker(const Position&, Move, Depth, Square);
MovePicker(const Position&, Move, Depth, Search::Stack*);
+ Move next_move(bool skipQuiets = false);
private:
template<GenType> void score();
private:
template<GenType> void score();
for (int d = 1; d < 64; ++d)
for (int mc = 1; mc < 64; ++mc)
{
for (int d = 1; d < 64; ++d)
for (int mc = 1; mc < 64; ++mc)
{
- double r = log(d) * log(mc) / 2;
+ double r = log(d) * log(mc) / 1.95;
Reductions[NonPV][imp][d][mc] = int(std::round(r));
Reductions[PV][imp][d][mc] = std::max(Reductions[NonPV][imp][d][mc] - 1, 0);
Reductions[NonPV][imp][d][mc] = int(std::round(r));
Reductions[PV][imp][d][mc] = std::max(Reductions[NonPV][imp][d][mc] - 1, 0);
Depth extension, newDepth;
Value bestValue, value, ttValue, eval;
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
Depth extension, newDepth;
Value bestValue, value, ttValue, eval;
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
- bool captureOrPromotion, doFullDepthSearch, moveCountPruning;
+ bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets;
Piece moved_piece;
int moveCount, quietCount;
Piece moved_piece;
int moveCount, quietCount;
&& !excludedMove // Recursive singular search is not allowed
&& (tte->bound() & BOUND_LOWER)
&& tte->depth() >= depth - 3 * ONE_PLY;
&& !excludedMove // Recursive singular search is not allowed
&& (tte->bound() & BOUND_LOWER)
&& tte->depth() >= depth - 3 * ONE_PLY;
// Step 11. Loop through moves
// Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
// Step 11. Loop through moves
// Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
- while ((move = mp.next_move()) != MOVE_NONE)
+ while ((move = mp.next_move(skipQuiets)) != MOVE_NONE)
&& (!pos.advanced_pawn_push(move) || pos.non_pawn_material() >= 5000))
{
// Move count based pruning
&& (!pos.advanced_pawn_push(move) || pos.non_pawn_material() >= 5000))
{
// Move count based pruning
+ if (moveCountPruning) {
+ skipQuiets = true;
// Reduced depth of the next LMR search
int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY;
// Reduced depth of the next LMR search
int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY;