Skip to content

Commit

Permalink
You dumbass
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Nov 13, 2024
1 parent 5f151e5 commit 3681e38
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Lynx/Model/Position.cs
Original file line number Diff line number Diff line change
Expand Up @@ -860,14 +860,14 @@ internal static int ScaleEvalWith50MovesDrawDistance(int eval, int movesWithoutC
/// <summary>
/// Formula based on Stormphrax
/// </summary>
internal int ScaleEvalWithMaterial(int eval)
internal int ScaleEvalWithMaterial(int eval)
{
var material_phase =
(SEE.PieceValues[(int)Piece.P] * (PieceBitBoards[(int)Piece.P] & PieceBitBoards[(int)Piece.p]).CountBits())
+ (SEE.PieceValues[(int)Piece.N] * (PieceBitBoards[(int)Piece.N] & PieceBitBoards[(int)Piece.n]).CountBits())
+ (SEE.PieceValues[(int)Piece.B] * (PieceBitBoards[(int)Piece.B] & PieceBitBoards[(int)Piece.b]).CountBits())
+ (SEE.PieceValues[(int)Piece.R] * (PieceBitBoards[(int)Piece.R] & PieceBitBoards[(int)Piece.r]).CountBits())
+ (SEE.PieceValues[(int)Piece.Q] * (PieceBitBoards[(int)Piece.Q] & PieceBitBoards[(int)Piece.q]).CountBits());
(SEE.PieceValues[(int)Piece.P] * (PieceBitBoards[(int)Piece.P] | PieceBitBoards[(int)Piece.p]).CountBits())
+ (SEE.PieceValues[(int)Piece.N] * (PieceBitBoards[(int)Piece.N] | PieceBitBoards[(int)Piece.n]).CountBits())
+ (SEE.PieceValues[(int)Piece.B] * (PieceBitBoards[(int)Piece.B] | PieceBitBoards[(int)Piece.b]).CountBits())
+ (SEE.PieceValues[(int)Piece.R] * (PieceBitBoards[(int)Piece.R] | PieceBitBoards[(int)Piece.r]).CountBits())
+ (SEE.PieceValues[(int)Piece.Q] * (PieceBitBoards[(int)Piece.Q] | PieceBitBoards[(int)Piece.q]).CountBits());

return eval * (26500 + material_phase) / 32768;
}
Expand Down

0 comments on commit 3681e38

Please sign in to comment.