Skip to content

Commit

Permalink
fix off-by-one error when calculating tt size
Browse files Browse the repository at this point in the history
bench: 4032203
tokens: 1058
  • Loading branch information
analog-hors committed Oct 10, 2023
1 parent f4bfed8 commit 440d722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Chess-Challenge/src/My Bot/MyBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class MyBot : IChessBot {

public MyBot(ulong ttBytes = 256 * 1024 * 1024) {
ulong entries = 1;
while (entries * 2 < ttBytes / 24) {
while (entries * 2 <= ttBytes / 24) {
entries *= 2;
}
transpositionTable = new (ulong, ushort, int, int, int)[entries];
Expand Down

0 comments on commit 440d722

Please sign in to comment.