Skip to content

Commit

Permalink
Fix initialization of TTData.
Browse files Browse the repository at this point in the history
https://tests.stockfishchess.org/tests/view/6757757686d5ee47d9541de9
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 151200 W: 39396 L: 39306 D: 72498
Ptnml(0-2): 445, 16404, 41781, 16556, 414

Discussed in more detail here official-stockfish#5766

closes official-stockfish#5773

No functional change
  • Loading branch information
mstembera authored and vondele committed Jan 18, 2025
1 parent aaafaae commit 3104cd7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ std::tuple<bool, TTData, TTWriter> TranspositionTable::probe(const Key key) cons
> tte[i].depth8 - tte[i].relative_age(generation8) * 2)
replace = &tte[i];

return {false, TTData(), TTWriter(replace)};
return {false,
TTData{Move::none(), VALUE_NONE, VALUE_NONE, DEPTH_ENTRY_OFFSET, BOUND_NONE, false},
TTWriter(replace)};
}


Expand Down
9 changes: 9 additions & 0 deletions src/tt.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ struct TTData {
Depth depth;
Bound bound;
bool is_pv;

TTData() = delete;
TTData(Move m, Value v, Value ev, Depth d, Bound b, bool pv) :
move(m),
value(v),
eval(ev),
depth(d),
bound(b),
is_pv(pv) {};
};


Expand Down

0 comments on commit 3104cd7

Please sign in to comment.