mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Make static value saved in TT independent from ply
After 963 games at 1+0 Mod vs Orig +246 =511 -206 52.08% 501.0/962 +14 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
c81010a878
commit
cddda7cd19
1 changed files with 3 additions and 7 deletions
|
@ -1540,14 +1540,10 @@ namespace {
|
|||
// Use the cached evaluation score if possible
|
||||
assert(ei.futilityMargin == Value(0));
|
||||
|
||||
staticValue = tte->value();
|
||||
staticValue = tte->value() + ply;
|
||||
}
|
||||
else
|
||||
{
|
||||
staticValue = evaluate(pos, ei, threadID);
|
||||
if (!value_is_mate(staticValue + Value(ply)))
|
||||
staticValue += Value(ply);
|
||||
}
|
||||
staticValue = evaluate(pos, ei, threadID) + ply;
|
||||
|
||||
if (ply == PLY_MAX - 1)
|
||||
return evaluate(pos, ei, threadID);
|
||||
|
@ -1560,7 +1556,7 @@ namespace {
|
|||
{
|
||||
// Store the score to avoid a future costly evaluation() call
|
||||
if (!isCheck && !tte && ei.futilityMargin == 0)
|
||||
TT.store(pos.get_key(), value_to_tt(bestValue, ply), VALUE_TYPE_EVAL, Depth(-127*OnePly), MOVE_NONE);
|
||||
TT.store(pos.get_key(), bestValue - ply, VALUE_TYPE_EVAL, Depth(-127*OnePly), MOVE_NONE);
|
||||
|
||||
return bestValue;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue