Problem with xboard

Discussion of chess software programming and technical issues.

Moderator: Ras

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Problem with xboard

Post by bob »

mathmoi wrote:I'm sorry, but I think you misread the log. I'm _not_ sending accepted (or anything else Winboard is not expecting). Actually it's my engine that is not understanding the "accepted" commands sent to him by Winboard. So until I code that part of the protocol it's sending "Error (Unknown command): accepted".

But thanks for the reply anyway.
what I am looking at is this:

745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first Error (Unknown command): random
745 <first Error (Unknown command): hard

those say that xboard received those messages from your program. < means from first, > means to first. So your program did send those messages to xboard, whether you intended to or not is another issue...
mathmoi
Posts: 290
Joined: Mon Mar 13, 2006 5:23 pm
Location: Québec
Full name: Mathieu Pagé

Re: Problem with xboard

Post by mathmoi »

Sven Schüle wrote:You sent "feature name=1" but later on "Error (Unknown command): name", was this intended?
Hi sven, yes and no. I intended to accept "name" commands but had not added the code to do it yet. I now handle it correctly.
User avatar
Bill Rogers
Posts: 3562
Joined: Thu Mar 09, 2006 3:54 am
Location: San Jose, California

Re: Problem with xboard

Post by Bill Rogers »

Mathmoi
This may sound funny but if you are playing regular chess there is no first move e5.
Maybe it was just a bad example and if so then I'm sorry for the comments.
Bill
User avatar
hgm
Posts: 28395
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Problem with xboard

Post by hgm »

bob wrote:
mathmoi wrote:I'm sorry, but I think you misread the log. I'm _not_ sending accepted (or anything else Winboard is not expecting). Actually it's my engine that is not understanding the "accepted" commands sent to him by Winboard. So until I code that part of the protocol it's sending "Error (Unknown command): accepted".

But thanks for the reply anyway.
what I am looking at is this:

745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first :Error (Unknown command): accepted
745 <first Error (Unknown command): random
745 <first Error (Unknown command): hard

those say that xboard received those messages from your program. < means from first, > means to first. So your program did send those messages to xboard, whether you intended to or not is another issue...
This is standard WinBoard protocol. The engine is supposed to send it for any command it cannot understand. In protocol version 1 (that did not have the features command yet) it was the only way WinBoard could know about what the engine supported: just send the command, and test if it evokes an Error response. If it gets one, it can use the work-around for the command.

I am still using that mechanism even in protocol 2, for the features that were not in the original protocol definition. If an engine does not explicitly state that it does not understand the 'nps' command by sending 'feature nps=0' at startup, WinBoard sends the command if the user has requested to run the engine in this mode. From the Error response it can check if it worke, and warn the user about it, or take appropriate action by itself.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Problem with xboard

Post by Sven »

Hi Bill,

his engine played black in this example, and the opponent sent "usermove e3" (with "san" feature enabled) as its first move, so his engine's reply "move e5" seems to be a correct answer for me.

Sven
mathmoi
Posts: 290
Joined: Mon Mar 13, 2006 5:23 pm
Location: Québec
Full name: Mathieu Pagé

Re: Problem with xboard

Post by mathmoi »

Bill Rogers wrote:Mathmoi
This may sound funny but if you are playing regular chess there is no first move e5.
Maybe it was just a bad example and if so then I'm sorry for the comments.
Bill
Hi Bill,

In this example, my engine was playing black. If you look closely you will see that it received "usermove e3" just before.