mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Account for Tempo in do_evaluate()
This is more correct because we let evaluate() to be a pure dispatcher and also now evaluate and tracing outputs are consistent. No functional change.
This commit is contained in:
parent
c97b702f4d
commit
907f912463
1 changed files with 3 additions and 3 deletions
|
@ -693,7 +693,7 @@ namespace {
|
||||||
// If we have a specialized evaluation function for the current material
|
// If we have a specialized evaluation function for the current material
|
||||||
// configuration, call it and return.
|
// configuration, call it and return.
|
||||||
if (ei.mi->specialized_eval_exists())
|
if (ei.mi->specialized_eval_exists())
|
||||||
return ei.mi->evaluate(pos);
|
return ei.mi->evaluate(pos) + Eval::Tempo;
|
||||||
|
|
||||||
// Probe the pawn hash table
|
// Probe the pawn hash table
|
||||||
ei.pi = Pawns::probe(pos, thisThread->pawnsTable);
|
ei.pi = Pawns::probe(pos, thisThread->pawnsTable);
|
||||||
|
@ -793,7 +793,7 @@ namespace {
|
||||||
Tracing::sf = sf;
|
Tracing::sf = sf;
|
||||||
}
|
}
|
||||||
|
|
||||||
return pos.side_to_move() == WHITE ? v : -v;
|
return (pos.side_to_move() == WHITE ? v : -v) + Eval::Tempo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -872,7 +872,7 @@ namespace Eval {
|
||||||
/// of the position always from the point of view of the side to move.
|
/// of the position always from the point of view of the side to move.
|
||||||
|
|
||||||
Value evaluate(const Position& pos) {
|
Value evaluate(const Position& pos) {
|
||||||
return do_evaluate<false>(pos) + Tempo;
|
return do_evaluate<false>(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue