My engine is bitboard.
I quickly tried the following regarding the futility pruning dialog in previous posts...
I calculate the FutilityLimit value without a margin. When I put any margin in, move selection is affected. the "eval", in my code is not a lazy eval but is a full eval and has non material scoring as well, so isn't this what the margin is suppose to emulate? anyways, it is a lot more stable without it. I'll play around with this later.
Then, if we are at depth 1 and the FutilityLimit is positive, I only generate pseudo (raw) capture moves, otherwise, I generate all pseudo moves.
Code: Select all
if ((depth == 1) && (FutilityLimit > 0))
ml.GenerateAllRawCaptureMoves(false); // if futile, only try capture moves
else
ml.GenerateAllRawMoves();
then at the top of the move loop, BEFORE making the move, I do the following...
Code: Select all
if ((depth == 1)
&& (m != hm) // don't prune the hash move
&& IsPrunable
&& (MoveValue(m) <= FutilityLimit) )
{
break;
}
I didn't know what to do about the hash move in this situation. Should I ignore any hash move and just go with the move ordering, or, does the hash have more "info" that we should consider and make the move anyway. seems subtle since it is only one move we are talking about.
I have been trying various positions with this code, a previous version without it (but has some older pruning type code) and Stockfish (for move accuracy). So far the results seems promising. the "best move" usually aligns with SF so I haven't introduced any major bugs, but more testing is needed. I'm also going to test my own two version against each other. my latest version was playing 50 ELO or so better than the last, so I would hope these changes will extend that.
as for your "checking moves" comments, I currently don't have specific code just to look for checking moves. that will take more time to develop.