diff --git a/src/Lynx/Model/Position.cs b/src/Lynx/Model/Position.cs index d3c71f00d..e9262cc42 100644 --- a/src/Lynx/Model/Position.cs +++ b/src/Lynx/Model/Position.cs @@ -712,6 +712,11 @@ private int RookAdditionalEvaluation(int squareIndex, int pieceIndex, int pieceS packedBonus += CheckBonus[(int)Piece.R] * checks; + if ((attacks & PieceBitBoards[pieceIndex]).CountBits() >= 2) + { + packedBonus += ConnectedRooksBonus; + } + return packedBonus; } diff --git a/src/Lynx/TunableEvalParameters.cs b/src/Lynx/TunableEvalParameters.cs index d5785cd9f..d4d975155 100644 --- a/src/Lynx/TunableEvalParameters.cs +++ b/src/Lynx/TunableEvalParameters.cs @@ -6048,6 +6048,11 @@ public static class EvaluationParams /// public const int BishopPairBonus = 4653086; + /// + /// + /// + public const int ConnectedRooksBonus = 4653086; + /// /// ///