1
0
Fork 0
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:
Marco Costalba 2010-05-08 13:12:46 +01:00
parent 9643d7524e
commit 276513c19f

View file

@ -1025,8 +1025,8 @@ namespace {
// search<>() is the main search function for both PV and non-PV nodes
template <NodeType PvNode>
Value search(Position& pos, SearchStack ss[], Value alpha, Value beta,
Depth depth, int ply, bool allowNullmove, int threadID, Move excludedMove) {
Value search(Position& pos, SearchStack ss[], Value alpha, Value beta, Depth depth,
int ply, bool allowNullmove, int threadID, Move excludedMove) {
assert(alpha >= -VALUE_INFINITE && alpha <= VALUE_INFINITE);
assert(beta > alpha && beta <= VALUE_INFINITE);
@ -1098,7 +1098,7 @@ namespace {
isCheck = pos.is_check();
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);
else
ss[ply].eval = evaluate(pos, ei, threadID);