Checking for mate/stalemate before nullmove, eval, ect..

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Checking for mate/stalemate before nullmove, eval, ect..

Postby Pradu » 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?
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: Checking for mate/stalemate before nullmove, eval, ect..

Postby Daniel Shawul » 30 Sep 2006, 19:04

I think that some do a check for mate/stalemate in the quiescence search when attack tables are used there (which might make detection of mate/stalemate easier), but in the main search it might be costly to try it before doing null move.
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 26 guests