Increase size of internal repetition table to avoid possible bounds error
This commit is contained in:
parent
f19b15dcab
commit
bcd8cbb423
1 changed files with 4 additions and 3 deletions
|
@ -11,8 +11,9 @@ namespace ChessChallenge.Chess
|
||||||
|
|
||||||
public RepetitionTable()
|
public RepetitionTable()
|
||||||
{
|
{
|
||||||
hashes = new ulong[256];
|
const int size = 1024;
|
||||||
startIndices = new int[hashes.Length + 1];
|
hashes = new ulong[size - 1];
|
||||||
|
startIndices = new int[size];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(Board board)
|
public void Init(Board board)
|
||||||
|
@ -36,8 +37,8 @@ namespace ChessChallenge.Chess
|
||||||
{
|
{
|
||||||
hashes[count] = hash;
|
hashes[count] = hash;
|
||||||
startIndices[count + 1] = reset ? count : startIndices[count];
|
startIndices[count + 1] = reset ? count : startIndices[count];
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TryPop()
|
public void TryPop()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue