Connecting a Java Chess Engine and Winboard?

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Connecting a Java Chess Engine and Winboard?

Postby zteve » 25 Oct 2009, 15:45

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
zteve
 
Posts: 10
Joined: 09 Oct 2009, 16:28

Re: Connecting a Java Chess Engine and Winboard?

Postby Ron Murawski » 25 Oct 2009, 21:53

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
User avatar
Ron Murawski
 
Posts: 352
Joined: 26 Sep 2004, 21:50
Location: Schenectady, NY, USA

Re: Connecting a Java Chess Engine and Winboard?

Postby Roger Brown » 25 Oct 2009, 23:31

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.
Roger Brown
 
Posts: 346
Joined: 24 Sep 2004, 12:31

Re: Connecting a Java Chess Engine and Winboard?

Postby zteve » 26 Oct 2009, 02:18

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 :)
zteve
 
Posts: 10
Joined: 09 Oct 2009, 16:28

Re: Connecting a Java Chess Engine and Winboard?

Postby Roger Brown » 26 Oct 2009, 13:38

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.
Roger Brown
 
Posts: 346
Joined: 24 Sep 2004, 12:31

Re: Connecting a Java Chess Engine and Winboard?

Postby Rohan Padhye » 14 Nov 2009, 15:05

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.
My attempt at a Java chess engine: Frittle (Winboard compatible)
Rohan Padhye
 
Posts: 26
Joined: 27 Apr 2009, 16:46
Location: Mumbai, India


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 28 guests