I agree - get there in your own time but don't forget, as you search deeper and deeper, that if the promotion is near the root of the tree, that could be thousands of nodes you are searching because you aren't cutting off at the first one.Fguy64 wrote:As for your second point. I think I understand, either kind of cutoff would cause the same issue of missing a desireable underpromotion. Which is why I have already decided to proceed with the way I originally had it, for now, which is don't update alpha until after all four promotion nodes are searched. I can always change it later.
As for mate score, a couple of posts ago I described how mate is currently handled. As long as that works, I'll stick with it and look for improvements like you have suggested later.
regards.
I really struggled to understand alpha-beta when I first wrote an engine. In fact I refused to believe it really worked until I had proved it myself. I sense you have the same underlying disbelief but it's really quite simple. If your promotion to a Queen causes a cutoff (> beta) you should get out immediately because it really doesn't matter what score another promotion is going to give - none of these moves are going to be played because the opponent (e.g. the side not to move for the ply you are searching) will not make this move since they have already found a better one.
Andy.