Skip to content

Commit 516353c

Browse files
authored
Dampen eval when shuffling (#34)
1 parent 420b83f commit 516353c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Serendipity/src/main/java/org/shawn/games/Serendipity/AlphaBeta.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ private int pieceValue(Piece p)
133133

134134
public int evaluate(Board board)
135135
{
136-
return (Side.WHITE.equals(board.getSideToMove()) ? NNUE.evaluate(network, whiteAccumulator, blackAccumulator)
136+
int v = (Side.WHITE.equals(board.getSideToMove()) ? NNUE.evaluate(network, whiteAccumulator, blackAccumulator)
137137
: NNUE.evaluate(network, blackAccumulator, whiteAccumulator)) * 24;
138+
return v * (200 - board.getHalfMoveCounter()) / 200;
138139
}
139140

140141
private void sortMoves(List<Move> moves, Board board, int ply)

0 commit comments

Comments
 (0)