WB / UCI engines with own GUI for WinBoard?

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

Moderator: Ras

Norbert Raimund Leisner
Posts: 1643
Joined: Tue May 20, 2008 4:57 pm
Location: Augsburg - Germany

WB / UCI engines with own GUI for WinBoard?

Post by Norbert Raimund Leisner »

It would be surely a good idea to specify which of such programs (including their own GUIs) run on WinBoard without problems or not - and tell the result of your investigations then HGM

http://computer-chess.org/doku.php?id=c ... ists:index

select link to "Engine GUI List " contains such an alphabetical index -

but be aware, please: some interfaces are not programmed by their authors

themselves....

Norbert
User avatar
Sylwy
Posts: 4962
Joined: Fri Apr 21, 2006 4:19 pm
Location: IAȘI - the historical capital of MOLDOVA
Full name: Silvian Rucsandescu

Re: Two examples

Post by Sylwy »

Norbert Raimund Leisner wrote:It would be surely a good idea to specify which of such programs (including their own GUIs) run on WinBoard without problems or not - and tell the result of your investigations then HGM

http://computer-chess.org/doku.php?id=c ... ists:index

select link to "Engine GUI List " contains such an alphabetical index -

but be aware, please: some interfaces are not programmed by their authors

themselves....

Norbert

Hello !

A very good idea !

Well , my first example is Sjakk of Mr.Jacob Bors Lindt. This fine engine written in Visual Basic 2010 Express ( the singhle I know in this version ) runs very well in his own great GUI. Trying to run this engine under WinBoard with the .ini command lines:

"Sjakk v1.1.7" /fd="C:\WbEngines\Sjakk"
"Sjakk v1.1.7" /sd="C:\WbEngines\Sjakk"

I received the message:
===============================================
Fatal Error:
Startup failure on 'Sjakk v1.1.7":
The system cannot find the file specified
===============================================

What's wrong here ? Sjakk has a single version exe. No ini file. It's a single author here for both GUI & engine.
Maybe the WinBoard .ini command line is incomplete/wrong ?


Another example is Raffaela of Mr.Gemma Stefano. It's the single engine I know written in pure Assembly. This engine runs well under Winboard with the command line:

"Raffaela" /fd(sd)="C:\WbEngines\Rafffaela"

But his own GUI pop-up at every start. I must minimize it manually.


Both these above engines haven't separate exe for text mode/graphical mode or .ini file for the GUI.

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

Re: Two examples

Post by hgm »

The first question is always how you could run such engines from the command line. If you can run Sjakk in WinBoard mode by typing

Sjakk v1.1.7

after changing directory to

C:\WbEngines\Sjakk

then it is a complete mistery to me why it would produce the error with the WinBoard engine line you quoted. Because that is also all what WinBoard does: change to the mentioned directory, and then issue the command.
User avatar
Sylwy
Posts: 4962
Joined: Fri Apr 21, 2006 4:19 pm
Location: IAȘI - the historical capital of MOLDOVA
Full name: Silvian Rucsandescu

Re: Two examples

Post by Sylwy »

hgm wrote:The first question is always how you could run such engines from the command line. If you can run Sjakk in WinBoard mode by typing

Sjakk v1.1.7

after changing directory to

C:\WbEngines\Sjakk

then it is a complete mistery to me why it would produce the error with the WinBoard engine line you quoted. Because that is also all what WinBoard does: change to the mentioned directory, and then issue the command.

Hello Mr.H.G.Muller !

Well , the error exists ! I solved it by renaming the executable from "Sjakk v1.1.7" to "Sjakk". Now all works OK !
Take a look here:

Image

Why WinBoard cannot open the original named exe is a mistery also for me ! :shock:

Have - you all - a nice weekend !

SilvianR
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Two examples

Post by Sven »

The problem with Sjakk in WinBoard is most likely related to the space in the file name. If WinBoard shall support this then it needs to insert proper quoting before building its internal command line that starts the engine, since otherwise the executable will simply not be found under the "shortened" name.

WinBoard starts the engine with CreateProcess() which usually gets its command line parameter directly from the "firstChessProgram" option. The MS documentation of CreateProcess requires the use of quoted strings to disambiguate command lines containing file names with spaces.

I usually tend to propose avoiding such problems by not using spaces or other "troublemakers" in file names, always, everywhere. But of course the more satisfying way of addressing this is that programs can deal correctly with it. It is not easy, though, to handle all special cases perfectly. And quoting under Windows is a pain [but maybe also under UNIX ...].

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

Re: Two examples

Post by hgm »

Ah yes., thanks for reminding me of this. I had forgotten about the quoting because the only engines with spaces in their names I have are UCI, and there it works automatically, because I configured the Polyglot command with quotes around the -fcp argument.

I think CreateProcess only understand double quotes. So the recommended solution to the original problem is to install Sjakk as

'"Sjakk v1.1.7"' /fd="C:\WbEngines\Sjakk"

So double quotes in the engine command to protect the space, and then single quotes around that in the -fcp argument to protect the double quotes.
User avatar
hgm
Posts: 28426
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Two examples

Post by hgm »

I guess I'd better take account of this in the WinBoard Load Engine dialog, when 'Add to List' is selected. WinBoard cannot add quotes in the CreateProcess line by itself, because the -fcp argument contains both engine executable name, and engine parameters, and WinBoard has no way to know if anything after a space belongs to the exe name or not. But in the Load Engine dialog there are separate fields for the executable and the parameters, so WinBoard can decide about quoting before putting the two together,

I made it so now (in the latest http://hgm.nubati.net/WinBoard-TM.zip ) that WinBoard will automatically put double quotes around exe names that contain spaces and no double quotes. Then it appends any given parameters to get the total engine command. This engine command is then quoted (with single quotes if it contained double quotes, and with double quotes otherwise) when writing it in the /firstChessProgramNames list.

I guess that should capture most cases. Although it would still not manage to install ChessV for playing Bird's Chess, which needs "Bird's Chess" as argument on the engine command line...
User avatar
Sylwy
Posts: 4962
Joined: Fri Apr 21, 2006 4:19 pm
Location: IAȘI - the historical capital of MOLDOVA
Full name: Silvian Rucsandescu

Re: Two examples

Post by Sylwy »

hgm wrote:I guess I'd better take account of this in the WinBoard Load Engine dialog, when 'Add to List' is selected. WinBoard cannot add quotes in the CreateProcess line by itself, because the -fcp argument contains both engine executable name, and engine parameters, and WinBoard has no way to know if anything after a space belongs to the exe name or not. But in the Load Engine dialog there are separate fields for the executable and the parameters, so WinBoard can decide about quoting before putting the two together,

I made it so now (in the latest http://hgm.nubati.net/WinBoard-TM.zip ) that WinBoard will automatically put double quotes around exe names that contain spaces and no double quotes. Then it appends any given parameters to get the total engine command. This engine command is then quoted (with single quotes if it contained double quotes, and with double quotes otherwise) when writing it in the /firstChessProgramNames list.

I guess that should capture most cases. Although it would still not manage to install ChessV for playing Bird's Chess, which needs "Bird's Chess" as argument on the engine command line...

Yes,

this is the problem: the space in the file name.

Thank you Mr. Sven Schüle for stating the problem!
Thank you Mr.H.G.Muller for solving it !

Now , all are OK with the exes containing spaces in their names face to WinBoard GUI. My very dear Sjakk was only an example !

Regards,
SilvianR

NR: BTW - do you know Sjakk 1.1.7 is the strongest chess engine written in BASIC ? And a very good tactician. I have an amazing game vs. Zochova ( a very special and interesting Hungarian chess engine -unfortunately a dead project ).
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Two examples

Post by Sven »

hgm wrote:I guess that should capture most cases. Although it would still not manage to install ChessV for playing Bird's Chess, which needs "Bird's Chess" as argument on the engine command line...
Which is a convincing example for my previous statement:
It is not easy, though, to handle all special cases perfectly.
And as soon as you would have solved even that one, someone comes up with a program named

Code: Select all

that\'s $about|%the%worst `one`
"I"*found?!
(note the newline character) :shock:

Seems I'm starting to love HTML encoding of special characters ...

Sven
User avatar
Sylwy
Posts: 4962
Joined: Fri Apr 21, 2006 4:19 pm
Location: IAȘI - the historical capital of MOLDOVA
Full name: Silvian Rucsandescu

Re: Two examples

Post by Sylwy »

hgm wrote:Ah yes., thanks for reminding me of this. I had forgotten about the quoting because the only engines with spaces in their names I have are UCI....................................
Hello Mr.H.G.Muller !

They are a lot of WinBoard chess engines in this situation.
Sjakk v1.1.7 is just an example.Another one is Capivara LK 0.07s3. And they are also many others.

Regards,
SilvianR