Merge official-stockfish/master
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 30 Mar 2019 13:51:07 +0000 (14:51 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 30 Mar 2019 13:51:07 +0000 (14:51 +0100)
bench: 3539234

1  2 
src/endgame.cpp
src/endgame.h
src/evaluate.cpp
src/search.cpp

diff --cc src/endgame.cpp
Simple merge
diff --cc src/endgame.h
@@@ -132,13 -126,8 +133,14 @@@ public
      add<KRKN>("KRKN");
      add<KQKP>("KQKP");
      add<KQKR>("KQKR");
+     add<KNNKP>("KNNKP");
  
 +    // Fairy piece endgames
 +    add<KNSK>("KNSK");
 +    add<KNFK>("KNFK");
 +    add<KNSFKR>("KNSFKR");
 +    add<KSFK>("KSFK");
 +
      add<KNPK>("KNPK");
      add<KNPKB>("KNPKB");
      add<KRPKR>("KRPKR");
@@@ -120,17 -116,7 +120,9 @@@ namespace 
        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) };
diff --cc src/search.cpp
@@@ -986,12 -962,15 +984,16 @@@ moves_loop: // When in check, search st
  
        // 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)