mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 01:29:36 +00:00
No Tempo for draw scores given by heuristic functions
The current master applies Eval::Tempo even to leaves evaluated as draw by some of the static evaluation functions of endgame.cpp (for instance KNN vs K or stalemates in KP vs K). This results in some lines being reported as +0.07 or -0.07 when the terminal position has reached such endgames (0.07 being about the value of a tempo for Stockfish). This patch does not apply Eval::tempo to these positions. This leads to more nodes being evaluated as VALUE_DRAW during search, giving more opportunities for cut-offs in alpha-beta. STC: LLR: 2.96 (-2.94,2.94) [0.00,4.00] Total: 52602 W: 11776 L: 11403 D: 29423 http://tests.stockfishchess.org/tests/view/5a8cb8f60ebc590297cc8546 LTC: LLR: 2.97 (-2.94,2.94) [0.00,4.00] Total: 156613 W: 26820 L: 26158 D: 103635 http://tests.stockfishchess.org/tests/view/5a8f452d0ebc590297cc865a Bench: 4924749
This commit is contained in:
parent
ad2a0e356e
commit
29bc128384
1 changed files with 4 additions and 3 deletions
|
@ -880,7 +880,8 @@ namespace {
|
||||||
Trace::add(TOTAL, score);
|
Trace::add(TOTAL, score);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pos.side_to_move() == WHITE ? v : -v; // Side to move point of view
|
return (pos.side_to_move() == WHITE ? v : -v) // Side to move point of view
|
||||||
|
+ Eval::Tempo;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -890,7 +891,7 @@ namespace {
|
||||||
/// evaluation of the position from the point of view of the side to move.
|
/// evaluation of the position from the point of view of the side to move.
|
||||||
|
|
||||||
Value Eval::evaluate(const Position& pos) {
|
Value Eval::evaluate(const Position& pos) {
|
||||||
return Evaluation<NO_TRACE>(pos).value() + Eval::Tempo;
|
return Evaluation<NO_TRACE>(pos).value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -904,7 +905,7 @@ std::string Eval::trace(const Position& pos) {
|
||||||
|
|
||||||
Eval::Contempt = SCORE_ZERO; // Reset any dynamic contempt
|
Eval::Contempt = SCORE_ZERO; // Reset any dynamic contempt
|
||||||
|
|
||||||
Value v = Evaluation<TRACE>(pos).value() + Eval::Tempo;
|
Value v = Evaluation<TRACE>(pos).value();
|
||||||
|
|
||||||
v = pos.side_to_move() == WHITE ? v : -v; // Trace scores are from white's point of view
|
v = pos.side_to_move() == WHITE ? v : -v; // Trace scores are from white's point of view
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue