Checking for mate/stalemate before nullmove, eval, ect..
Posted: 30 Sep 2006, 16:16
In my old engine, I didn't check for mate/stalemate until I actually generated the moves for the current position. I generate the moves when I actually start iterating through the moves when searching. This could be a mistake because you might nullmove on a stalemate or return an eval on a mate/stalemate. You will get some speed loss if you generate moves before eval, nullmove and whatever else; but I know this is the "correct" thing to do. What do you guys do to handle this problem -- go with the extra speed or with less speed but bug-free handling of the position?