mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Store in TT with depth == -OnePly instead of -1
When depth < DEPTH_ZERO we store with the same depth all the positions, use -OnePly instead of -1 for consistency with depth arithmetic. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
4f28e19fc0
commit
4f96f420a3
1 changed files with 1 additions and 1 deletions
|
@ -1546,7 +1546,7 @@ namespace {
|
||||||
return value_mated_in(ply);
|
return value_mated_in(ply);
|
||||||
|
|
||||||
// Update transposition table
|
// Update transposition table
|
||||||
Depth d = (depth == DEPTH_ZERO ? DEPTH_ZERO : Depth(-1));
|
Depth d = (depth == DEPTH_ZERO ? DEPTH_ZERO : DEPTH_ZERO - ONE_PLY);
|
||||||
ValueType vt = (bestValue <= oldAlpha ? VALUE_TYPE_UPPER : bestValue >= beta ? VALUE_TYPE_LOWER : VALUE_TYPE_EXACT);
|
ValueType vt = (bestValue <= oldAlpha ? VALUE_TYPE_UPPER : bestValue >= beta ? VALUE_TYPE_LOWER : VALUE_TYPE_EXACT);
|
||||||
TT.store(pos.get_key(), value_to_tt(bestValue, ply), vt, d, ss->bestMove, ss->eval, ei.kingDanger[pos.side_to_move()]);
|
TT.store(pos.get_key(), value_to_tt(bestValue, ply), vt, d, ss->bestMove, ss->eval, ei.kingDanger[pos.side_to_move()]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue