A strange search function

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: A strange search function

Post by hgm »

chrisw wrote: Fri Mar 29, 2024 4:42 pm In QS do you do equal captures or only those that gain something?
If gain only, then is N=B or B>N? Eg do you take “equal” NxB captures but not NxN, BxB nor BxN?
Do you take equal PxP?
I treat every capture where the value difference is less than half a Pawn (and the victim is pseudo-legally protected) as equal. In orthodox Chess that would include all four possible minor x minor captures. The equal captures still get extended half a ply, so they are searched if the remaining depth is still half a ply. As it might very well be at the start of QS.

In fact, QS for me already starts when 1.5 ply (or less) is left: then the non-captures that were not made possible by the two preceding ply are not searched, and the stand-pat score is substituted for them. Another way to look at this is that in the first ply of QS some non-captures are searched as well, namely the slider moves that were discovered by the latest own or opponent move, or those that move the piece that moved on the previous turn from its new location.