Article View: gnu.chess
Article #1876Bug hunt
From: Simon Waters
Date: Sun, 13 Jan 2002 16:55
Date: Sun, 13 Jan 2002 16:55
33 lines
2004 bytes
2004 bytes
Noted a bug in the GNU chess code.
White to move.
White Kd6, White Pc7
Black Kb7
If the program is set to search a specific depth it find Kd7 no
problem
If the search is interrupted or runs out of time it plays c8=N
and draws. Since Ctrl-C or SIGINT justs sets the TIMEOUT flag
the behaviour is as expected.
Dropping diagnostics in to the Search (Not SearchRoot) routine
part of search.c hints that the score being backed up the tree
becomes -MATE when it should be +MATE or something similar.....
if (flags & TIMEOUT)
{
best = (ply & 1 ? rootscore : -rootscore);
return (best);
}
A couple of fiddles with the "best =" line resolve the problem,
but I can't figure out the right thing to do here, or whether
this is the bug or just a bit of the code sensitive to the real
bug.
Anyone with a better understanding of this piece of code care to
comment?
Simon, needing to understand the PVS code better.
Technical Details
Message-ID:
<3C41BC13.A1ECA3CB@wretched.demon.co.uk>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!wretched.demon.co.uk!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,b42791c26be03551,start X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 2002-01-13 08:56:05 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!wretched.demon.co.uk!not-for-mail From: Simon Waters <Simon@wretched.demon.co.uk> Newsgroups: gnu.chess Subject: Bug hunt Date: Sun, 13 Jan 2002 16:55:47 +0000 Organization: Eighth Layer Limited Message-ID: <3C41BC13.A1ECA3CB@wretched.demon.co.uk> NNTP-Posting-Host: wretched.demon.co.uk X-NNTP-Posting-Host: wretched.demon.co.uk:193.237.109.203 X-Trace: news.demon.co.uk 1010940940 nnrp-07:15405 NO-IDENT wretched.demon.co.uk:193.237.109.203 X-Complaints-To: abuse@demon.net X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.19 i686) X-Accept-Language: en-GB, en-US, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 33