Skip to content

Commit

Permalink
Add basic ConnectedRooksBonus
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Jan 5, 2025
1 parent 4083bca commit b0d4225
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Lynx/Model/Position.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 5 additions & 0 deletions src/Lynx/TunableEvalParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6048,6 +6048,11 @@ public static class EvaluationParams
/// </summary>
public const int BishopPairBonus = 4653086;

/// <summary>
/// <see cref="Utils.Pack(30, 71)"/>
/// </summary>
public const int ConnectedRooksBonus = 4653086;

/// <summary>
/// <see cref="Utils.Pack(-48, -33)"/>
/// </summary>
Expand Down

0 comments on commit b0d4225

Please sign in to comment.