A few questions...

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

A few questions...

Postby EdCollins » 01 Jul 2011, 04:53

A few questions, most of them probably simple.

In WinBoard.ini there is this line:

/adapterCommand='polyglot -noini -ec "%fcp" -ed "%fd"'

What is that, exactly? ec is almost certainly "engine command" and ed is almost certainly "engine directory," but what is the noini switch for?


A long time ago, probably after reading

"There should be a different INI file for each engine."

in the polglot readme.txt help file, I went ahead and set up polyglot ini files for each of my engines. And since then I've always invoked my UCI engines in WinBoard with this type of command, in the winboard.ini file:

"Polyglot ../_PG/komodo203.ini" /firstLogo="../../Engines/Komodo/komodo-203-64-ja.bmp"

(Note: The two periods, and not one, before the "/_PG", is correct for me. I created a new _PG folder one level up from my WinBoard folder and that's where all of my polyglot ini files are.)


This method of invoking the engines has always served me well.

However, after having problems with an engine, and wanted to try something different, I wanted to invoke it without an ini file at all. So I then, maybe for the first time, tried this method:

"Komodo-203-64-ja.exe" /firstLogo="../../Engines/Komodo/komodo-203-64-ja.bmp" /fd="../../Engines/Komodo" -fUCI


That worked fine too... but although the engine loaded fine, no opening book was loaded.

But I EXPECTED a book to be loaded, since in my winboard.ini file I do have these two lines:

/usePolyglotBook=true
/polyglotBook="d:\Chess\Books\Book.bin"

So... my next question... isn't that what those two lines in winboard.ini are for? To load a polyglot book for the UCI engines if no other book is specified elsewhere? If yes, any idea why the book.bin file didn't load for me? (The path and book.bin file are definitely valid.)



And is there any difference, or any advantage or disadvantage at all, in the above two different methods of invoking the UCI engines?



Finally, after loading an engine without an ini file as mentioned above, and then clicking on ENGINE and then ENGINE #1 SETTINGS, I can't seem to save these parameters in an ini file. Saving isn't working for me, no matter what I try.

The default path and potential filename originally look like this:

.\_PG\Komodo64_2.03_64_JA.ini

and to make that default path work I went ahead and re-created the _PG folder from my WinBoard folder, as I think I remember it being originally. (For whatever reason at the time, I didn't like it or want _PG in my winboard folder so I recreated it elsewhere. I don't think I realized the implications of changing it at the time.)

However, after clicking SAVE, no ini file is saved. And if I do try to change the path, to something else, anything else, no ini file is saved then either. Even if I create a blank text file first, and then navigate and point to that file specifically, no file is saved.

I can't for the life of me get WinBoard to save an ini file from this window at all. Any idea why?

This is all with WinBoard 4.5.2.

Below is my winboard.debug file. All I did was load Komodo, try to invoke a SAVE with the default filename, and then change it to C:\Komodo.ini, and then also clicked on SAVE, and then exited. But no ini file was saved, anywhere.

Code: Select all
recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
WinBoard 4.5.2 + komodo-203-64-ja
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
TC string = ':120'
mps=0 tc=120000 inc=0
TC string = ':120'
mps=0 tc=120000 inc=0
StartChildProcess (dir=".") polyglot -noini -ec "komodo-203-64-ja.exe" -ed "../../Engines/Komodo"
nice engine proc to 5
645 >first : xboard
protover 2
663 <first : PolyGlot 1.4.66b by Fabien Letouzey.
665 <first : feature done=0
665 >first : accepted done
666 <first : feature analyze=1
666 >first : accepted analyze
666 <first : feature colors=0
666 >first : accepted colors
666 <first : feature draw=1
666 >first : accepted draw
666 <first : feature ics=1
666 >first : accepted ics
666 <first : feature myname="Komodo64 2.03 JA"
667 >first : accepted myname
667 <first : feature name=1
667 >first : accepted name
667 <first : feature pause=0
667 >first : accepted pause
667 <first : feature ping=1
667 >first : accepted ping
667 <first : feature playother=1
667 >first : accepted playother
667 <first : feature sigint=1
667 >first : accepted sigint
668 <first : feature reuse=1
668 >first : accepted reuse
668 <first : feature san=0
668 >first : accepted san
668 <first : feature setboard=1
668 >first : accepted setboard
668 <first : feature sigint=0
668 >first : accepted sigint
668 <first : feature sigterm=0
668 >first : accepted sigterm
668 <first : feature time=1
668 >first : accepted time
669 <first : feature usermove=1
669 >first : accepted usermove
669 <first : feature nps=1
669 >first : accepted nps
669 <first : feature memory=1
669 >first : accepted memory
669 <first : feature smp=0
669 >first : accepted smp
669 <first : feature egt=""
669 >first : accepted egt
669 <first : feature variants="normal"
670 >first : accepted variants
670 <first : feature option="OwnBook -check 1"
670 >first : accepted option
670 <first : feature option="MultiPV -spin 1 1 99"
670 >first : accepted option
670 <first : feature option="Book File -file komodo.bin"
670 >first : accepted option
670 <first : feature option="use lmr -check 1"
670 >first : accepted option
671 <first : feature option="null move pruning -check 1"
671 >first : accepted option
671 <first : feature option="deterministic -check 0"
671 >first : accepted option
671 <first : feature option="Best Line -check 1"
671 >first : accepted option
671 <first : feature option="Red depth threshold -spin 10 0 100"
671 >first : accepted option
672 <first : feature option="King Safety Aggressiveness -spin 6 0 10"
672 >first : accepted option
672 <first : feature option="move overhead milliseconds -spin 20 0 30000"
672 >first : accepted option
672 <first : feature option="drawscore -spin -5 -50 50"
672 >first : accepted option
672 <first : feature option="Polyglot SettingsFile -file .\_PG\Komodo64_2.03_JA.ini"
673 >first : accepted option
673 <first : feature option="Polyglot Log -check 0"
673 >first : accepted option
673 <first : feature option="Polyglot LogFile -file polyglot.log"
673 >first : accepted option
673 <first : feature option="Polyglot Resign -check 0"
673 >first : accepted option
673 <first : feature option="Polyglot ResignMoves -spin 3 0 10000"
674 >first : accepted option
674 <first : feature option="Polyglot ResignScore -spin 600 0 10000"
674 >first : accepted option
674 <first : feature option="Polyglot Book -check 0"
674 >first : accepted option
674 <first : feature option="Polyglot BookFile -file book.bin"
674 >first : accepted option
675 <first : feature option="Polyglot BookRandom -check 1"
675 >first : accepted option
675 <first : feature option="Polyglot BookDepth -spin 256 0 256"
675 >first : accepted option
675 <first : feature option="Polyglot STFudge -spin 20 0 1000"
675 >first : accepted option
675 <first : feature option="Polyglot SyncStop -check 0"
676 >first : accepted option
676 <first : feature option="Polyglot Save -save"
676 >first : accepted option
676 <first : feature done=1
676 >first : accepted done
689 >first : memory 132
689 >first : new
random
689 >first : ics -
689 >first : level 0 2 0
689 >first : post
689 >first : hard
689 >first : easy
689 >first : ping 1
813 <first : pong 1
[x] OwnBook                                 MultiPV [    +/-]
           Book File [______________________________________]
[x] null move pruning          [x] use lmr                   
[x] deterministic             
[x] Best Line                   Red depth threshold [    +/-]
move overhead millis [    +/-] King Safety Aggressi [    +/-]
                                          drawscore [    +/-]
Polyglot SettingsFil [______________________________________]
[x] Polyglot Log               
    Polyglot LogFile [______________________________________]
[x] Polyglot Resign            Polyglot ResignMoves [    +/-]
                               Polyglot ResignScore [    +/-]
[x] Polyglot Book             
   Polyglot BookFile [______________________________________]
[x] Polyglot BookRandom          Polyglot BookDepth [    +/-]
                                   Polyglot STFudge [    +/-]
[x] Polyglot SyncStop         
                               [              Polyglot Save ]
26865 >first : option Polyglot SettingsFile=c:\komodo.ini
GameEnds(28, xboard exit, 2)
29642 >first : result * {xboard exit}
29642 >first : force
29642 >first : ping 2
29642 >first : quit



I think I'm missing something simple, but after two days of experimenting, I'm ready to ask for help.
EdCollins
 
Posts: 71
Joined: 16 May 2010, 09:05
Location: Southern California

Re: A few questions...

Postby H.G.Muller » 01 Jul 2011, 10:25

The newer Polyglots have a -noini ini option, telling them to not read any ini file at startup. (Without this option, if you don't specify an ini file on the Polyglot command line, it would try to read from polyglot.ini, the default ini file). In thie -noini case it is mandatory to specify the -ec and -ed commands on the Polyglot command line, for otherwise Polyglot would not know what to do. (Well, I guess you could do without -ed, as Polyglot would likely search the engine in its own folder then. But there is no such thing as a 'default UCI engine'.) This is equivalent to running Polyglot with the minimum ini file, only specifying engine name and directory in the [polyglot] section. (Note that all options that can be specified in a polyglot.ini file actually do have compile-time defaults, but for things like engine name these are empty strings, which would be fatal. For most other options, the defaults are acceptable.)

The /adapterCommand is the command WinBoard will use to start up the engine (in stead of what was given in /fcp) when the /fUCI option is used. But there are some 'meta-symbols' that can be used in it, all starting with a % sign. E.g. %fcp means the value of the /fcp option, %fd the value of the /fd option. So the command shown would pass engine name and folder to Polyglot.

Now the Polyglots that implement persistence (through the Save button in the Polyglot section of the Engine Settings dialog) do use an ini file for this, even if no ini file was given on their command line. (They must, of course; there is no way to save anything permanently but a file.) In the -noini case, they construct a file name from the engine name given in the -ec parameter (which must always be present). This default ini file will be in the folder .\_PG, e.g. ".\_PG\Fruit_2.1.ini". This should be listed in the Polyglot SettingsFile field of the Engine Settings dialog. Next time you start Polyglot with the option -noini and the same engine, it will try to read that file, thus recovering the saved options, and providing persistence.

Now I suspect that the failure to save is due to the folder ./_PG not existing. I don't think there currently is an option to let Polyglot use another folder for its persistence ini files. If there was (say 'IniFolder'), you could solve the problem by adding to the /adapterCommand " -pg IniFolder=..\_PG", to make sure Polyglot would make its ini files in the _PG folder where you have it. Maybe we should add this, if it doesn't exist yet. Without it, there seems no alternative as to create the _PG folder where Polyglot expects it. When you would alter the SettingsFile to ..\_PG\... before pressing Save, it would save, all right, but it would still not know where to look for the ini file next time you start, because the changed SettingsFile name would have been saved in a settings file that it does not know how to find.

As to the book:

The Polyglot Book field in WinBoard's Common Engine dialog has evolved from being a Polyglot thing to be passed to Polyglot (as it was in Winboard_x), to a setting of WinBoard's own GUI book only. So it is no longer passed to Polyglot. The same holds for the "Has own book" options there. But for the GUI book to work on an engine, you would have to also untick the corresponding "Has own book" option, in addition to ticking "Use Polyglot Book". (Or you would have to install the engine with the /fisrtXBook option, which does the unticking for you.) By moving the book function to WinBoard, also WinBoard engines can use the Polyglot book.

If you want Polyglot to use a book (for instance because you want two engines to use different books), you should specify that book in the Engine Settings dialog, Polyglot section, and tick "Book" there. You could set up things so that Polyglot would automatically use the book specified in the Common Engine dialog (although I cannot conceive of a reason for wanting this) by adding to the /adapterCommand string: " -pg BookFile=%polyglotBook -pg Book=%usePolyglotBook". You get the idea: writing "-pg SOMETHING" on the Polyglot command line in -noini mode will do the same thing as writing "SOMETHING" in the [polyglot] section of the ini file in old-fashioned mode, where the "SOMETHING" could draw on the value of any WinBoard option by using "%OPTIONNAME" in it. (Leading "first" or "f" in the OPTIONNAME will automatically be replaced by "second" or "s" when Polyglot is invoked on behalf of the second engine.)

I hope this clarifies enough to allow you to solve your problems.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: A few questions...

Postby EdCollins » 01 Jul 2011, 14:11

As always, thanks!
EdCollins
 
Posts: 71
Joined: 16 May 2010, 09:05
Location: Southern California

Re: A few questions...

Postby EdCollins » 02 Jul 2011, 05:56

Ah HA! I figured it out.

Recall I said I couldn't get WinBoard to save an ini file, from the Engine #1 Settings window, no matter what I tried, even after re-creating the _PG folder, from the WinBoard folder, where Polyglot expects the ini file to be. (Clicking SAVE wasn't saving the file anywhere, at all. It was a mystery.)

After spending more time on this than I care to admit, I finally figured it out; version 4.5.2 is broken. (Well, at least it is for me.)

I downloaded 4.5.2a and that version works fine. I click SAVE and an ini file is saved, just like it should be.

Also, fyi... the hgmaster-20110529 version, the other WinBoard executable that I often use and test and play with, also works fine. SAVE does indeed save a file.

If you still have a copy of version 4.5.2 around, you should be able to test this, to confirm, but of course now it's all irrelevant. But if anyone else ever has this problem, we'll now know why and the easy fix for it... just download 4.5.2a!
EdCollins
 
Posts: 71
Joined: 16 May 2010, 09:05
Location: Southern California

Re: A few questions...

Postby H.G.Muller » 02 Jul 2011, 09:05

Oops yes, that is right. I had forgotten all about that. Now that you reminded me; it is in fact the only difference between 4.5.2 and 4.5.2a. The relaseof 4.5.2a became necessary because of this bug, which was due to me having forgotten to remove some code temporarily put in for disabling certain functions, to see which one was responsible for crashing when the Engine Settings dialog popped up. :(

I guess I did not advertize that enough. Sorry about the inconvenience.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: A few questions...

Postby K Inuen » 02 Jul 2011, 21:24

But where can this Winboard 4.5.2a be downloaded from?
K Inuen
 
Posts: 50
Joined: 27 Apr 2010, 02:25

Re: A few questions...

Postby H.G.Muller » 02 Jul 2011, 21:36

It is the version currently hosted in the download section of this forum. This bug in 4.5.2 became apparent just a few days after we released it, and then I immediately replaced the binary in the installer by a corrected version, at the same link.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: A few questions...

Postby mocha1961 » 02 Jul 2011, 23:30

H.G.Muller wrote:It is the version currently hosted in the download section of this forum. This bug in 4.5.2 became apparent just a few days after we released it, and then I immediately replaced the binary in the installer by a corrected version, at the same link.


i can't find the 4.5.2a either. i did go to the download section but maybe i'm just missing the section?
mocha1961
 
Posts: 12
Joined: 08 Jan 2010, 00:31

Re: A few questions...

Postby EdCollins » 03 Jul 2011, 00:53

Here's the link:

http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=51528

My WinBoard 4.5.2 file date is 4/25/11 and the date of 4.5.2a is 4/29/11 so yes, this update was released just a couple of days afterwards.

Since I usually like to use and test the latest version, I must have missed it.
Last edited by EdCollins on 03 Jul 2011, 00:56, edited 1 time in total.
EdCollins
 
Posts: 71
Joined: 16 May 2010, 09:05
Location: Southern California

Re: A few questions...

Postby EdCollins » 03 Jul 2011, 00:56

Note: Maybe you missed it because, now that I look, I don't see the "a" mentioned. The above link just lists the file as 4.5.2.

However, after you download and install it, you can confirm you have version a by clicking on HELP and then ABOUT WINBOARD.
EdCollins
 
Posts: 71
Joined: 16 May 2010, 09:05
Location: Southern California

Re: A few questions...

Postby K Inuen » 03 Jul 2011, 15:13

H.G.Muller wrote:It is the version currently hosted in the download section of this forum. This bug in 4.5.2 became apparent just a few days after we released it, and then I immediately replaced the binary in the installer by a corrected version, at the same link.

Thanks H.G.Muller.
K Inuen
 
Posts: 50
Joined: 27 Apr 2010, 02:25


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 9 guests