USI2WB / UCI2WB release

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

liuzy

Re: USI2WB / UCI2WB release

Post by liuzy »

hgm wrote:Well, the Cyclone I had was Deep Cyclone 2.1.1, and when you include "position" there, it ignores the moves completely. It also does not know "startpos". I agree that is non-standard UCI, and it took me actually a lot of trouble to find out that this was the problem...

So you are saying that there are other UCI XQ engines that support a more standard version of UCI, and for which this adapter does not work? If so, which are those, and where can I get them?

What is strange in the moves that go along with the FEN?

It would be easy enough to switch only to the UCI dialect used by Cyclone 2.1.1 on command of a flag argument, like -s now switches to USI. Currently I switch to this dialect as soon at variant xiangqi is selected by WinBoard.
Some engines support standard UCI, such as 3DChess(new version), KOU, GAGA, deepsky and new cyclone, SHIGA...
OK, I admit that it's easy for engine to support nonstandard-UCI. But I don't know how to handle the move list behind the fen string.
Like:
fen rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR r moves b7c7 c9e7 i9i8 i8d8 d9e8 h9i7 d8d2
move b7c7 is ileagal after all.
User avatar
hgm
Posts: 27795
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: USI2WB / UCI2WB release

Post by hgm »

UCI specs wrote:* position [fen <fenstring> | startpos ] moves <move1> .... <movei>

set up the position described in fenstring on the internal board and play the moves on the internal chess board. if the game was played from the start position the string "startpos" will be sent Note: no "new" command is needed. However, if this position is from a different game than the last position sent to the engine, the GUI should have sent a "ucinewgame" inbetween.
Are you saying that the above definition of the position command from the UCI specs is not valid for the 'standard UCI' used by Kou, GAGA etc.? If the Xiangqi 'standard' for UCI is different from the Chess standard, is there any place where this XQ-UCI (UXI?) is described? (Even if it is in Chinese.)

The problem is that it is easy enough to fix when an engine produces non-compliant output: I can see what it prints, and adapt the UCI2WB so that it can handle it. And it can easily be made to recognize various dialects. But it is infinitely more difficult when you have to _guess_ what the engine wants for input, if it does not produce any error messages, and does not react to standard UCI commands! I had to use string-extraction programs on Cyclone 2.1.1 to make a guess at which keywords I had to omit. And if it is for engines where I don't even have the .exe, the guessing becomes even harder...
User avatar
hgm
Posts: 27795
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: USI2WB / UCI2WB release

Post by hgm »

New version available (1.0).

* Now handles spaces in option names correctly. (USI does not allow this, so originally it was not implemented.)
* properly stops ponder search on force command, and analyze search on exit command

same link
Roger Brown
Posts: 782
Joined: Wed Mar 08, 2006 9:22 pm

Re: USI2WB / UCI2WB release

Post by Roger Brown »

hgm wrote:New version available (1.0).

* Now handles spaces in option names correctly. (USI does not allow this, so originally it was not implemented.)
* properly stops ponder search on force command, and analyze search on exit command

same link


Hello H.G.,

I note with interest your development of this adapter. Are you planning to integrate and ship it with Winboard? Or is Polyglot still the standard setter?

Is there a development path with this adapter or are features added as you perceive a user need?

:-)

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

Re: USI2WB / UCI2WB release

Post by hgm »

I will certainly ship it with WinBoard, but for Chess I think Polyglot is still the superior choice as UCI adapter, for several reasons:

* compatibility with existing polyglot.ini files
* possibility to save the engine option settings on such an ini file
* more complete support of WB protocol
* more mature development, and thus likely more reliable

The only reason NOT to use Polyglot is:

* zero variant capability

So you would want to use Polyglot for Chess, but UCI2WB for Shogi and Xiangqi.

UCI2WB now has reached the point where it pretty much does everything I need. So future development will be mainly driven by feature requests from users (currently mainly the Xiangqi community, who use it to run engines like Cyclone, Deep Sky and ggChess under WB), and bug reports.

Note that the WB development version actually allows the user to select which adapter he wants to have automatically invoked on specifying the /fUCI or /sUCI commands. There now is an /adapterCommand option, persistent in the winboard.ini, which by default is set to

/adapterCommand="polyglot.exe -ec %fcp -ed %fd"

so that it calls Polyglot with the engine name and directory specification. But users can configure it to use UCI2WB by changing this to

/adapterCommand="UCI2WB.exe %fcp %fd"

when they also want /fUCI to work for Xiangqi engines, or

/adapterCommand="UCI2WB.exe -s %fcp %fd"

when they are primarily interested in Shogi engines. Of course they do not need to make such changes global, by including these lines in the winboard.ini, but they could use them in a special settings file @xq or @shogi, together with all settings required to get the desired board style (piece font, board bitmap), which they would put on the command line of the shortcut to start WinBoard in this mode.
Roger Brown
Posts: 782
Joined: Wed Mar 08, 2006 9:22 pm

Re: USI2WB / UCI2WB release

Post by Roger Brown »

Thank you for your reply H.G.

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

Re: USI2WB / UCI2WB release

Post by hgm »

Of course you are encouraged to test this UCI2WB with UCI Chess engines. I tested with Glaurung 2.2, and is now seems to work quite well with that. But there are many combinations of parameters I have not tested. (Basically I tested only if I could play classical time controls with ponder on / off, and if anayze mode worked.)

I would be very intersested in any bug reports. To install a UCI engine in the winboard.ini for use with UCI2WB (without making it the default adapter) you would need the line:

"UCI2WB Glaurung.exe C:\engines\Glaurung22"

when UCI2WB is in the same folder as winboard.exe (so no /fd command needed in that case!). To install in PSWBTM, you need:

name: Glaurung 2.2 (UCI2WB)
exe: ..\WinBoard\UCI2WB.exe
parameters: Glaurung.exe C:\engines\Glaurung22

(The exe field you usually fill by browsing to the .exe, but beware that you should click UCI2WB.exe and not Glaurung.exe there!)