🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #4994

Bug in ttable.c wrt storing of mate scores

#4994
From: Chua Kong Sian
Date: Fri, 20 May 1994 04:13
34 lines
1627 bytes
There is a bug in PutInTTable() in ttable.c whereby mate scores are
incorrectly stored.  This was fixed in pl68, but reappeared in pl 69
and 70.  The patch for it appears below.

Kong Sian


*** /usr/people/kongsian/gnuchess-4.0/src/ttable.c	Tue May 10 05:44:23 1994
--- ttable.c	Sun May 15 16:17:58 1994
***************
*** 235,242 ****
  #endif
  	if(ptbl->depth > (UCHAR)depth) return false;
    /* adjust score so moves to mate is from this ply */
- 	if (score > 9000) score += ply;
- 	else if (score < -9000) score -= ply;
  	ptbl->hashbd = hashbd;
  	ptbl->depth = (UCHAR) depth;
  	ptbl->score = score;
--- 235,240 ----
***************
*** 254,260 ****
--- 252,262 ----
  		ptbl->score = beta + 1;
  	  }
  	else
+ 	  {
+ 	        if (score > 9000) score += ply;
+ 	        else if (score < -9000) score -= ply;
  		ptbl->flags = truescore;
+ 	  }
  
  #ifdef HASHSTATS
  	ttdepthin[ptbl->depth]++;
Technical Details
Message-ID: <2rhdcp$ju5@nuscc.nus.sg>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!get.hooked.net!decwrl!ames!lll-winken.llnl.gov!overload.lbl.gov!agate!howland.reston.ans.net!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,95885a1683123c48,start
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1994-05-19 21:34:49 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!get.hooked.net!decwrl!ames!lll-winken.llnl.gov!overload.lbl.gov!agate!howland.reston.ans.net!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks
From: nsrccks@leonis.nus.sg (Chua Kong Sian)
Newsgroups: gnu.chess
Subject: Bug in ttable.c wrt storing of mate scores
Date: 20 May 1994 04:13:13 GMT
Organization: National University of Singapore
Lines: 38
Message-ID: <2rhdcp$ju5@nuscc.nus.sg>
NNTP-Posting-Host: leonis.nus.sg
X-Newsreader: TIN [version 1.2 PL0]