mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Extract only exact scores to get the PV
This should allow to skip overwritten nodes because only in PV we store in TT with VALUE_TYPE_EXACT flag. Test result for the whole series is: After 3627 games at 5" Mod vs Orig +1037 =1605 -985 +5 ELO After 1311 games at 1'+0" Mod vs Orig +234 =850 -227 +2 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
62c68c2d21
commit
5c3ebd1fbf
1 changed files with 3 additions and 1 deletions
|
@ -197,9 +197,11 @@ void TranspositionTable::extract_pv(const Position& pos, Move bestMove, Move pv[
|
||||||
pv[ply] = bestMove;
|
pv[ply] = bestMove;
|
||||||
p.do_move(pv[ply++], st);
|
p.do_move(pv[ply++], st);
|
||||||
|
|
||||||
// Try to add moves from TT while possible
|
// Extract moves from TT when possible. We try hard to always
|
||||||
|
// get a ponder move, that's the reason of ply < 2 conditions.
|
||||||
while ( (tte = retrieve(p.get_key())) != NULL
|
while ( (tte = retrieve(p.get_key())) != NULL
|
||||||
&& tte->move() != MOVE_NONE
|
&& tte->move() != MOVE_NONE
|
||||||
|
&& (tte->type() == VALUE_TYPE_EXACT || ply < 2)
|
||||||
&& move_is_legal(p, tte->move())
|
&& move_is_legal(p, tte->move())
|
||||||
&& (!p.is_draw() || ply < 2)
|
&& (!p.is_draw() || ply < 2)
|
||||||
&& ply < PLY_MAX)
|
&& ply < PLY_MAX)
|
||||||
|
|
Loading…
Add table
Reference in a new issue