Greetings,
I've resumed work on my goldentree project and have had some success. However a weird issue I'm having now is that after I send the command to setboard, go, and wait for MOVE xyz. It just sits there after I've received the move.
If I do this from an engines command line it tends to send back White() or Black() after the move. Though I suspect when in xboard mode it might be sending something else back, or what does the engine send back in xboard mode to alert the interface that it's ready for the next command?
-Josh
http://olympuschess.com/goldentree/
xboard interface and pipes.
Moderator: Ras
-
- Posts: 1357
- Joined: Wed Mar 08, 2006 9:41 pm
- Location: Morgantown, WV, USA
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
Re: xboard interface and pipes.
Try adding a flush request on the standard output file after each newline.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: xboard interface and pipes.
Nothing. Xboard will send whatever it wants, it is up to the program to handle the stuff. The only exception is the early case of "done=1" the engine has to send after it has initialized and is ready to play.jshriver wrote:Greetings,
I've resumed work on my goldentree project and have had some success. However a weird issue I'm having now is that after I send the command to setboard, go, and wait for MOVE xyz. It just sits there after I've received the move.
If I do this from an engines command line it tends to send back White() or Black() after the move. Though I suspect when in xboard mode it might be sending something else back, or what does the engine send back in xboard mode to alert the interface that it's ready for the next command?
-Josh
http://olympuschess.com/goldentree/
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: xboard interface and pipes.
Or make certain every line sent to xboard ends with a \nsje wrote:Try adding a flush request on the standard output file after each newline.
-
- Posts: 28361
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: xboard interface and pipes.
I don't understand it. Who is "I' here? What are the parentheses after 'White' and 'Black', and why are they capitalized? These are not WinBoard commands...jshriver wrote:It just sits there after I've received the move.
-
- Posts: 1357
- Joined: Wed Mar 08, 2006 9:41 pm
- Location: Morgantown, WV, USA
Re: xboard interface and pipes.
That was it, I wasn't sending a \n at the end.
Also it seems the terminator after a move is move xyz. It doesnt prompt with Black() or White() again.
Muller: White() and Black() are the prompts you get when the engine is done and is ready for the next command. At least from my understanding and from crafty. Though I see your point it's not xboard related. So my topic might be off.
When I said xboard I meant program to engine i/o via pipes. Withought knowing the xboard protocol, I was doing line by line checks based one what I see if I run the engine from the command line.
Appreciate all the help, it's running now. Though this project is getting a lot more complex than I had first thought.
For example for any given board representation, if you want to find the best move given x depth you have to run it several different times with different assumptions.
Like kqKQ casteling so there is 4 possible runs.
En passent, etc.
Also it seems the terminator after a move is move xyz. It doesnt prompt with Black() or White() again.
Muller: White() and Black() are the prompts you get when the engine is done and is ready for the next command. At least from my understanding and from crafty. Though I see your point it's not xboard related. So my topic might be off.
When I said xboard I meant program to engine i/o via pipes. Withought knowing the xboard protocol, I was doing line by line checks based one what I see if I run the engine from the command line.
Appreciate all the help, it's running now. Though this project is getting a lot more complex than I had first thought.
For example for any given board representation, if you want to find the best move given x depth you have to run it several different times with different assumptions.
Like kqKQ casteling so there is 4 possible runs.
En passent, etc.