X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=73e2144cc2d248faaf1fad03e08e43f6f3cb5870;hp=cb1ad1f420060ef6d7fa1e0b076f1a04ac3388b3;hb=8aecf2698184babce57ccfd2ba5948342e29c325;hpb=36e4a86c08a4b79965d819b7893709245cad840a diff --git a/src/evaluate.cpp b/src/evaluate.cpp index cb1ad1f4..73e2144c 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -725,12 +725,17 @@ namespace { bool pawnsOnBothFlanks = (pos.pieces(PAWN) & QueenSide) && (pos.pieces(PAWN) & KingSide); + bool almostUnwinnable = !pe->passed_count() + && outflanking < 0 + && !pawnsOnBothFlanks; + // Compute the initiative bonus for the attacking side int complexity = 9 * pe->passed_count() + 11 * pos.count() + 9 * outflanking + 18 * pawnsOnBothFlanks + 49 * !pos.non_pawn_material() + - 36 * almostUnwinnable -103 ; // Now apply the bonus: note that we find the attacking side by extracting