Thread View: gnu.chess
4 messages
4 total messages
Started by Berthier Ribeiro Araujo Neto
Mon, 25 Sep 1989 17:20
gnuchess bad movement
Author: Berthier Ribeiro Araujo Neto
Date: Mon, 25 Sep 1989 17:20
Date: Mon, 25 Sep 1989 17:20
103 lines
1439 bytes
1439 bytes
I got some problems with gnuchess. It is running, but plays strangely sometimes. In the game below, it moves the pawn over the knight when I play f1e1 (rook one square left). Could anyone try this movement to see it the mistake happens in other environments? Thank you in advance, --Berthier >>>>>>>> the game >>>>>>>>>>>>>. 2 1 17 1 1 0 0 1 0 223 1485 52 52 1025 0 0 1281 0 1025 1537 0 257 257 257 769 0 257 257 257 0 0 513 769 257 513 0 0 0 770 0 257 0 0 0 0 0 0 0 258 0 0 0 0 258 0 514 0 258 514 0 0 0 258 258 770 0 258 258 258 1026 0 0 1282 0 1026 1538 0 2843 0 0 0 19 0 0 13091 0 0 0 0 0 0 1557 0 0 0 12 0 0 15917 0 0 0 0 0 0 274 0 0 0 213 0 0 13356 -3 4 7861 37 0 0 541 0 0 0 50 0 0 15641 38 4 8134 29 0 0 7435 0 0 0 82 0 0 14634 27 4 11393 43 0 0 3092 0 0 0 405 0 0 12328 3 4 10125 43 0 0 1299 0 0 0 149 0 0 15422 -2 4 11418 41 0 2 1030 0 0 0 103 0 1 14899 -8 4 9029 41 0 0
Re: gnuchess bad movement
Author: Doug Ingraham
Date: Tue, 26 Sep 1989 17:02
Date: Tue, 26 Sep 1989 17:02
83 lines
2871 bytes
2871 bytes
In article <27401@shemp.CS.UCLA.EDU>, rosa@maui.cs.ucla.edu (Berthier Ribeiro Araujo Neto) writes:
> I got some problems with gnuchess. It is running, but plays strangely
> sometimes. In the game below, it moves the pawn over the knight when
> I play
>
> f1e1 (rook one square left).
>
> Could anyone try this movement to see it the mistake happens in other
> environments?
>
>
> Thank you in advance,
>
> --Berthier
The problem is in the new module move.c in the function GenMoves. Here in
its entirety is GenMoves with the blocked double pawn advance fixed and
the missing test for enpassant pawn captures.
--------------------------------- cut here ---------------------------------
#if (NEWMOVE > 5)
GenMoves(ply,sq,side,xside)
short ply,sq,side,xside;
/*
Generate moves for a piece. The moves are taken from the
precalulated array posdata. If the board is free, next move
is choosen from nextpos else from nextdir.
*/
{
register short u,piece;
register struct sqdata *p;
piece = board[sq];
p = posdata[side][piece][sq];
if (piece == pawn) {
u = p[sq].nextdir; /* follow captures thread */
while (u != sq) {
if (color[u] == xside || u == epsquare) LinkMove(ply,sq,u,xside);
u = p[u].nextdir;
}
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;
} else break; /* this will prevent a double move if blocked */
}
}
else {
u = p[sq].nextpos;
while (u != sq) {
if (color[u] == neutral) {
LinkMove(ply,sq,u,xside);
u = p[u].nextpos;
}
else {
if (color[u] == xside) LinkMove(ply,sq,u,xside);
u = p[u].nextdir;
}
}
}
}
#endif
--------------------------------- cut again ----------------------------
I haven't found any other real bugs, but changing several for loops
to memset and memcpy made a 30% difference in speed. I also changed
an if then else sequence to a switch which speeded it up 5%. I cleaned
up the board editor code. Also some trivial name changes for compatibility
with SYSTEM V 3.2 curses. The variable beep conflicts with a curses
beep function.
I will be sending diffs to Stuart Cracraft for inclusion in the next
release.
I hope this helps.
--
Doug Ingraham (SysAdmin)
Lofty Pursuits (Public Access for Rapid City SD USA)
uunet!loft386!dpi
Re: gnuchess bad movement
Author: scott
Date: Tue, 26 Sep 1989 18:56
Date: Tue, 26 Sep 1989 18:56
13 lines
867 bytes
867 bytes
>[report of an illegal move by gnuchess] That's because the new move generator in gnuchess 1.53 is buggy. It's faster than the old one, but it doesn't understand that a blocked pawn can't move two squares. It also doesn't know about en passant captures. I'm told the author has been notified. I suggest sticking to the previous release for now, gnuchess 1.52. Jay Scott scott@cs.uiuc.edu
Re: gnuchess bad movement (the bug creator)
Author: Hans-Erik Sandstrom LOG/SV
Date: Thu, 28 Sep 1989 11:11
Date: Thu, 28 Sep 1989 11:11
34 lines
1915 bytes
1915 bytes
In article <231300001@s.cs.uiuc.edu> scott@s.cs.uiuc.edu writes: > > >>[report of an illegal move by gnuchess] > >That's because the new move generator in gnuchess 1.53 is buggy. >It's faster than the old one, but it doesn't understand that >a blocked pawn can't move two squares. It also doesn't know about >en passant captures. I'm told the author has been notified. > >I suggest sticking to the previous release for now, gnuchess 1.52. > > Jay Scott > scott@cs.uiuc.edu Dont bother to fix this bug in gnuchess 1.53 it has been fixed months ago. I was`nt aware that this version of gnuchess had been released, It is a somewhat premature version. The version I had intended for release was posted to fsf 27 june. I wonder why this version has not been released yet. There is actually an even newer version with some very rare (probably newer encountered) bugs in version 1.52 corrected. memcpy can be an improvement in some places but this depends on the machine you are using so thats why they are commented out in the official release of gnuchess. I would really like some feedback on the new move generator. Send this to my address below. Hans Eric Sandstr|m E-mail: hes@log-sv.se Base/OPEN development ...!mcvax!enea!log-sv!hes TeleLOGIC Sundsvall AB Box 883 Tel: +46 60 161098
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads