From: Fabian Fichter Date: Sat, 9 Feb 2019 23:26:41 +0000 (+0100) Subject: Merge official-stockfish/master X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=7feaaabdf7464fc6650edff0d3bc0e0bce85bf9c;p=fairystockfish.git Merge official-stockfish/master bench: 4691733 --- 7feaaabdf7464fc6650edff0d3bc0e0bce85bf9c diff --cc src/evaluate.cpp index 61342d8,95729e4..50aa7ec --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@@ -160,12 -154,6 +160,9 @@@ namespace // PassedDanger[Rank] contains a term to weight the passed score constexpr int PassedDanger[RANK_NB] = { 0, 0, 0, 3, 7, 11, 20 }; + // KingProximity contains a penalty according to distance from king + constexpr Score KingProximity = S(2, 2); + - // KingProtector[knight/bishop] contains a penalty according to distance from king - constexpr Score KingProtector[] = { S(5, 6), S(6, 5) }; - // Assorted bonuses and penalties constexpr Score BishopPawns = S( 3, 7); constexpr Score CloseEnemies = S( 6, 0); @@@ -383,8 -339,7 +380,8 @@@ score += MinorBehindPawn; // Penalty if the piece is far from the king + if (pos.count(Us)) - score -= KingProtector[Pt == BISHOP] * distance(s, pos.square(Us)); + score -= KingProtector * distance(s, pos.square(Us)); if (Pt == BISHOP) { diff --cc src/search.cpp index 2309158,af7a5c1..03022fa --- a/src/search.cpp +++ b/src/search.cpp @@@ -1009,13 -983,11 +1009,11 @@@ moves_loop: // When in check, search st { Depth r = reduction(improving, depth, moveCount); - if (captureOrPromotion) // (~5 Elo) + if (captureOrPromotion || (pos.must_capture() && MoveList(pos).size())) // (~5 Elo) { - // Increase reduction by comparing opponent's stat score - if ((ss-1)->statScore >= 0) - r += ONE_PLY; - - r -= r ? ONE_PLY : DEPTH_ZERO; + // Decrease reduction by comparing opponent's stat score + if ((ss-1)->statScore < 0) + r -= ONE_PLY; } else {