]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Give bonus for rooks that are alligned with enemy kingring
[stockfish] / src / evaluate.cpp
index 7aa67f26db6c4d0a2f916f97a822d2efb6a812fe..8e8cc0912e57ddd4e37c12cb579631eaee9de289 100644 (file)
@@ -143,6 +143,7 @@ namespace {
   constexpr Score PassedFile          = S( 11,  8);
   constexpr Score PawnlessFlank       = S( 17, 95);
   constexpr Score RestrictedPiece     = S(  7,  7);
+  constexpr Score RookOnKingRing      = S( 16,  0);
   constexpr Score RookOnQueenFile     = S(  5,  9);
   constexpr Score SliderOnQueen       = S( 59, 18);
   constexpr Score ThreatByKing        = S( 24, 89);
@@ -287,6 +288,8 @@ namespace {
             kingAttackersWeight[Us] += KingAttackWeights[Pt];
             kingAttacksCount[Us] += popcount(b & attackedBy[Them][KING]);
         }
+        else if (Pt == ROOK && (file_bb(s) & kingRing[Them]))
+            score += RookOnKingRing;
 
         int mob = popcount(b & mobilityArea[Us]);