Uri Blass wrote:It means that you practically store different value in the hash not only for mate in 2 and mate in 3 but also for winning a rook in 3 moves and winning a rook in 2 moves.
This mean that you may need to increase the number of bits that you store in the hash table and difference of 1 in my evaluationn is now difference of 10,000.
Indeed, the way I wrote it (comparing to CurEval in stead of -MATINGSCORES) would also score a position that would win a Rook in 2 moves slightly better than one winning a Rook in 3 moves, ending in the same position.
I am not sure why you want to increase the resolution of the score 10,000 fold. Do you expect your engine ever to see the forced loss of a rook in 10,000 moves (20,000 ply)? It seems 50 moves will be the practical limit to see such gains for some time to come.
In the second place, why would you want these scoring differences to be infinitesimal, i.e. always completely negligible compared to even the smallest evaluation difference? Suppose my engine sees the forced loss of a Rook vs Knight in 20 moves (40 ply), after which position A is reached in an end leaf. It can sacrifice that Rook for a Knight on the next move, and then, after best play, it will end 15 centPawn better in the end leaf B then it had evaluated A. Would you really want it to give the Rook immediately, in order to salvage those 15 cP of positional score?
I know that I wouldn't! For one, the 40-ply 'forced loss' is unlikely to have searched the tree exhaustively to 40 ply, there will be lots of pruned / reduced branches and perhaps one of those will offer an escape that the engine cannot see yet. Once the Rook is gone, I am unlikely to get it back (I will be playing with a weaker piece army...). In the second place, the position where I lose the Rook on ply=40 is searched a lot less deep than that at ply=2. If I am giving the Rook now, I am pretty sure that I won't win it back the following 19 moves. The ply=40 loss might occur in a leaf, and searching a little deeper might bring the counter-attack (which I have 20 moves to prepare) within the horizon. Finally, even if all this would have been revealed in a 100-ply reductionless full-width search, so that it is 100% certain, who says that my opponent can do that. Maybe he doesn't see the combination through which he can gain the Rook at all. If I play RxN, he most likely will not miss the fact that he can recapture that Rook...
So I think that delaying an 'inevitable' loss for 20 moves is well worth 20cP of positional advantage. That is in fact on the low side; with current engine capabilities it might well be worth half a Pawn to delay the loss of a Rook for 10 moves. (The exact tradeoff could be measured through testing). No reason at all to limit the accumulated delay bonus to a small fraction of 1 cP.