1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/*++
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 ([email protected]) 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);
}
|