mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Lookup TT for eval also in PV nodes
We don't need to evaluate the position if it is already cached in TT. We already do this in non-PV case. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
9643d7524e
commit
276513c19f
1 changed files with 3 additions and 3 deletions
|
@ -1025,8 +1025,8 @@ namespace {
|
||||||
// search<>() is the main search function for both PV and non-PV nodes
|
// search<>() is the main search function for both PV and non-PV nodes
|
||||||
|
|
||||||
template <NodeType PvNode>
|
template <NodeType PvNode>
|
||||||
Value search(Position& pos, SearchStack ss[], Value alpha, Value beta,
|
Value search(Position& pos, SearchStack ss[], Value alpha, Value beta, Depth depth,
|
||||||
Depth depth, int ply, bool allowNullmove, int threadID, Move excludedMove) {
|
int ply, bool allowNullmove, int threadID, Move excludedMove) {
|
||||||
|
|
||||||
assert(alpha >= -VALUE_INFINITE && alpha <= VALUE_INFINITE);
|
assert(alpha >= -VALUE_INFINITE && alpha <= VALUE_INFINITE);
|
||||||
assert(beta > alpha && beta <= VALUE_INFINITE);
|
assert(beta > alpha && beta <= VALUE_INFINITE);
|
||||||
|
@ -1098,7 +1098,7 @@ namespace {
|
||||||
isCheck = pos.is_check();
|
isCheck = pos.is_check();
|
||||||
if (!isCheck)
|
if (!isCheck)
|
||||||
{
|
{
|
||||||
if (!PvNode && tte && (tte->type() & VALUE_TYPE_EVAL))
|
if (tte && (tte->type() & VALUE_TYPE_EVAL))
|
||||||
ss[ply].eval = value_from_tt(tte->value(), ply);
|
ss[ply].eval = value_from_tt(tte->value(), ply);
|
||||||
else
|
else
|
||||||
ss[ply].eval = evaluate(pos, ei, threadID);
|
ss[ply].eval = evaluate(pos, ei, threadID);
|
||||||
|
|
Loading…
Add table
Reference in a new issue