Bi dimensional statis evaluation

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

nionita
Posts: 175
Joined: Fri Oct 22, 2010 9:47 pm
Location: Austria

Bi dimensional statis evaluation

Post by nionita »

The static score of a position is just a number. The major purpose of this number is to establish a preference order of the positions we encounter during the search.

But when doing futility pruning we misuse this number to decide if it makes sense to search further on some (perhaps hopeless) variant or we can safely stop the search on that tree part. Some margins are considered which we subtract from alpha (or beta) and if we are below, we consider the position not to be promising enough compared to what we already have. I can imagine this works very well in a lot of positions, but it seems to me to be an unnecessary constraint.

I propose to static evaluate 2 numbers per position:
- the score - what we do now, perhaps with less components
- the tension - a number which express somehow the potential of the position, kind of unquietness.

We will use the score just normal in the alpha-beta search, but when we ponder about pruning the tree under some position we would use the sum score+tension and compare with the current alpha. If we are below, we decide it will not pay off to continue search on that way.

What is the advantage? Well, first we make the "margin" (which is the tension) actually depending on the position (and is not fix, like now). And second, we can tune the evaluation of tension differently from score - which for me is the most promising issue!

In the tension there will be terms like "attacked pieces" - which, for themselves are not directly an advantage, but could make the continuation interesting enough. Those terms of course would disappear from the score. Perhaps this will even avoid parts of the quiescent search, if we are lucky (let's say we just lost the queen but are attacking one knight - the last move we don't need to make anymore).
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: Bi dimensional statis evaluation

Post by gladius »

nionita wrote:I propose to static evaluate 2 numbers per position:
- the score - what we do now, perhaps with less components
- the tension - a number which express somehow the potential of the position, kind of unquietness.
This is an interesting direction to take evaluation. Stockfish does something quite similar, computing an evaluation "margin", which is added to eval for futility pruning.

The margin is currently computed solely based off of the king safety score. I've played with increasing it in some other situations without success so far, but the idea certainly seems good!
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Bi dimensional statis evaluation

Post by Evert »

I'm experimenting with a similar idea in Jazz at the moment, but dealing with lazy evaluation rather than futility pruning. The idea is that the lazy evaluation bound can be much smaller if there are no passed pawns and the king is likely safe. The implementation currently still has a fixed margin, but the test can "disallow" the lazy evaluation exit.
So far all it does in games is break even, but it does help in test positions so there's probably a way to make this work if I refine it and tune it. Lots of other things to do though!

I think it's fairly obvious that some sort of dynamical margins lead to more accurate pruning/lazy exit decisions. The problem is that calculating these dynamical margins is not free, so you lose some of the potential benefit.