My understanding is that if the null move search does not return a beta cutoff score, then see if the score is mate against side to move, and if so, increment depth. Basically it's saying - if the side to move passes, and a shallow search shows your opponent can mate you, then extend.
I fail to see how that could help. If there was no beta cutoff, you are going to continue with a normal search, which would find that same mate anyway, since it's a deeper search than the null move search.
Here's the null move block of code (in VB):
Code: Select all
If NullMoveOK Then
MakeNullMove()
iVal = -iAlphaBeta(iDepth - 1 - iR, -iBeta, -iBeta + 1, tLocalPV)
UndoNullMove()
If (iVal >= iBeta) Then
Return iBeta
End If
End If
Code: Select all
If NullMoveOK Then
MakeNullMove()
iVal = -iAlphaBeta(iDepth - 1 - iR, -iBeta, -iBeta + 1, tLocalPV)
UndoNullMove()
If (iVal >= iBeta) Then
Return iBeta
End If
If iVal < -iMINMATESCORE Then
iDepth = iDepth + 1
End If
End If