S( 79,140), S( 88,143), S( 88,148), S( 99,166), S(102,170), S(102,175),
S(106,184), S(109,191), S(113,206), S(116,212) }
};
+ constexpr Score MaxMobility = S(250, 250);
+ constexpr Score DropMobility = S(10, 10);
- // Outpost[knight/bishop][supported by pawn] contains bonuses for minor
- // pieces if they occupy or can reach an outpost square, bigger if that
- // square is supported by a pawn.
- constexpr Score Outpost[][2] = {
- { S(22, 6), S(36,12) }, // Knight
- { S( 9, 2), S(15, 5) } // Bishop
- };
-
// RookOnFile[semiopen/open] contains bonuses for each rook when there is
// no (friendly) pawn on the rook file.
constexpr Score RookOnFile[] = { S(18, 7), S(44, 20) };
// Step 14. Pruning at shallow depth (~170 Elo)
if ( !rootNode
- && pos.non_pawn_material(us)
+ && (pos.non_pawn_material(us) || !(pos.pieces(us) ^ pos.pieces(us, PAWN)))
&& bestValue > VALUE_MATED_IN_MAX_PLY)
{
+ // Skip quiet moves if movecount exceeds our FutilityMoveCount threshold
- moveCountPruning = depth < 16 * ONE_PLY
- && moveCount >= FutilityMoveCounts[improving][depth / ONE_PLY];
++ moveCountPruning = depth * (1 + pos.captures_to_hand()) < 16 * ONE_PLY
++ && moveCount >= FutilityMoveCounts[improving][depth / ONE_PLY];
+
if ( !captureOrPromotion
&& !givesCheck
+ && (!pos.must_capture() || !pos.attackers_to(to_sq(move), ~pos.side_to_move()))
&& !pos.advanced_pawn_push(move))
{
// Move count based pruning (~30 Elo)