Polyglot

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

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

Re: Polyglot

Post by hgm »

Kyodai wrote:"The logfile could not be created or opened"
Th default file for the log is Polyglot.log in th WinBoard folder. You must have installed WinBoard in a folder where you have no permission to create new files. You could cure that by also writing in the Vituvius.ini file:

LogFile = ....

with ... some filename in a place that Windows will allow you to access (like 'My Documents').
About Protector and the book.... I changed book to another .bin
and voila - bookmoves coming as fast as you can blink.. :)

Tried with some other .bin and they all worked - though much smaller
than the first I tried. At least that problem solved! Now I go look
for a big book.bin that can be used as default book in WB :wink:
The default_book.bin that comes with the WB install is just a small demo book. There are many 'serious' books around in Polyglot format (e.g. 'performance.bin').
As for wb and polyglot - are there any uci-engines
known not to work well with polyglot?
I am sure there must exist flaky UCI engines, but Polyglot has an incredibly good UCI implementation, and even supports work-arounds for common UCI ailments (like the SyncStop option). I don't know of any major UCI engine that would not work. But I am not really into UCI engines. I only use Fruit (because I package it with WinBoard) and Glaurung (for testing; because it supports MultiPV and SearchMoves, which Fruit doesnt, and because it has many options, posing a challenge to the formatting algorithm of the Engin Settings dialog).
User avatar
Kyodai
Posts: 325
Joined: Wed Apr 25, 2012 3:39 pm

Re: Polyglot

Post by Kyodai »

Tried your suggested way of creating a logfile in my documents
but this failed. No luck so far with Vitruvius

I noticed a fruit.ini in folder _PG. That's where I put the Vitruvius.ini also.
Is it really necessary to make such a .ini file for each UCI engine?
In WB the other UCI engines seem to manage fine without it?!

In WB X7 it was needed to put an engine.ini file in the same directory
as polyglot.exe

The /firstXBook in WB.ini works like a charm!

I also study your "conserving volatile options in your ini file",
from Winboard Forum very carefully. This is excellent stuff! Thanks!
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Polyglot

Post by hgm »

Beware! It is Polyglot that creates the ini files in _PG. You should never do it yourself. In what I wrote before I assumed Polyglot would have created such a file there due to your earlier attempts to load Vitruvius. But the exact name might not be Vitruvius.ini, because Polyglot derives it from the name the engine reports for itself (in the 'id name' response). And I don't know how exactly Vitruvius calls itself; it could use a version number in the 'id name', or whatever. If the name does not correspond to the filename Polyglot would use for this version of Vitruvius, it would also not consult the file when you load Vitruvius, so any settings you would alter in there (like LogFile) would not be seen.

However, since you said that after adding Log = true in the file you got an error message "the log file could not be read or created", it must somehow have seen what you did in the file.

Btw, if the Polyglot log gives problems, you could also try to run Vitruvius through UCI2WB in stead of Polyglot. UCI2WB should be included in the WB install. To do that, you would have to specify (in the Load Engine dialog)

as .exe: UCI2WB

as 'engine parameters: debug Vitruvius.exe ../Vitruvius

(or whatever file and folder you have for Vitruvius). This should produce in the engine list something like:

"UCI2WB" -fcp "UCI2WB debug Vitruvius.exe ../Vitruvius"

(So you would NOT have to tick UCI, as UCI2WB is a WB engine, and WB does not know that it gets its moves from Vitruvius) Because of the 'debug' parameter UCI2WB would send debug info to WB. If you run WB with the Additional option -debug (or press Ctrl+Alt+F12 before Loading Vitruvius), all this debug info would end up in the winboard.debug file. (Which you could then post here.)
Kyodai wrote:I also study your "conserving volatile options in your ini file",
from Winboard Forum very carefully. This is excellent stuff! Thanks!
Note that the standard install of WB already uses this 'two-level' trick, and that the winboard.ini in your WinBoard folder is a master ini file, which redirects the actual saving of settings to the user-dependent file %APPDATA%\winboard.ini (i.e. in your private AppData folder). So if you want to persistently alter the default of a volatile option, you could write it at the end of this master winboard.ini file (after the /settingsFile line, which causes reading of your saved settings). Anything you would write in the master ini file before that line will essentially not be noticed (only on first time use, when you don't have a user ini file yet).
In WB X7 it was needed to put an engine.ini file in the same directory
as polyglot.exe
Well, this was actually never really needed. Polyglot has always been able to use ini files of any name, provided that you told it what that name was. polyglot.ini in the current directory was only the default, which it took if you did not specify anything else. So even in Winboard_x it was perfectly possible to install an engine as

'Fruit 2.1' -fcp "polyglot.exe _PG/fruit.ini"

where polyglot.exe would be in the WinBoard folder (so that you only needed one copy of it, and no need to specify an -fd), and all your ini files would in _PG.

But modern Polyglots ae even smarter. They don't even need an ini file name on heir command line, but just the name of the engine (like polyglot -noini -ec ../Fruit/fruit.exe). They then run Fruit with the specified command, and create a polyglot.ini file for it. Which you can then alter through WinBoard's Engine Settings dialog. (If you press the "Polyglot Save" button there.)
User avatar
Kyodai
Posts: 325
Joined: Wed Apr 25, 2012 3:39 pm

Re: Polyglot

Post by Kyodai »

This is a bit strange - but what is needed for Polyglot to create these
ini files in _PG? I have started Critter and Protector several times but
there is no ini file created in the _PG folder?

I must do something wrong here - but what? Should the folder _PG
be specified someway in winboard.ini?
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Polyglot

Post by hgm »

Well, it might perhaps only happen when you press the button 'Polyglot Save'. I am not that experienced with Polyglot. There is no need to specify _PG anywhere; it is hard-coded into Polyglot as the default folder to create and look for ini files derived from an engine name.

What is specified in the winboard.ini file is that /fUCI should invoke Polyglot, and with which options. The line

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

does this (where %fcp and %fd stand for the current values of the WB /fcp and /fd options).

When you would replace that by

/adapterCommand={UCI2WB.exe %fcp %fd}

(in your user settings file!) WinBoard would not invoke Polyglot in response to ticking the UCI checkbox or mentioning /fUCI, but UCI2WB in stead. But for Chess it is better to use Polyglot, as UCI2WB does not use any ini files, and thus cannot save any configuration changes you would want to make to the engine. (It has the advantage that it can provide debug info through the winboard.debug file, though, rather than needing a separate log file like Polyglot.)
User avatar
Kyodai
Posts: 325
Joined: Wed Apr 25, 2012 3:39 pm

Re: Polyglot

Post by Kyodai »

I found the different engines.ini files, created by polyglot!

They were in AppData\Local\VirtualStore\.....\WinBoard\_PG

Copied these and put them in normal WB directory and _PG

At least it looks better...
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Polyglot

Post by hgm »

Interesting. But does Polyglot still see them, after you moved them? I must admit I have no idea why Polyglot would create these files in such a weird place. On My WinXP it makes the file in WinBoard's install folder (in sub-folder _PG. It says where it makes them in the Engine Settings dialog SettingsFile in the Polyglot group box).
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: Polyglot

Post by gladius »

hgm wrote:Interesting. But does Polyglot still see them, after you moved them? I must admit I have no idea why Polyglot would create these files in such a weird place. On My WinXP it makes the file in WinBoard's install folder (in sub-folder _PG. It says where it makes them in the Engine Settings dialog SettingsFile in the Polyglot group box).
On Vista and higher, programs are not allowed to write to program files directory by default. This is why the files are getting put off into VirtualStore. You can read an article about this here http://www.symantec.com/connect/article ... dows-vista.
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Polyglot

Post by hgm »

Ah, that explains a lot. Some of the earlier problems also suggested that attempts were made to create files in Protected folders.

Where exactly did you install WinBoard? Not in C:\Program Files, I should hope. This is really asking for trouble.
User avatar
Kyodai
Posts: 325
Joined: Wed Apr 25, 2012 3:39 pm

Re: Polyglot

Post by Kyodai »

Yes - I now have the .ini files both in normal WB and in VirtualStore

Yes - all uci engines now working fine (also with book) except Vitruvius

Yes - I'm asking for trouble - so I installed Winboard in C:\Program Files....

Is C: a better place ?

8-)