From 440d722b51cc90eae9a39344c059e20c6c95fecc Mon Sep 17 00:00:00 2001 From: analog-hors <44050761+analog-hors@users.noreply.github.com> Date: Sun, 8 Oct 2023 20:00:54 +1000 Subject: [PATCH] fix off-by-one error when calculating tt size bench: 4032203 tokens: 1058 --- Chess-Challenge/src/My Bot/MyBot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chess-Challenge/src/My Bot/MyBot.cs b/Chess-Challenge/src/My Bot/MyBot.cs index ffd3a71..4475a33 100644 --- a/Chess-Challenge/src/My Bot/MyBot.cs +++ b/Chess-Challenge/src/My Bot/MyBot.cs @@ -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];