X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;fp=src%2Fevaluate.cpp;h=27fcd47763060dd260812124b2b9bffb7ca4a491;hp=e7d30825e298f8f5c199f9d86cd9fb405e7c814e;hb=de4e1cb88d9d5a6b4bf6e47bdc2a71e025bf8f46;hpb=56d5504f6548b69ce6faaa271a8b55f3773db70c diff --git a/src/evaluate.cpp b/src/evaluate.cpp index e7d30825..27fcd477 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -705,6 +705,9 @@ namespace { int outflanking = distance(pos.square(WHITE), pos.square(BLACK)) - distance(pos.square(WHITE), pos.square(BLACK)); + bool infiltration = rank_of(pos.square(WHITE)) > RANK_4 + || rank_of(pos.square(BLACK)) < RANK_5; + bool pawnsOnBothFlanks = (pos.pieces(PAWN) & QueenSide) && (pos.pieces(PAWN) & KingSide); @@ -716,10 +719,11 @@ namespace { int complexity = 9 * pe->passed_count() + 11 * pos.count() + 9 * outflanking + + 12 * infiltration + 21 * pawnsOnBothFlanks + 51 * !pos.non_pawn_material() - 43 * almostUnwinnable - - 95 ; + - 100 ; // Now apply the bonus: note that we find the attacking side by extracting the // sign of the midgame or endgame values, and that we carefully cap the bonus