EXchess castling bug?

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

EXchess castling bug?

Postby Volker Pittlik » 10 Aug 2006, 09:38

EXchess (v5.01 beta) sometimes stops playing and loses on time.

Can someone confirm or deny my observation? All games played under Linux with xboard.

I found out one condition when it happens. In these games:

Code: Select all
[Event "Computer chess game"]
[Site "vlk-ubuntu"]
[Date "2006.08.10"]
[Round "2"]
[White "exchess"]
[Black "Arasan 9.3.1"]
[Result "*"]
[TimeControl "60+1"]
[FEN "r1bqk2r/1p2bpp1/p1nppn1p/8/3NP3/2N1B3/PPPQ1PPP/2KR1B1R w kq - 0 1"]
[SetUp "1"]

{--------------
r . b q k . . r
. p . . b p p .
p . n p p n . p
. . . . . . . .
. . . N P . . .
. . N . B . . .
P P P Q . P P P
. . K R . B . R
white to play
--------------}
1. Nxc6 bxc6 2. Qd4 O-O
*

[Event "Computer chess game"]
[Site "vlk-ubuntu"]
[Date "2006.08.10"]
[Round "1"]
[White "Arasan 9.3.1"]
[Black "exchess"]
[Result "*"]
[TimeControl "60+1"]
[FEN "rnbqkb1r/1p3ppp/p2ppn2/8/3NP3/2N1BP2/PPP3PP/R2QKB1R b KQkq - 0 1"]
[SetUp "1"]

{--------------
r n b q k b . r
. p . . . p p p
p . . p p n . .
. . . . . . . .
. . . N P . . .
. . N . B P . .
P P P . . . P P
R . . Q K B . R
black to play
--------------}
1... e5 2. Nb3 Be6 3. Qd3 Nc6 4. O-O-O
*


EXchess rejects the castling move and is losing on time.

from the debug:

Code: Select all
38833 <first : (debug) done pondering
38833 <first : (debug) ponder move = e1-c1
38833 <first : (debug) out of ponder()
38833 <first : (debug) sending ponder move
38834 <first : move o-o-o
Interrupting second
38835 >second: time 5297
otim 4517
38835 >second: e1c1
AnimateMove: piece 5 slides from 4,0 to 2,0
38971 <second:
38972 <second:
38972 <second:
38972 <second: Error(e1c1)
38972 <first : 10      18    296   850255 O-O-O Be7 Bg5 Nb4 Qd2 Bxb3 axb3 O-O Bxf6
38972 <first : (debug) predicted reply = f8-e7
38972 <first : (debug) starting to ponder
GameEnds(0, (null), 2)
Interrupting first
97521 >first : force
97521 >first : ping 2
97521 >second: quit
97543 >first : quit


If games are played manually under xboard this does not happen. Usually castling is no problem but under certain circumstances I don't know the error occurs.

I tried it with the precompiled version as well as with one compiled from the sources. There is no difference. The author is informed already.

regards

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: EXchess castling bug?

Postby Guenther Simon » 10 Aug 2006, 15:19

Andrew Fan wrote:Hi Volker,


Did you use "setup board"? Or you made the moves from the initial position?

If the former then ExChess may not have interpreted the castling rights correctly.

I'm guessing of course.


Andrew.


My memory could be wrong, but IIRC once I tried to play with fixed
positions from collected FENs instead of a PGN(/lpf vs. /lgf), I think
I noticed that WB(xboard?) doesn't send the castling rights at all?

This should be easy to verify though from Volkers full debug,
from the position where xboard sends the start FEN.

Guenther
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: EXchess castling bug?

Postby Volker Pittlik » 10 Aug 2006, 16:38

Guenther Simon wrote:... I think
I noticed that WB(xboard?) doesn't send the castling rights at all?

This should be easy to verify though from Volkers full debug,
from the position where xboard sends the start FEN.

Guenther


That's almost correct. EXchess does not use the "feature" command to tell xboard if it understands the setboard command.

Therefore xboard uses the "edit" command to set up the position. AFAIK it is not possible let the engine know about the castling rights that way. That explains the engine's behaviour.

Trying to hack it.

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: EXchess castling bug?

Postby Volker Pittlik » 10 Aug 2006, 16:42

Volker Pittlik wrote:...That explains the engine's behaviour.
...


Of course the engine understands the "setboard" command in the command line mode. :shock:

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: EXchess castling bug?

Postby Volker Pittlik » 10 Aug 2006, 17:40

To avoid this problem I have added the following lines in main.cpp:

Code: Select all
  else if(!strcmp(response, "xboard")) { xboard = 1; }
  //beginn feature command VP
  else if(!strcmp(response, "protover")) {
      cout << "\n";
      cout << "feature setboard=1 draw=0\n";
      cout << "feature variants=\"normal\"\n";
      cout << "feature myname=\"EXChess 5.01-beta(hacked)\"\n";
  }
  //end feature command VP
  else if(!strcmp(response, "build")) { build_book(game.pos); }


So far no new trouble related to that hack has occured here :-).

The castling moves in the setup position are now accepted by EXchess.

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 47 guests

cron