You can generate only captures of pieces that are heavy enough to raise the score above alpha.cms271828 wrote:I looked at Bruce Morlands site, and he doesat the start of the node, instead of what I was doing...(raising alpha if its not in check, and there were no captures made).Code: Select all
val = Evaluate(); if (val >= beta) return beta; if (val > alpha) alpha = val;
So, now I need to decide on something better than captures on last_to square.
Previously I examined all captures, and it was much slower in reaching any good depth. But I didn't have any MVV/LVA ordering on the captures, which is one reason the tree exploded.
I'm not sure if I should generate all captures, and order them, or just some. I feel that if I don't generate all then hanging pieces may be overlooked, but is it worth just generating some of the captures(I don't know which) so that the lack of accuracy gives a greater depth of search, and overall better performance?
Thanks
This is what strelka is doing and strelka's qsearch does not generate all captures.
1)pawns captures are not generated if the score is smaller than alpha - 250
2)knight or bishop captures are not generated if the score is smaller than alpha-450
3)rook captures are not generated if the score is smaller than alpha-650
4)queen captures are not generated if the score is smaller than alpha-1050
Note that Movei does not make captures in similiar conditions but strelka is smarter and save time relative to movei because it even does not generate them in the first place.
I did not read the code of most free source programs so I do not know if not generating captures that are not high enough is used in other free source programs.
Uri