mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 11:39:15 +00:00
Re-enable TT.insert_pv()
This time make sure that valuable TTentries are not overwritten. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
d0b8bc5fdf
commit
b056e5d40a
2 changed files with 4 additions and 2 deletions
|
@ -743,7 +743,7 @@ namespace {
|
||||||
|
|
||||||
// Write PV to transposition table, in case the relevant entries have
|
// Write PV to transposition table, in case the relevant entries have
|
||||||
// been overwritten during the search.
|
// been overwritten during the search.
|
||||||
//TT.insert_pv(p, ss[0].pv);
|
TT.insert_pv(p, ss[0].pv);
|
||||||
|
|
||||||
if (AbortSearch)
|
if (AbortSearch)
|
||||||
break; // Value cannot be trusted. Break out immediately!
|
break; // Value cannot be trusted. Break out immediately!
|
||||||
|
|
|
@ -208,7 +208,9 @@ void TranspositionTable::insert_pv(const Position& pos, Move pv[]) {
|
||||||
|
|
||||||
for (int i = 0; pv[i] != MOVE_NONE; i++)
|
for (int i = 0; pv[i] != MOVE_NONE; i++)
|
||||||
{
|
{
|
||||||
store(p.get_key(), VALUE_NONE, VALUE_TYPE_NONE, Depth(-127*OnePly), pv[i]);
|
TTEntry *tte = retrieve(p.get_key());
|
||||||
|
if (!tte || tte->move() != pv[i])
|
||||||
|
store(p.get_key(), VALUE_NONE, VALUE_TYPE_NONE, Depth(-127*OnePly), pv[i]);
|
||||||
p.do_move(pv[i], st);
|
p.do_move(pv[i], st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue