X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=fairymax.c;h=36bda212e331121ec60e9d0823e4bf6e18c22749;hb=23a74b05a73ae1a54a57c60522469e6c9b74adc0;hp=5b2e98a6a3d70d35904557b62ce81470a16ea606;hpb=04eb98f3784572e63e23a5da336bae69bb05615c;p=fairymax.git diff --git a/fairymax.c b/fairymax.c index 5b2e98a..36bda21 100644 --- a/fairymax.c +++ b/fairymax.c @@ -18,7 +18,7 @@ /*****************************************************************/ #define MULTIPATH -#define VERSION "4.8O" +#define VERSION "4.8P" #include #include @@ -181,7 +181,8 @@ int k,q,l,e,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ if(flag&1+!t) /* mode (capt/nonc) allowed?*/ {if(t&&(t&16)==k)break; /* capture own */ i=w[t&15]+((t&192)>>sh); /* value of capt. piece t */ - if(i<0&&(pl[t&31]<2||kk!=H&kk!=S||(kk=H,i=-i,0)))m=I,d=98;/* K capture, duple check */ + if(i<0&&(pl[t&31]<2|| /* K capture, (of last K), */ + t>>3&kk!=H&kk!=S||(kk=H,i=-i,0)))m=I,d=98;/* or duple check: cutoff*/ if(m>=l&d>1)goto C; /* abort on fail high */ v=d-1?e:i-p; /*** MVV/LVA scoring if d=1**/ if(d-!t>1) /*** all captures if d=2 ***/ @@ -372,6 +373,8 @@ InitGame() K=BW;W(K--) {b[K]=oo[K+16]+16;b[K+112]=oo[K];b[K+16]=18;b[K+96]=1; /* initial board setup*/ pl[oo[K+16]+16]++;pl[oo[K]]++;pl[18]++;pl[1]++; + if(w[oo[K+16]+16] == -1)pl[oo[K+16]+16]=1; + if(w[oo[K]] == -1)pl[oo[K]]=1; L=8;W(L--)b[16*L+K+257]=(K-BW/2)*(K-BW/2)+(L-3.5)*(L-3.5); /* center-pts table */ } /*(in unused half b[])*/ Side = WHITE; Q=0; O=S; @@ -812,6 +815,7 @@ int main(int argc, char **argv) break; } pl[BLACK+WHITE-color]++;pl[p+color]++; + if(w[p+color] == -1)pl[p+color]=1; // fake we have one if value = -1, to thwart extinction condition continue; } }