Skip to content

Commit 8ed5191

Browse files
committed
fix regression
1 parent ec707b9 commit 8ed5191

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Value doSearch(Board &board, int depth, Value alpha, Value beta,
6969
uint64_t hash = board.hash();
7070
Move preferred = Move::none();
7171
if (TTEntry *entry = search::tt.lookup(hash)) {
72-
if (entry->getDepth() >= depth && ply != 0) {
72+
if (entry->getDepth() >= depth) {
7373
Value ttScore = entry->getScore();
7474
TTFlag flag = entry->getFlag();
7575

tt.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ TTEntry *TranspositionTable::lookup(uint64_t hash) {
6868
TTEntry &e0 = table[index], &e1 = table[index + 1];
6969
// Check the entries
7070
for (TTEntry *e : {&e0, &e1}) {
71-
if (e->key == hash)
71+
if (e->key == hash &&
72+
e->getGeneration() == this->time)
7273
return e;
7374
}
7475
return nullptr;

0 commit comments

Comments
 (0)