Page 1 of 1

Connecting a Java Chess Engine and Winboard?

PostPosted: 25 Oct 2009, 15:45
by zteve
Firstly i'd like to say hello to you all and i hope you can help me!

For my master project i am programming a java chess engine to play a game of chess. I have done all the rules and have everything in place to start coding the thinking algorithms etc.

My trouble is i want to be able to see what is going rather than using a crude system.out way of displaying the chess pieces. It's very easy to make mistakes inputting the moves manually.
I have found some engines that connect up to the winboard gui but they appear to be .exe. When i finish i will convert my program to a .exe for easier integration.

Right now however i wonder if anyone here has any experience connecting up a jar file to the winboard gui. I do realise there are ways of fdoing it as the team here http://chess.dubmun.com/index.html managed to get theres linked up to the gui.

I'd like to see one in action first before deciding how to handle all the inputs and outpute to and from the engine to the gui. I know that the winboard chess protocol is needed but outside that i am kind of clueless.

Thanks for any help at all

Re: Connecting a Java Chess Engine and Winboard?

PostPosted: 25 Oct 2009, 21:53
by Ron Murawski
Others have already connected their Java engines to Winboard. My advice is to look at the Chess Engine List and search the page for 'Java source' and take a look at all the WB engines.

Chess Engine List
http://computer-chess.org/doku.php?id=c ... ngine_list

Re: Connecting a Java Chess Engine and Winboard?

PostPosted: 25 Oct 2009, 23:31
by Roger Brown
zteve wrote:Firstly i'd like to say hello to you all and i hope you can help me!

For my master project i am programming a java chess engine to play a game of chess. I have done all the rules and have everything in place to start coding the thinking algorithms etc.

My trouble is i want to be able to see what is going rather than using a crude system.out way of displaying the chess pieces. It's very easy to make mistakes inputting the moves manually.
I have found some engines that connect up to the winboard gui but they appear to be .exe. When i finish i will convert my program to a .exe for easier integration.

Right now however i wonder if anyone here has any experience connecting up a jar file to the winboard gui. I do realise there are ways of fdoing it as the team here http://chess.dubmun.com/index.html managed to get theres linked up to the gui.

I'd like to see one in action first before deciding how to handle all the inputs and outpute to and from the engine to the gui. I know that the winboard chess protocol is needed but outside that i am kind of clueless.

Thanks for any help at all



Hello Zteve,

"java -jar Engine Name.jar" /fd="C:\Program Files\Engines\Engine Name\Java" /xreuse ; /name="Engine Name.jar"

Was that what you had in mind?

I hope that I have not just insulted anyone but that was what I think you wanted to know.

Apologies if it is otherwise.

Later.

Re: Connecting a Java Chess Engine and Winboard?

PostPosted: 26 Oct 2009, 02:18
by zteve
Thanks for your replys

Roger is that what you place in a shortcut after the directory location of the winboard.exe? I have seen some short cuts that specify the directory of the java chess engine but i think some time will need to spent getting the engine working with the gui.

I will get it connected tomorrow when i have more time.

thanks again :)

Re: Connecting a Java Chess Engine and Winboard?

PostPosted: 26 Oct 2009, 13:38
by Roger Brown
zteve wrote:Thanks for your replys

Roger is that what you place in a shortcut after the directory location of the winboard.exe? I have seen some short cuts that specify the directory of the java chess engine but i think some time will need to spent getting the engine working with the gui.

I will get it connected tomorrow when i have more time.

thanks again :)



Hello Zteve,

That is a line from my Winboard ini which is located in the same folder as the Winboard gui. Engine name would refer to the name of your engine eg. Javamonster.

Later.

Re: Connecting a Java Chess Engine and Winboard?

PostPosted: 14 Nov 2009, 15:05
by Rohan Padhye
I don't know if this is still an open issue, but in case it is - this is how I link to my Java engine:

Code: Select all
"C:\Winboard\winboard.exe" -cp -fcp "java -jar Frittle.jar" -fd "C:\Frittle" -scp "java -jar Frittle.jar" -sd "C:\Frittle"


It works fine... as long as your Jar knows where to find the Main class and your program read from standard I/O.
Additional note: The Winboard protocol docs say "Beware of using buffered I/O in your chess engine." - However, I've never encountered a problem with java.io.BufferedReader wrapped around System.in - so I suppose you can use the nifty readLine() method to read signals from winboard.