Regarding Null Move Pruning

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Regarding Null Move Pruning

Post by hgm »

If it segfaults you should just check in which node it segfaults, and then determine where exactly in the code by putting some print statements in that node (making sure that what these print is not buffered).
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Regarding Null Move Pruning

Post by JohnWoe »

En Passant square must be disabled since a move is passed and it's not legal anymore.
It was a source of bugs when I copied null move logic from Xiphos ... eh developed it from thin air :lol:
syzygy
Posts: 5695
Joined: Tue Feb 28, 2012 11:56 pm

Re: Regarding Null Move Pruning

Post by syzygy »

alessandro wrote: Sun Dec 11, 2022 1:23 pm I see that before applying the search in the null-move you just change the side to move but you keep the current ply in the search tree. This will overwrite the previous move made and saved in the search stack at the same ply.
I don't know the details of your implementation, but I would verify that first.
Indeed it seems much safer to actually "make" the nullmove. Even if simply switching side works now, when the engine starts to keep track of more state for move ordering and extensions/reductions, it will fail.