ROCE en-passant bug

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

ROCE en-passant bug

Postby Roy van Rijn » 30 Jan 2011, 12:23

Hi (again),

First: Sorry for the overload of topics/questions lately...

Yesterday I started solving the many small bugs in my chess engine using perft/divide. This proved very usefull indeed. For this I've been using ROCE since Roman has a good description on how to use perft/divide on his website including examples.

But now I've run into a problem, with the following position:
8/2p5/3p4/KP5r/1R3pPk/8/4P3/8 b g3 - 0 1

My own engine claims there are 17 legal positions, and so does the cpw (!) but ROCE claims there are 18 positions.
After a short analysis I've found out the move: f4g3.
ROCE claims this is legal, but it isn't. The en-passant move will put the black king in check with the discovered rook on b4!

Which tools do you guys use to track down bugs? Are there better chess engines with such an easy perft/divide as ROCE has?

Update
Also when playing the f4g3 move in ROCE it doesn't see that it is now done. It continues to play with the rook in plain view of the king hehe.
Roy van Rijn
 
Posts: 17
Joined: 26 Jan 2011, 11:54

Re: ROCE en-passant bug

Postby Roman Hartmann » 30 Jan 2011, 12:47

Hi,
you're right regarding the en-passant bug. And actually you're not the first to discover this bug. You might also have noted that the bug is color dependent.

Anyway, time to release a fixed version even though this bug-fixed version won't play any stronger than the previous version 0.390.

Might take a few hours though as I'm planning to release a 64-bit of it as well.

If you tell me what you're using (Windows, Linux, Mac) I could provide you with an extra link to a fixed version in a few minutes though.

best regards
Roman

output of the fixed version:
Code: Select all
roce: setboard 8/2p5/3p4/KP5r/1R3pPk/8/4P3/8 b g3 - 0 1

roce: divide 1

h4g4 1
h4h3 1
h4g3 1
h4g5 1
c7c6 1
c7c5 1
d6d5 1
f4f3 1
h5g5 1
h5f5 1
h5e5 1
h5d5 1
h5c5 1
h5b5 1
h5h6 1
h5h7 1
h5h8 1
Moves: 17
User avatar
Roman Hartmann
 
Posts: 155
Joined: 11 Oct 2004, 14:21

Re: ROCE en-passant bug

Postby Roy van Rijn » 30 Jan 2011, 12:53

Wow, very quick response...

I'm using Windows and I'd love to have the fixed version (64 bit would be fine as well). My own engine has different results a couple of iterations further on, a bug I want to eliminate.
(http://chessprogramming.wikispaces.com/Perft+Results, Position 3, perft 6 and 7)
Roy van Rijn
 
Posts: 17
Joined: 26 Jan 2011, 11:54

Re: ROCE en-passant bug

Postby Roman Hartmann » 30 Jan 2011, 13:34

Ok, took me a little longer but I wanted to run a sanity-check first so I don't release something completely buggy.

Direct link to windows binary (64-bit systems only): http://www.rocechess.ch/roce395.zip

Let me know if it works on your system. It's my first compile of an 64-bit exe for windows so I would like some feedback.

For those running tournaments with my engine included better wait till I make an official release.

best regards
Roman
User avatar
Roman Hartmann
 
Posts: 155
Joined: 11 Oct 2004, 14:21

Re: ROCE en-passant bug

Postby Roy van Rijn » 30 Jan 2011, 13:47

Works like a charm on WIndows 7, 64 bit. Thanks!
Roy van Rijn
 
Posts: 17
Joined: 26 Jan 2011, 11:54

Re: ROCE en-passant bug

Postby Aleks Peshkov » 30 Jan 2011, 14:18

"8/2p5/3p4/KP5r/1R3pPk/8/4P3/8 b g3 - 0 1" is not valid FEN
"8/2p5/3p4/KP5r/1R3pPk/8/4P3/8 b - g3 0 1" is.
Aleks Peshkov
 
Posts: 27
Joined: 13 Jul 2007, 13:14

Re: ROCE en-passant bug

Postby Roy van Rijn » 30 Jan 2011, 14:50

Sorry, obviously a typo!
Roy van Rijn
 
Posts: 17
Joined: 26 Jan 2011, 11:54


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 29 guests