...
if( nullMoveValue >= beta ) {
return beta;
}
I would use
...
if( player == Max && nullMoveValue >= beta ) {
return beta;
}
if( player == Min && nullMoveValue <= alpha ) {
return alpha;
}
Is that correct?
...
if( nullMoveValue >= beta ) {
return beta;
}
I would use
...
if( player == Max && nullMoveValue >= beta ) {
return beta;
}
if( player == Min && nullMoveValue <= alpha ) {
return alpha;
}
Is that correct?
Quote: Original post by crypto_rsa
Hi, I am currently struggling with null move heuristic implementation and I have a couple of questions.
1. Null move doesn't generate a cutoff whenever a regular search does, does it? If I understand it correctly, it generates a cutoff only if the current position is very strong for the player who is making the null move.
Quote: 2. My implementation doesn't use negamax for various reasons, I use separate Min and Max routines.
Quote: How does the code for null move differ?
Quote: I think that instead of...if( nullMoveValue >= beta ) { return beta;}
I would use...if( player == Max && nullMoveValue >= beta ) { return beta;}if( player == Min && nullMoveValue <= alpha ) { return alpha;}
Is that correct?
Quote: You understand it correctly.
Quote: What are those reasons?
Quote:
That part looks correct, but you didn't post how you compute nullMoveValue. You want to make a 0-window search just to know if the value is above beta or not (in the max or negamax case), and you want to reduce depth by 2 or 3 plies.
Quote: I assume you are programming chess, right?
Quote: Original post by alvaro
The only complication I can think of is that it might interfere with not allowing more than one of two null-moves in a row, so it would be a little tricky.
Quote: Original post by crypto_rsaQuote: Original post by alvaro
The only complication I can think of is that it might interfere with not allowing more than one of two null-moves in a row, so it would be a little tricky.
Talking of which, I saw different opinions about this "rule" - some people suggest having several null moves in a row is not a mistake. What do you think?
Quote: Original post by crypto_rsa
Does the null move method cause a significant (or at least noticeable) increase in the algorithm performance? I am not able to notice any difference. Maybe my implementation is wrong or it generally does not help much in my game (not chess).