From: Fabian Fichter Date: Sat, 30 Mar 2019 13:51:07 +0000 (+0100) Subject: Merge official-stockfish/master X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=0ad60a857288359a52b9e6ee563c5bbfa68ac3a3;p=fairystockfish.git Merge official-stockfish/master bench: 3539234 --- 0ad60a857288359a52b9e6ee563c5bbfa68ac3a3 diff --cc src/endgame.h index 62c4230,2a48488..2b51618 --- a/src/endgame.h +++ b/src/endgame.h @@@ -132,13 -126,8 +133,14 @@@ public add("KRKN"); add("KQKP"); add("KQKR"); + add("KNNKP"); + // Fairy piece endgames + add("KNSK"); + add("KNFK"); + add("KNSFKR"); + add("KSFK"); + add("KNPK"); add("KNPKB"); add("KRPKR"); diff --cc src/evaluate.cpp index 9dba7be,98082c4..90c2e95 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@@ -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 index f1bc6ef,e75d085..391819e --- a/src/search.cpp +++ b/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)