-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
void storeHashEntry(const Board &b, const Move &m, const int score, const int depth, const char flag, HashTable * hashTable){
if(m.from < 0){
throw runtime_error("Invalid move");
}
const U64 key = hashBoard(b);
const U64 index = key % hashTable->numEntries;
if(hashTable->pTable[index].hashKey == 0){
hashTable->newWrite++;
}
else{
hashTable->overWrite++;
}
hashTable->pTable[index].depth = depth;
hashTable->pTable[index].score = score;
hashTable->pTable[index].flag = flag;
hashTable->pTable[index].move = m;
hashTable->pTable[index].hashKey = key;
}Metadata
Metadata
Assignees
Labels
No labels