/*++ Copyright (c) Scott Gasch Module Name: evalhash.c Abstract: Rough (mid-tree) eval estimation. Used to hold the eval-score hashing code (EVAL_HASH) too; that subsystem was cut for good (measured as slow as or slower than just computing eval) and is not coming back in this form, so this file is now just GetRoughEvalScore(). Author: Scott Gasch (scott.gasch@gmail.com) 11 Jul 2006 Revision History: --*/ #include "chess.h" SCORE GetRoughEvalScore(IN OUT SEARCHER_THREAD_CONTEXT *ctx, IN SCORE iAlpha, IN SCORE iBeta, IN FLAG fUseHash) /*++ Routine description: This is meant to be the "one place" that code looks when it needs to get an idea of the estimated evaluation of a position (in mid tree, not at the leaves... at the leaves just call Eval directly). Just calls Eval() -- its own lazy-exit machinery already is the cheap, calibrated estimate this function exists to provide, so there's no separate "rough" estimator to maintain here. Used to fall back to material + a stale ctx->uPositional EWMA left over from whatever full eval last ran anywhere in the tree, fed by an eval-hash probe (fUseHash); both are gone now (see the commit removing ctx->uPositional and EVAL_HASH), and this is the direct replacement. Parameters: IN OUT SEARCHER_THREAD_CONTEXT *ctx, IN SCORE iAlpha, IN SCORE iBeta, IN FLAG fUseHash : unused, kept for call-site compatibility Return value: SCORE --*/ { (void)fUseHash; return Eval(ctx, iAlpha, iBeta, NULL); }