1
0
Fork 0

Fix trace in case of space evaluation

We only compute space eval during the opening/early midgame.
Apply the same logic for DoTrace.

No functional change.
pull/897/merge
joergoster 2016-11-26 10:56:24 +01:00 committed by Marco Costalba
parent ec83e8a72c
commit 8f30d233f8
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}