mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Optimize futilityValue calculation
Avoid calling evaluate() if we already have the score in TT No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
e677185567
commit
a6c6037813
1 changed files with 4 additions and 0 deletions
|
@ -1333,6 +1333,10 @@ namespace {
|
||||||
bool useFutilityPruning = depth < SelectiveDepth
|
bool useFutilityPruning = depth < SelectiveDepth
|
||||||
&& !isCheck;
|
&& !isCheck;
|
||||||
|
|
||||||
|
// Avoid calling evaluate() if we already have the score in TT
|
||||||
|
if (tte && (tte->type() & VALUE_TYPE_EVAL))
|
||||||
|
futilityValue = value_from_tt(tte->value(), ply) + FutilityMargins[int(depth) - 2];
|
||||||
|
|
||||||
// Loop through all legal moves until no moves remain or a beta cutoff
|
// Loop through all legal moves until no moves remain or a beta cutoff
|
||||||
// occurs.
|
// occurs.
|
||||||
while ( bestValue < beta
|
while ( bestValue < beta
|
||||||
|
|
Loading…
Add table
Reference in a new issue