Hello,
quick question, re: comms, Winboard to engine:
I understand:
1 start Winboard
2 Winboard starts engine exec
3 Winboard sends "xboard\n" to engine
4 Winboard sends "protover 2\n" to engine
In the docs I read that the engine must respond to the "xboard" command with "\n".
Question: does the engine send this response immediately upon receiving the "xboard" command, or does it wait to receive the "protover 2" command, then send the "\n" followed by the features ?
Thanks, matt
Winboard Protover 2 - QQ
Moderators: hgm, Rebel, chrisw
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Winboard Protover 2 - QQ
You must be misreading something. sending "\n" to xboard does absolutely nothing. It is a required terminator for each thing you do send it of course... When you receive the "protover 2" string, you should start sending "feature" commands to tell it what parts of the protocol version 2 you are willing to use (xx=1) and which parts you do not want to deal with (xx=0).Matt Thomas wrote:Hello,
quick question, re: comms, Winboard to engine:
I understand:
1 start Winboard
2 Winboard starts engine exec
3 Winboard sends "xboard\n" to engine
4 Winboard sends "protover 2\n" to engine
In the docs I read that the engine must respond to the "xboard" command with "\n".
Question: does the engine send this response immediately upon receiving the "xboard" command, or does it wait to receive the "protover 2" command, then send the "\n" followed by the features ?
Thanks, matt
-
- Posts: 718
- Joined: Fri Mar 20, 2009 8:59 pm
Re: Winboard Protover 2 - QQ
You don't have to send anything in response to the xboard command.Matt Thomas wrote:Hello,
quick question, re: comms, Winboard to engine:
I understand:
1 start Winboard
2 Winboard starts engine exec
3 Winboard sends "xboard\n" to engine
4 Winboard sends "protover 2\n" to engine
In the docs I read that the engine must respond to the "xboard" command with "\n".
Question: does the engine send this response immediately upon receiving the "xboard" command, or does it wait to receive the "protover 2" command, then send the "\n" followed by the features ?
Thanks, matt
This may sound dumb, but better safe than sorry... You know \n is the newline code and not literally a backslash and n, right?
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: Winboard Protover 2 - QQ
Not quite correct, though.MattieShoes wrote:You don't have to send anything in response to the xboard command.Matt Thomas wrote:Hello,
quick question, re: comms, Winboard to engine:
I understand:
1 start Winboard
2 Winboard starts engine exec
3 Winboard sends "xboard\n" to engine
4 Winboard sends "protover 2\n" to engine
In the docs I read that the engine must respond to the "xboard" command with "\n".
Question: does the engine send this response immediately upon receiving the "xboard" command, or does it wait to receive the "protover 2" command, then send the "\n" followed by the features ?
Thanks, matt
This may sound dumb, but better safe than sorry... You know \n is the newline code and not literally a backslash and n, right?
Taken from Tim Mann's original engine interface description which is identical to H.G. Muller's document regarding this part:
So the protocol document requires a "\n" as reaction to "xboard" from those engines who use a prompt (mainly in "console mode") to ask for user input.xboard
This command will be sent once immediately after your engine process is started. You can use it to put your engine into "xboard mode" if that is needed. If your engine prints a prompt to ask for user input, you must turn off the prompt and output a newline when the "xboard" command comes in.
Sven
-
- Posts: 3245
- Joined: Thu Mar 09, 2006 9:10 am
Re: Winboard Protover 2 - QQ
ChessGUI does not expect this weird "\n" after "xboard", and would ignore it (if sent).Sven Schüle wrote:So the protocol document requires a "\n" as reaction to "xboard" from those engines who use a prompt (mainly in "console mode") to ask for user input.xboard
This command will be sent once immediately after your engine process is started. You can use it to put your engine into "xboard mode" if that is needed. If your engine prints a prompt to ask for user input, you must turn off the prompt and output a newline when the "xboard" command comes in.
Sven
Matthias.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
http://www.chess.hylogic.de
-
- Posts: 27811
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Winboard Protover 2 - QQ
The mentioned '\n' is a kludge, to make WB forget an earlier prompt you printed. Suppose you printed "your move: " as a prompt. If, in response to "protover 2" you would now send "feature ..." immediately, WB would read a line "your move: feature ...". It would not recognize that as a feature command (nor as a move command). If you send the '\n' first, WB would read two lines, "your move: \n" and "feature ...". It would not recognize (and thus ignore) the first line, and then correctly recogniz the feature command.Sven Schüle wrote: Not quite correct, though.
Taken from Tim Mann's original engine interface description which is identical to H.G. Muller's document regarding this part:So the protocol document requires a "\n" as reaction to "xboard" from those engines who use a prompt (mainly in "console mode") to ask for user input.xboard
This command will be sent once immediately after your engine process is started. You can use it to put your engine into "xboard mode" if that is needed. If your engine prints a prompt to ask for user input, you must turn off the prompt and output a newline when the "xboard" command comes in.
Re: Winboard Protover 2 - QQ
Yes, thanks.MattieShoes wrote:You don't have to send anything in response to the xboard command.Matt Thomas wrote:Hello,
quick question, re: comms, Winboard to engine:
I understand:
1 start Winboard
2 Winboard starts engine exec
3 Winboard sends "xboard\n" to engine
4 Winboard sends "protover 2\n" to engine
In the docs I read that the engine must respond to the "xboard" command with "\n".
Question: does the engine send this response immediately upon receiving the "xboard" command, or does it wait to receive the "protover 2" command, then send the "\n" followed by the features ?
Thanks, matt
This may sound dumb, but better safe than sorry... You know \n is the newline code and not literally a backslash and n, right?
Re: Winboard Protover 2 - QQ
I understand the application of the newline now, only used when an engine provides a user prompt in console when started - my engine does not, so I will not need the "\n".bob wrote:You must be misreading something. sending "\n" to xboard does absolutely nothing. It is a required terminator for each thing you do send it of course... When you receive the "protover 2" string, you should start sending "feature" commands to tell it what parts of the protocol version 2 you are willing to use (xx=1) and which parts you do not want to deal with (xx=0).Matt Thomas wrote:Hello,
quick question, re: comms, Winboard to engine:
I understand:
1 start Winboard
2 Winboard starts engine exec
3 Winboard sends "xboard\n" to engine
4 Winboard sends "protover 2\n" to engine
In the docs I read that the engine must respond to the "xboard" command with "\n".
Question: does the engine send this response immediately upon receiving the "xboard" command, or does it wait to receive the "protover 2" command, then send the "\n" followed by the features ?
Thanks, matt
I was reading this from the Tim Mann docs:
xboard
This command will be sent once immediately after your engine process is started. You can use it to put your engine into "xboard mode" if that is needed. If your engine prints a prompt to ask for user input, you must turn off the prompt and output a newline when the "xboard" command comes in.
Thanks Professor Hyatt
-
- Posts: 718
- Joined: Fri Mar 20, 2009 8:59 pm
Re: Winboard Protover 2 - QQ
Doh, I never knew that. my mistake.