Anticrux UCI Javascript Engine

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
hgm
Posts: 23629
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Anticrux UCI Javascript Engine

Post by hgm » Thu Aug 10, 2017 6:27 am

Edmund wrote:
hgm wrote:
Edmund wrote:Any idea how I can communicate to Winboard/Polyglot that the engine is in fact capable of suicide chess?
Polyglot does not support Suicide Chess (or in fact any variant); it pedantically enforces the rules of normal Chess. You would heve to use UCI2WB.
Thank you very much, hgm!
As I have never dealt with installing variant engines before, I am now standing in front of the same problem than before.

I managed to get Anticrux to run under the uci2wb shipped with the latest winboard ("UCI2WB 1.10").
This is the dialog I get:

Code: Select all

C:\Program Files (x86)\Winboard\WinBoard>UCI2WB "jsuci_1_2.exe anticrux-master\a
nticrux-engine.js" "..\jsuci 1.2"
xboard
protover 2
feature variants="normal,xiangqi" setboard=1 usermove=1 debug=1 ping=1 reuse=0 e
xclude=1 pause=1 done=0
feature option="UCI2WB debug output -check 0"
feature myname="AntiCrux 0.3.0 (UCI2WB)"
feature option="UCI_Chess960 -check 0"
feature option="UCI_Variant -combo suicide"
feature option="level -spin 5 1 20"
feature option="debug -check 0"
feature smp=1 memory=0 done=1
new
variant suicide
usermove e2e4
go
ping 1
pong 1
go
move e7e6
If I try to run /variant suicide in Winboard, it again reports that the variant is not known to the engine. Can you recommend how to inject the additional variants feature (preferably without having to compile the code myself) or tell winboard to ignore the variant feature received.
Ah. That is actually not the latest UCI2WB. The UCI_Variant option is a recent invention, which was introduced after the release of WinBoard 4.8.0, which is probably what you have been using.

More recently I released a WinBoard 4.9 beta version that is configured to use UCI2WB 2.3 by default for all UCI engines. It can be found at http://hgm.nubati.net/WinBoard-AA.zip .

Edmund
Posts: 668
Joined: Mon Dec 03, 2007 2:01 pm
Location: Barcelona, Spain
Contact:

Re: Anticrux UCI Javascript Engine

Post by Edmund » Sun Aug 13, 2017 2:36 am

hgm wrote:Ah. That is actually not the latest UCI2WB. The UCI_Variant option is a recent invention, which was introduced after the release of WinBoard 4.8.0, which is probably what you have been using.

More recently I released a WinBoard 4.9 beta version that is configured to use UCI2WB 2.3 by default for all UCI engines. It can be found at http://hgm.nubati.net/WinBoard-AA.zip .
Thank you very much for that work! Indeed, now UCI2WB recognizes the variant.
Now I am stuck receiving the command setoption. For debug purposes I let the engine echo every command with a "" in advance and run UCI2WB in debug mode. Apparently the engine is not receiving the consecutive ucinewgame/isready command.

Other than that, checking the Anticrux javascript code, it is only reacting to ucinewgame commands issued after a first isready/readyok sequence; but that seems incorrect; for me I disabled that additional check in the source code.

It seems to me getting the engine run would be getting more cumbersome than I originally expected.
Maybe at some point the author of Anticrux could confirm whether he managed to pass the code through UCI2WB.

Code: Select all

C:\Program Files (x86)\Winboard\WinBoard>UCI2WB debug "jsuci_1_2.exe anticrux-ma
ster\anticrux-engine.js" "..\jsuci 1.2"
xboard
# 'xboard' think=0 pause=0 log=0 sent=0
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 si
gint=0 sigterm=0 done=0
feature option="UCI2WB debug output -check 1"
# uci
# engine said: \uci
# engine said: id name AntiCrux 0.3.0
feature myname="AntiCrux 0.3.0 (UCI2WB)"
# engine said: id author https://github.com/ecrucru/anticrux/
# engine said: option name UCI_Chess960 type check default false
# engine said: option name UCI_Variant type combo default suicide var suicide
# engine said: option name level type spin default 5 min 1 max 20
feature option="level -spin 5 1 20"
# engine said: option name debug type check default false
feature option="debug -check 0"
# engine said: uciok
feature oocastle=0
feature variants="suicide,normal,fischerandom"
feature smp=1 memory=0 done=1
# engine said: copyprotection ok
variant suicide
# 'variant' think=0 pause=0 log=0 sent=0
# setoption name UCI_Variant value suicide
ucinewgame
isready
# engine said: \setoption name UCI_Variant value suicide

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

Re: Anticrux UCI Javascript Engine

Post by hgm » Sun Aug 13, 2017 6:39 pm

Well, hanging on reception of 'ucinewgame' (or not responding to 'isready') is an obvious UCI non-compliancy.

Post Reply