hgm wrote:Uri Blass wrote:Do you do something like the following:
if lazy evaluation>(beta+0.50) and the last move was no checking move return beta;
It depends at which level you are talking. Usually you consider the score at the level where you generate the move, but decide not to search it. There the condition would be
if( CurrentEval + PieceVal[Victim] + 0.5 < Alpha) Score = Alpha;
which is the same thing as ignoring the move.
This is similar to what you propose one level deeper (but saving you the call and return). The difference is that LazyEval is usually something that is done from scratch, while the evaluation estimate used in futility pruning is based on a full evaluation plus an estimate of the differential update (which can be much more accurate for moves that cannot have a large positional impact).
At d=0 you only consider captures, but with futility pruning you ignore captures that cannot possibly raise the evaluation score above Alpha. Because you know the move will at most return that evaluation score, as the opponent can always stand pat in the reply.
That is exactly the same at d=1. The only difference is that at d=1 you also apply it to non-captures. But I see no reason why captures could not have positional gains at least as big as non-captures.
1)I understand what you mean.
I thought about pruning like if eval>beta+margin return beta.
I understand that we talk about pruning of the type
if (eval after move that I may prune)<alpha-margin return alpha.
practically I use both types of pruning.
I considered both of them as futility.
2)It seems to me that you are right that you practically can use the same margin when remaining depth is 0 and when remaining depth is 1 except the fact that you may generate all moves when remaining depth is 1 and you generate only part of them when remaining depth is 0(I do not say only captures because most programs generate also checks in part of the cases and reply to checks)
Checks seems not to be relevant if we assume that pruning is not used for checking moves.
The only reason that I can see for bigger risk at depth=1 is in case that you know that your pruning is not sound and may give wrong results and the risk to get wrong result is smaller at depth=0 when you consider part of the moves relative to the case when the depth=1 and you consider all the moves.
Uri