How to install Java engines

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

How to install Java engines

Postby Gábor Szots » 14 Feb 2014, 19:28

I couldn't find via a search how to install java engines under WB. It seems batch files are not accepted when installing, only exe's.
Gábor Szőts

CCRL testing group
User avatar
Gábor Szots
 
Posts: 327
Joined: 26 Sep 2004, 21:26
Location: Szentendre, Hungary

Re: How to install Java engines

Postby Roger Brown » 15 Feb 2014, 03:01

Hello Gabor,

What happens when you do this? As below...

Later.

"java Pyotr" /sd="C:\Program Files\Engines\Pyotr" ; /name="Pyotr Amateur Edition 0.6"
"java -jar Eden_003.jar" /sd="C:\Program Files\Engines\EdenUCI\Java" /xreuse2 ; /name="Eden_003.jar"
"java -jar kingsout.jar" /sd="C:\Program Files\Engines\kingsout" /xreuse2 ; /name="kingsout.jar"
"java -jar talvmenni.jar" /sd="C:\Program Files\Engines\Talvmenni" /xreuse2 ; /name="Talvmenni.jar"
Roger Brown
 
Posts: 346
Joined: 24 Sep 2004, 12:31

Re: How to install Java engines

Postby Gábor Szots » 15 Feb 2014, 09:16

Roger Brown wrote:Hello Gabor,

What happens when you do this? As below...

Later.

"java Pyotr" /sd="C:\Program Files\Engines\Pyotr" ; /name="Pyotr Amateur Edition 0.6"
"java -jar Eden_003.jar" /sd="C:\Program Files\Engines\EdenUCI\Java" /xreuse2 ; /name="Eden_003.jar"
"java -jar kingsout.jar" /sd="C:\Program Files\Engines\kingsout" /xreuse2 ; /name="kingsout.jar"
"java -jar talvmenni.jar" /sd="C:\Program Files\Engines\Talvmenni" /xreuse2 ; /name="Talvmenni.jar"


Hi Roger,

I forgot I could edit the WB ini file manually.

I have included this line:
"Mediocre 0.5" -fcp "java -Xmx512M -jar Mediocre_0.5.jar" -fd "C:\Sakk\UCI-engines\Mediocre" -fn "Mediocre 0.5" -fNoOwnBookUCI -fUCI
And it works! Only I have to know the syntax, e.g. "-fUCI" for a UCI engine, but that can be copied from another UCI engine line in the ini file.

Thank you for the help.

Best wishes,
Gábor
Gábor Szőts

CCRL testing group
User avatar
Gábor Szots
 
Posts: 327
Joined: 26 Sep 2004, 21:26
Location: Szentendre, Hungary

Re: How to install Java engines

Postby H.G.Muller » 15 Feb 2014, 11:06

There is no need to edit the ini file for this. You should realize that for Java engines "java" is really the executable file you must run, and that this executable uses the .jar file as data to tell it what to do (namely play Chess). You can compare this to old WB engines that take orders for what to do on their command line, such as "Pos --io-mode xboard". Here the engine command would be "jave -jar JARFILE".

To install an engine with such a command through the Load Engine dialog you have to enter the first word of the command (which the OS will interpret as the name of the exe file) in the .exe text entry, and all other words (the arguments that will be passed to the program) in the "command-line parameters" text entry. For example:

Engine (*.exe): Pos
Command-line parameters: --io-mode xboard

Engine (*.exe): java
Command-line parameters: -jar JARFILE

The current WinBoard development version automates this, btw. There you can simply browse to a .jar file for the Engine text-edit

Engine (*.exe or *.jar): JARFILE
Command-line parameters:

When WinBoard sees you gave a .jar file as engine, it simply prefixes it with "java -jar " (and suffixes it with any other Command-line parameters you might have given, as usual) to create the engine line.

Arguments like /fUCI are not part of the engine command, but instructions to WinBoard. You can enter those in the Special WinBoard options text entry, and they would be appended to the engine line after the /fd option (which also is an instruction to WinBoard for where to go before issuing the engine command). Of course for the more common ones, like /fUCI, there is a checkbox to add them.

In other words, when you enter in the Load Engine dialog:

Engine (*.exe): xxx/yyy
Command-line parameters: zzz1 zzz2
Special WinBoard options: /www1 www2 /www3

it would create the engine line

"yyy zzz1 zzz2" /fd="xxx" /www1 www2 /www3

in the engine list. For /www equal to /fUCI, /firstXBook, /firstProtocolVersion 1 or /variant=vvv there are checkboxes, so you won't have to type them.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: How to install Java engines

Postby Gábor Szots » 15 Feb 2014, 11:28

Thank you for the explanation, HG.
Gábor Szőts

CCRL testing group
User avatar
Gábor Szots
 
Posts: 327
Joined: 26 Sep 2004, 21:26
Location: Szentendre, Hungary


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 8 guests