This idea I had when thinking about scores coming from different depths. I was thinking that scores coming from deeper evaluations should be somehow better, although the static score is the same. So that variants (with the same score but higher depth) should be preferred. Which means, from 2 variants, take the variant with the higher score, otherwise, given the same score, take the variant with better depth. Of course there is a problem in PV or even alpha-beta search because coming with a score of alpha (after already having a pv) does actually mean "at most alpha" (the score is an upper limit). This is the point where I missed it when tried to implement the idea and then I forgot about it for a while.

But later, I was thinking that:

1. there could be some work-around about this problem (we could for example search with a "closed" window of 1 instead of 0, i.e. with -(alpha+2), -alpha, in order to catch equal scores)

2. it must not be always the depth, we could consider other characteristica too, based on which we could have preferences; for example, choose open positions instead of closed, and such.

Actually there could be really just 2 or maximal 3 components of the score: the real score, some other "interesting" part - call it preference - and then perhaps depth, which altogether for sure is not a problem to fit in an integer (e.g. 32 bits). When coming from the transposition table we already have depth there, so only a few further bits should be added per entry.

One benefit I can imagine: if we know types of positions where our engine is strong, we can prefer them with the second component, while avoiding the ones where the engine is known to be weak.

## Multi dimensional score

**Moderators:** hgm, Harvey Williamson, bob

### Re: Multi dimensional score

In SF we call this refined evaluation:nionita wrote:This idea I had when thinking about scores coming from different depths. I was thinking that scores coming from deeper evaluations should be somehow better, although the static score is the same. So that variants (with the same score but higher depth) should be preferred. Which means, from 2 variants, take the variant with the higher score, otherwise, given the same score, take the variant with better depth. Of course there is a problem in PV or even alpha-beta search because coming with a score of alpha (after already having a pv) does actually mean "at most alpha" (the score is an upper limit). This is the point where I missed it when tried to implement the idea and then I forgot about it for a while.

Code: Select all

```
// refine_eval() returns the transposition table score if possible, otherwise
// falls back on static position evaluation.
Value refine_eval(const TTEntry* tte, Value v, Value defaultEval) {
assert(tte);
if ( ((tte->type() & BOUND_LOWER) && v >= defaultEval)
|| ((tte->type() & BOUND_UPPER) && v < defaultEval))
return v;
return defaultEval;
}
```

### Re: Multi dimensional score

So you call refine_eval with the static value as default.mcostalba wrote: In SF we call this refined evaluation:

Code: Select all

`// refine_eval() returns the transposition table score if possible, otherwise // falls back on static position evaluation. Value refine_eval(const TTEntry* tte, Value v, Value defaultEval) { assert(tte); if ( ((tte->type() & BOUND_LOWER) && v >= defaultEval) || ((tte->type() & BOUND_UPPER) && v < defaultEval)) return v; return defaultEval; }`

But this is something I really don't understand how it works: comparing a raw static evaluation score with a score coming from at least a quiescent search. While after QS the score still comes from a static evaluation, that position is still much more quiet (let's say it contains at most unsearched negative SEE moves), while the raw static evaluation could be far away from it, because in the next move we could for example loose the queen.

### Re: Multi dimensional score

That's why we prefer the first as long as it is usable....nionita wrote:While after QS the score still comes from a static evaluation, that position is still much more quiet (let's say it contains at most unsearched negative SEE moves), while the raw static evaluation could be far away from it, because in the next move we could for example loose the queen.