Skip to content

Commit

Permalink
Fix trace in case of space evaluation
Browse files Browse the repository at this point in the history
We only compute space eval during the opening/early midgame.
Apply the same logic for DoTrace.

No functional change.
  • Loading branch information
joergoster authored and mcostalba committed Nov 27, 2016
1 parent ec83e8a commit 8f30d23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/evaluate.cpp
Expand Up @@ -888,8 +888,9 @@ Value Eval::evaluate(const Position& pos) {
Trace::add(IMBALANCE, ei.me->imbalance());
Trace::add(PAWN, ei.pi->pawns_score());
Trace::add(MOBILITY, mobility[WHITE], mobility[BLACK]);
Trace::add(SPACE, evaluate_space<WHITE>(pos, ei)
, evaluate_space<BLACK>(pos, ei));
if (pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK) >= 12222)
Trace::add(SPACE, evaluate_space<WHITE>(pos, ei)
, evaluate_space<BLACK>(pos, ei));
Trace::add(TOTAL, score);
}

Expand Down

0 comments on commit 8f30d23

Please sign in to comment.