mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Retire quick_evaluate()
No change in functionality signature The only functional change is that when we reach PLY_MAX, we now return VALUE_DRAW instead of evaluating position. But we reach PLY_MAX only when position is dead drawn and transposition table is filled with draw scores, so this shouldn't matter at all. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
committed by
Marco Costalba
parent
d457594197
commit
000a975eaf
@@ -436,21 +436,6 @@ Value do_evaluate(const Position& pos, EvalInfo& ei, int threadID) {
|
||||
|
||||
} // namespace
|
||||
|
||||
/// quick_evaluate() does a very approximate evaluation of the current position.
|
||||
/// It currently considers only material and piece square table scores. Perhaps
|
||||
/// we should add scores from the pawn and material hash tables?
|
||||
|
||||
Value quick_evaluate(const Position &pos) {
|
||||
|
||||
assert(pos.is_ok());
|
||||
|
||||
static const ScaleFactor sf[2] = {SCALE_FACTOR_NORMAL, SCALE_FACTOR_NORMAL};
|
||||
|
||||
Value v = scale_by_game_phase(pos.value(), MaterialInfoTable::game_phase(pos), sf);
|
||||
return (pos.side_to_move() == WHITE ? v : -v);
|
||||
}
|
||||
|
||||
|
||||
/// init_eval() initializes various tables used by the evaluation function
|
||||
|
||||
void init_eval(int threads) {
|
||||
|
||||
Reference in New Issue
Block a user