From: Fabian Fichter Date: Sat, 18 Jul 2020 13:47:07 +0000 (+0200) Subject: Merge official-stockfish/master X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=197244ea8ee35b31405d9d77cb997c635b57e4e5;p=fairystockfish.git Merge official-stockfish/master bench: 4507590 --- 197244ea8ee35b31405d9d77cb997c635b57e4e5 diff --cc src/endgame.cpp index c54a5c8,1a5959e..15cb4b2 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@@ -86,16 -79,7 +86,15 @@@ namespace Endgames add("KQKR"); add("KNNKP"); + // Fairy piece endgames + add("KNSK"); + add("KNFK"); + add("KNSFKR"); + add("KSFK"); + add("KSFKF"); + add("KRKS"); + add("KNPK"); - add("KNPKB"); add("KRPKR"); add("KRPKB"); add("KBPKB"); diff --cc src/evaluate.cpp index dedb6d4,d51325f..e3b33b5 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@@ -1058,13 -707,11 +1059,12 @@@ namespace bool pawnsOnBothFlanks = (pos.pieces(PAWN) & QueenSide) && (pos.pieces(PAWN) & KingSide); - bool almostUnwinnable = !pe->passed_count() - && outflanking < 0 + bool almostUnwinnable = outflanking < 0 + && pos.stalemate_value() == VALUE_DRAW && !pawnsOnBothFlanks; - bool infiltration = rank_of(pos.square(WHITE)) > RANK_4 - || rank_of(pos.square(BLACK)) < RANK_5; + bool infiltration = (pos.count(WHITE) && rank_of(pos.square(WHITE)) > RANK_4) + || (pos.count(BLACK) && rank_of(pos.square(BLACK)) < RANK_5); // Compute the initiative bonus for the attacking side int complexity = 9 * pe->passed_count() diff --cc src/pawns.cpp index abecfba,3023021..bb75568 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@@ -125,9 -124,11 +125,11 @@@ namespace || ( stoppers == blocked && r >= RANK_5 && (shift(support) & ~(theirPawns | doubleAttackThem))); + passed &= !(forward_file_bb(Us, s) & ourPawns); + // Passed pawns will be properly scored later in evaluation when we have // full attack info. - if (passed) + if (passed && is_ok(s + Up) && (r < pos.promotion_rank() || !pos.mandatory_pawn_promotion())) e->passedPawns[Us] |= s; // Score this pawn diff --cc src/search.cpp index fb94ee4,993fa85..1cc71c0 --- a/src/search.cpp +++ b/src/search.cpp @@@ -463,7 -433,7 +463,7 @@@ void Thread::search() if (rootDepth >= 4) { Value previousScore = rootMoves[pvIdx].previousScore; - delta = Value(21 * (1 + rootPos.captures_to_hand()) + abs(previousScore) / 256); - delta = Value(21); ++ delta = Value(21 * (1 + rootPos.captures_to_hand())); alpha = std::max(previousScore - delta,-VALUE_INFINITE); beta = std::min(previousScore + delta, VALUE_INFINITE);