🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #5049

Search extensions on recaptures

#5049
From: Chua Kong Sian
Date: Tue, 22 Mar 1994 04:03
51 lines
2509 bytes
I have been studying the search extension code for gnuchess for recaptures.
Here is the condition whereby recaptures are extended.  

if (flag.rcptr && ply>2 && CptrFlag[ply-1] && CptrFlag[ply-2] &&
((ply<Sdepth+2 && CptrFlag[ply-1]==CptrFlag[ply-2]) ||
 (score > alpha && score < beta)))
     ++depth;			/* extend by 1 ply */


To put it into words, if ply-1 & ply-2 moves are captures, then if
a) both captures are to the same square  OR
b) the estimated score of this position is within (alpha,beta)
then the position is extended by 1 ply.

Let me deal with a) first.  The intention to extend the recapture when it
is on the same square is fine, but unfortunately the implemention is 
incorrect as currently CptrFlag does NOT store the square when the capture
is taking place, but is simply a binary 1/0 flag.  To fix this, look for 
the following line further down

CptrFlag[ply] = (node->flags & capture);

and change this to

CptrFlag[ply] = (node->flags & capture ? TOsquare+1 : 0);

This change should improve the performance by at least 10% and probably as
much as 25% in positions with plenty of captures.


For b), the condition to extend depends on the current (alpha,beta) window.
This is bad as it can give rise to alpha-beta inconsistencies.  Furthermore,
as we are using PVS to guide the search, there will be many nodes whereby 
the alpha-beta window is zero.  Perhaps the approach adopted by Hitech could
be adopted here.  If the score is within a 1/2 pawn window around 
the root score, then the recapture is extended.  So instead of using

(score > alpha && score < beta)

we instead use

(score > root->score - valueP/4 && score < root->score + valueP/4);

There might be another better approach, so any criticisms or suggestions
would be appreciated.

To summarize, the first change is a good thing and should be added.
The second change is merely a suggestion.

Kong Sian
Technical Details
Message-ID: <2mlqmv$poj@nuscc.nus.sg>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,e1098742caf7570d,start
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1994-03-21 20:03:43 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks
From: nsrccks@leonis.nus.sg (Chua Kong Sian)
Newsgroups: gnu.chess
Subject: Search extensions on recaptures
Date: 22 Mar 1994 04:03:43 GMT
Organization: National University of Singapore
Lines: 51
Message-ID: <2mlqmv$poj@nuscc.nus.sg>
NNTP-Posting-Host: leonis.nus.sg
X-Newsreader: TIN [version 1.2 PL0]