From d6d1661439273061a219ec84a818d4a589e41427 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 14 Mar 2013 18:59:16 +0100 Subject: [PATCH] Also search null move in QS iteration of deeper nodes The QS iteration of deeper nodes is intended to replace sorting the captures in front of the 1-ply iteration. Not to generate an actual QS result. It is thus not a good idea to stand pat or take a stand-pat cutoff in this iteration, as this could mean we start the ply-1 iteration blindly (and thus likely with pointless non-captures) if null-move turns out to be worse than stand-pat (failing low) because of a threat. So we now do null move not based on iteration number, but based on total node depth. Except that in the pre-QS iteration it is still suppressed. --- fairymax.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fairymax.c b/fairymax.c index 50a6f79..f9cf637 100644 --- a/fairymax.c +++ b/fairymax.c @@ -163,7 +163,7 @@ int k,q,l,e,ev,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ (K=X,L=Y&~S,Score=m,d=3))) /* time's up: go do best */ {x=B=X; /* start scan at prev. best */ h=Y&S; /* request try noncastl. 1st*/ - P=d>2&&l+I?D(16-k,-l,1-l,-e,-ev,2*S,2*S,d-3):I; /* search null move */ + P=n>2&d>1&&l+I?D(16-k,-l,1-l,-e,-ev,2*S,2*S,d-3):I; /* search null move */ m=-P beta unconsidered:static eval */ SHAMAX( if(pl[k]<=1&pl[16-k]>1)m=I-1; ) /* bare king loses */ N++; /* node count (for timing) */ -- 1.7.0.4