🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #59

Re: Gnuchess bug

#59
From: Peter King
Date: Tue, 28 Nov 1989 16:18
55 lines
2485 bytes
In article <1989Nov27.204521.7311@Neon.Stanford.EDU> dalgic@bodega.stanford.edu (Ismail Dalgic) writes:
>I have the GnuChess version 1.53, and several times I noticed a very
>disturbing bug.  The program "forgets" about the piece in front of a
>pawn in its original rank when it advances the pawn by 2.  Here is a
>game list which will indicate what I mean.  Black is GnuChess.  I
>played it with 60 moves/5 min. mode.
>
> 1. e2e4             e7e5
> 2. g1f3             d7d6
> 3. d2d4             g8f6
> 4. c1g5             e5d4
> 5. d1d4             b8c6
> 6. f1b5             c8d7
> 7. b5c6             d7c6
> 8. b1c3             f8e7
> 9. c3d5             c7c5 !!!
>
>
>Any ideas, fixes etc???
>
>--Ismail Dalgic

The version of gnuchess I have doesn't seem to have a version number
of any sort, but I retrieved it last week from an archive and its date
there is in August.  The date in the main gnuchess.c is April 1988,
but ther is some conditional compilation using a NEWMOVE preprocessor
variable.  With that set to 0, the problem described does not occur.

With NEWMOVE=12 (the default) it does.
The problem is in the file move.c, and a patch follows.

*** move.c	Thu Jun 22 05:31:06 1989
--- nmove.c	Tue Nov 28 16:05:53 1989
***************
*** 334,339
      u = p[sq].nextpos; /* and follow no captures thread */
      while (u != sq) {
        if (color[u] == neutral) LinkMove(ply,sq,u,xside);
        u = p[u].nextpos;
      }
    }

--- 334,340 -----
      u = p[sq].nextpos; /* and follow no captures thread */
      while (u != sq) {
        if (color[u] == neutral) LinkMove(ply,sq,u,xside);
+       else break; /*cannot make initial pawn two rank move if blocked! */
        u = p[u].nextpos;
      }
    }
-- 
Peter King, Computer Science Department	JANET:	pjbk@uk.ac.hw.cs
  Heriot-Watt University		ARPA:	pjbk@cs.hw.ac.uk
  79 Grassmarket, Edinburgh EH1 2HJ	or	pjbk%cs.hw.ac.uk@ucl-cs
Phone: (+44) 31 225 6465 Ext. 555	UUCP:	..!ukc!cs.hw.ac.uk!pjbk
Technical Details
Message-ID: <3833@brahma.cs.hw.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!eru!luth!sunic!mcsun!ukc!edcastle!hwcs!pjbk
References: <1989Nov27.204521.7311@Neon.Stanford.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!eru!luth!sunic!mcsun!ukc!edcastle!hwcs!pjbk
From: pjbk@cs.hw.ac.uk (Peter King)
Newsgroups: gnu.chess
Subject: Re: Gnuchess bug
Message-ID: <3833@brahma.cs.hw.ac.uk>
Date: 28 Nov 89 16:18:37 GMT
References: <1989Nov27.204521.7311@Neon.Stanford.EDU>
Reply-To: pjbk@cs.hw.ac.uk (Peter King)
Organization: Computer Science, Heriot-Watt U., Scotland
Lines: 55