Problem understanding futility pruning

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

Re: Problem understanding futility pruning

Post by nionita »

hgm wrote:There is no change in QS for futile moves at d=1, because the opponent will immediately stand pat, the eval being >= beta.
This would be true only for really futil moves, but then we should maybe use a margin which is high enough to cover the highest positional increase ever, which for sure is not my case. For example, moving a passed pawn to 7th rank or moving the queen near the opponent king could increase the static eval score by 400 cp (not sure if this is really the case in Barbarossa, I will have to do a statistic).

So actually I have true and fake futil moves, mostly true, but then the fake ones would change the QS.

Or you mean I should really take a margin which ALWAYS cover every possible positional gain of a quiet move?
User avatar
hgm
Posts: 27794
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Problem understanding futility pruning

Post by hgm »

I don't understand that. Changed QS compared to what? You either prune, in which case there is no QS at all, or you don't. In the latter case QS would just be what it is; how you took the decision not to prune does not affect what you search in QS.
nionita
Posts: 175
Joined: Fri Oct 22, 2010 9:47 pm
Location: Austria

Re: Problem understanding futility pruning

Post by nionita »

As you said:
- if I don't prune I have a QS
- if I prune, the QS is only virtuall, cause it is the stand pat that you explained before (eval >= beta for the opponent)

For a real futil move there would be no difference.
But for a fake one, when the real eval after the move is higher, then the opponent can't beta cut, and another (real) QS takes place, which now has to take into consideration the new threat too.
User avatar
hgm
Posts: 27794
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Problem understanding futility pruning

Post by hgm »

Well, that is how QS works. You take into account all threats created or solved by the moves. This is why you don't do just a static analysis (e.g. counting number of attackers and protectors), but a real search.

If the margin is too low, you will prune some moves that would not be refuted by stand-pat. If you are lucky, they would have been refured by some other move. But if not, you pruned a cut move, and will thus overlook a tactical shot. That still doesn't have much to do with whether the previous move created new threats or not.