X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=07a1e2102abd7a923ddbc0bbb98a055ada85ea19;hp=71f6cf79afaa594af2e6245285816e7b44898d37;hb=c83fd08fd4fa91702ef0f727bc777c613524403d;hpb=87507121d5bb93dde97cd68a126c15259f2e9596 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 71f6cf79..07a1e210 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -251,9 +251,10 @@ namespace { // in init_safety(). Value SafetyTable[100]; - // Pawn and material hash tables, indexed by the current thread id - MaterialInfoTable* MaterialTable[8] = {0, 0, 0, 0, 0, 0, 0, 0}; - PawnInfoTable* PawnTable[8] = {0, 0, 0, 0, 0, 0, 0, 0}; + // Pawn and material hash tables, indexed by the current thread id. + // Note that they will be initialized at 0 being global variables. + MaterialInfoTable* MaterialTable[THREAD_MAX]; + PawnInfoTable* PawnTable[THREAD_MAX]; // Sizes of pawn and material hash tables const int PawnTableSize = 16384; @@ -435,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) {