Polyglot 1.4.50b

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Re: Polyglot 1.4.50b

Postby Trahald » 19 Sep 2009, 17:53

Hello Michel, Just wanted to let you know that I believe this line of Polyglot is trimming whitespace somewhat too aggressively. For instance Rybka 3 by default contains a folder with 4 files. Rybka 3.exe, Rybka 3 Human.exe, Rybka 3 Dynamic.exe and Rybka 3 960.exe. Setting the EngineCommand polyglot option to any of those last 3 engines with or without quotes, I get the standard Rybka 3 engine loading.

According to the manpage.txt file, enclosing the engine name in quotes should stop this behaviour, but it doesn't seem to be effective in this case. The polyglot38.exe included with the Winboard 4.4.0 package doesn't have this problem, 1.4.46b does contain the same problem though.

Regards
Russell Murray
Trahald
 
Posts: 6
Joined: 04 Mar 2009, 08:14

Re: Polyglot 1.4.50b

Postby Michel » 19 Sep 2009, 18:43

Ok thanks for mentioning this.

I rewrote the rather hacky original ini parser in 1.4.39b (to make the code more maintainable) which explains why 1.4.38 does not suffer from this problem. Obviously there is still a bug. I will look into it.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot 1.4.50b

Postby Michel » 19 Sep 2009, 19:30

Ok I managed to reproduce this but the issue is not in the ini parser but rather in the way PG starts up the engine. As a consequence
polyglot38.3exe also has the same behaviour.

Apparently if you launch CreateProces with command

Rybka 3 Human.exe

and there is also a Rybka 3.exe then Rybka 3.exe is taken. Very weird.

The proper way to have an EngineCommand with spaces in it is

EngineCommand=""Rybka 3 Human.exe""

The outer quotes are stripped by PG since they only serve to protect special characters such as ;# and "(!). The inner quotes are correctly sent to CreateProcess.

Now Linux is another matter... But Linux people generally avoid filenames with spaces...
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot 1.4.50b

Postby Michel » 19 Sep 2009, 22:55

Ok I see what you mean.

PG 1.4.38 works as expected with single quotes whereas 1.4.50b needs double quotes.

I introduced the possibility of quoting values to be compatible with Fonzy's Polyglot.
Values of UCI options can contain ; and # characters (like ; in NalimovPath). So Fonzy
made it possible to quote values. In between such quotes ; and # lose their special status.

Now for EngineCommand this apparently has an unexpected dangerous consequence
on Windows (running the wrong engine when using single quotes instead of receiving an
error message).

So I will disable this quoting mechanism for EngineCommand. This means one will
not be able to use # and ; in EngineCommand. This is probably a very rare occurence anyway.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot 1.4.50b

Postby Trahald » 20 Sep 2009, 01:55

Thank you for investigating this so promptly. You are right, using 2 sets of double quotes does work as expected.

Previously I had only tried using single quotes outside the double without success.

Edit - 1.4.38 also works with double quotes. I'm not sure if there is a preferred option, but I tend to use double quotes almost exclusively.
Trahald
 
Posts: 6
Joined: 04 Mar 2009, 08:14

Previous

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 16 guests