Question : How to use a java engine as an uci engine

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Question : How to use a java engine as an uci engine

Post by hgm »

Strange. The way UCI2WB launches an engine isn't really any different from the way XBoard launches an engine.

When you run

uci2wb debug "java -jar /home/andreas/Dokumente/Chess/Engines/Carballo/carballo-1.7.jar" "."

from the command line, and type

protover 2
new

what does it print?
styx
Posts: 338
Joined: Tue Mar 13, 2012 9:59 pm
Location: Germany

Re: Question : How to use a java engine as an uci engine

Post by styx »

Code: Select all

uci2wb debug "java -jar /home/andreas/Dokumente/Chess/Engines/Carballo/carballo-1.7.jar" "."
# engine said: Carballo Chess Engine v1.7 by Alberto Alonso Ruibal
protover 2
# 'protover' think=0 pause=0 log=0 sent=0
feature setboard=1 usermove=1 debug=1 ping=1 name=1 reuse=0 exclude=1 pause=1 sigint=0 sigterm=0 done=0
feature option="UCI2WB debug output -check 1"
# uci
# engine said: id name Carballo Chess Engine v1.7
feature myname="Carballo Chess Engine v1.7 (UCI2WB)"
# engine said: id author Alberto Alonso Ruibal
# engine said: option name Hash type spin default 64 min 16 max 1024
# engine said: option name Ponder type check default true
# engine said: option name OwnBook type check default true
feature option="OwnBook -check 1"
# engine said: option name UCI_Chess960 type check default false
# engine said: option name Evaluator type combo default complete var simplified var complete var experimental
feature option="Evaluator -combo simplified /// complete /// experimental"
# engine said: option name Contempt Factor type spin default 90 min -200 max 200
feature option="Contempt Factor -spin 90 -200 200"
# engine said: option name Elo type spin default 2100 min 500 max 2100
feature option="Elo -spin 2100 500 2100"
# engine said: uciok
feature oocastle=0
feature variants="normal,xiangqi,normal,fischerandom"
feature smp=1 memory=1 done=1
new
# 'new' think=0 pause=0 log=0 sent=0
# isready
# engine said: readyok
# ucinewgame
the problem in xboard with uci2wb seems to be, that it does not accept anything else than the chess engine name between the second pair of "".

When I try using

Code: Select all

"Carballo UCI2WB" -fcp "java -jar /home/andreas/Dokumente/Chess/Engines/Carballo/carballo-1.7.jar" -fd "." -fUCCI


there is an error message right after trying to load:

Image

which roughly translates to "Error: could not load chess engine uci2wb - normal [...] on localhost: [...] "
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Question : How to use a java engine as an uci engine

Post by hgm »

It looks like the quotes that must delimit the engine name are missing in the command that XBoard uses, so that UCI2WB thinks that 'java' is the engine name, and '-jar' is the engine directory. The complaint then probably is because it could not cd to that directory (not surprisingly).

Are you sure that you have configured -uxiAdapter (or -adapterCommand if you use -fUCI) to

{uci2wb -%variant "%fcp" "%fd"}

and not to

{uci2wb -%variant %fcp %fd}

? (You can check that in the settings file ~/.xboardrc .)
styx
Posts: 338
Joined: Tue Mar 13, 2012 9:59 pm
Location: Germany

Re: Question : How to use a java engine as an uci engine

Post by styx »

You were right. That was the problem! It works now (with Carballo and Pulse). Thank you :)

But still: the same problem with CuckooChess. I think it's a problem with the engine itself. Funny thing is, that CuckooChess works in text mode and in its own GUI. Only the UCI mode seems to cause serious problems.