[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue: Registration of UCI engines to play variants

From: Johannes Czech
Subject: Re: Issue: Registration of UCI engines to play variants
Date: Tue, 5 Nov 2019 23:29:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Thank you very much H.G. Muller for your detailed response.

I was now able to resolve the issue using the uci2wb adapter.

The engines Multi-Variant-Stockfish and CrazyAra (C++ Version) was working out of the box.
For the CrazyAra (Python-Version), I needed to create a small shell script (crazyara.sh):

python crazyara.py

Surprisingly, I also needed to repeat the item `crazyhouse` or add an additional different variant as an UCI_Variant option.

print("option name UCI_Variant type combo default crazyhouse var crazyhouse")

print("option name UCI_Variant type combo default crazyhouse var crazyhouse var crazyhouse")

print("option name UCI_Variant type combo default crazyhouse var crazyhouse var giveaway")

The solution is now also documented on:
* https://github.com/QueensGambit/CrazyAra/issues/23

Best regards,
Johannes Czech

On 04.11.19 21:00, address@hidden wrote:
The engines you use are UCI, which means they can only run through a
protocol adapter that translates UCI to XBoard's native pcommunication
protocol (CECP). So things depend on which such adapter(s) you have
installed on your machine, and whether XBoard is configured to use them.

Now by default we configure XBoard to use the Polyglot adapter. Which is
an old and well-tested UCI adapter. BUT...

Polyglot is 'rule-aware', and only supports normal Chess (and its shuffle
sub-variant Chess960). Actually UCI itself officially only supports normal
Chess(960), and has no provisions for other variants. We developed an
extension to UCI for communicating variant support (the UCI_Variants
option), and engines like Fairy-Stockfish and CrazyAra (hopefully) use
that extension. But Polyglot does not (and would object to any game that
does not strictly follow the rules of normal Chess anyway). It just
ignores the fact that the engine it mediates for can do any other thing
than Chess(960), and hides that to the GUI.

To play Crazyhouse you can use UCI2WB instead, a rule-unaware protocol
adapter which can thus handle any variant, and does support the
UCI_Variants option. You would have to configure XBoard to use it in
response to the -fUCI option, though. For this you would have to run
XBoard once with the command

xboard -adapterCommand {uci2wb debug "%fcp" "%fd"}

(assuming uci2wb is installed in a place where the OS can find it, like
/usr/local/bin/). After that the -fUCI option would also work for other
variants the UCI engine claims to play through its UCI_Variants option.

Op Ma, 4 november, 2019 4:29 pm schreef Johannes Czech:
Dear XBoard-Developers,

thank you for awesome work in creating an open-source cross platform chess
variant GUI.

I tried setting up the UCI-chess variant engine
*/Multi-Variant-Stockfish/* (https://github.com/ddugovic/Stockfish)
and the neural network engine /*CrazyAra*/
(https://github.com/QueensGambit/CrazyAra) using the python version in
XBoard to play crazyhouse.

However, I encountered the following error messages for both of them:
/*"Error: Variant crazyhouse not supported by <engine-name>"*/
although both them actually support the variant.

This is the configuration that I chose: *Engine->Edit Engine List...*
"stockfish-x86_64-modern" -fcp
 -fd "/home/queensgambit/Programs/cz_engines/stockfish" -fUCI
"CrazyAra-0.5.1" -fcp "/home/queensgambit/anaconda3/bin/python
crazyara.py" -fd "/home/queensgambit/Desktop/CrazyAra_0.5.1_RiseV2_mobile"
"CrazyAra-0.5.1" -fUCI -variant crazyhouse

After I added
-firstProtocolVersion 1
to the configuration of CrazyAra, I didn't encounter the error, but
CrazyAra exited after the first move.

Did I miss a certain setting or could this be a bug in XBoard?

More details can also be found at:
* https://github.com/QueensGambit/CrazyAra/issues/23

Best regards,
Johannes Czech

reply via email to

[Prev in Thread] Current Thread [Next in Thread]