🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #5015

Re: Bug in ttable.c wrt storing of mate scores

#5015
From: Chua Kong Sian
Date: Fri, 20 May 1994 07:21
35 lines
1794 bytes
Please ignore my previous patch.  Its not very correct.  Here is the
correct patch.

Kong Sian

*** /usr/people/kongsian/gnuchess-4.0/src/ttable.c	Tue May 10 05:44:23 1994
--- ttable.c	Fri May 20 15:13:45 1994
***************
*** 234,242 ****
  	HashAdd++;
  #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;
--- 234,239 ----
***************
*** 254,260 ****
--- 251,263 ----
  		ptbl->score = beta + 1;
  	  }
  	else
+ 	  {
+                 /* adjust score so moves to mate is from this ply */
+ 	        if (score > 9000) score += ply;
+ 	        else if (score < -9000 && score != -9999) score -= ply;
+                 ptbl->score = score;
  		ptbl->flags = truescore;
+ 	  }
  
  #ifdef HASHSTATS
  	ttdepthin[ptbl->depth]++;
Technical Details
Message-ID: <2rhoea$m7q@nuscc.nus.sg>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!connected.com!sitka.wsipc.wednet.edu!news.ans.net!solaris.cc.vt.edu!MathWorks.Com!yeshua.marcam.com!usc!cs.utexas.edu!swrinde!gatech!psuvax1!news.pop.psu.edu!news.cac.psu.edu!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks
References: <2rhdcp$ju5@nuscc.nus.sg>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,95885a1683123c48
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1994-05-26 15:43:14 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!connected.com!sitka.wsipc.wednet.edu!news.ans.net!solaris.cc.vt.edu!MathWorks.Com!yeshua.marcam.com!usc!cs.utexas.edu!swrinde!gatech!psuvax1!news.pop.psu.edu!news.cac.psu.edu!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks
From: nsrccks@leonis.nus.sg (Chua Kong Sian)
Newsgroups: gnu.chess
Subject: Re: Bug in ttable.c wrt storing of mate scores
Date: 20 May 1994 07:21:46 GMT
Organization: National University of Singapore
Lines: 36
Message-ID: <2rhoea$m7q@nuscc.nus.sg>
References: <2rhdcp$ju5@nuscc.nus.sg>
NNTP-Posting-Host: leonis.nus.sg
X-Newsreader: TIN [version 1.2 PL0]