Engine Settings menu (e.g. for UCI options)

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Engine Settings menu (e.g. for UCI options)

Postby H.G.Muller » 14 Jul 2009, 14:36

I still have to add a dialog to WinBoard for setting the UCI options from the menu. (Currently they can only be set through command-line options, in particular /firstOptions="..." and /secondOptions="...", not interactively.) In XBoard this dialog already exists, but it looks really ugly, as I just create controls for each option one above the other as the engine sends them, mixing all types.

If you run Toga with Polyglot, the two of them together produce some 50 options...

Are there any suggestions for how I could present 50+ options in a dialog that is still useful? WinBoard would not have the slightest idea what the options are for, so grouping them according to function would not be possible. It could group them by type (I suppose this has some advantages, as some controls are intrinsically less wide than others, so that they could be layed out as multiple columns). Or I could sort them by name, aphabetically. The latter might not be helpful, as the user might also have no idea how options are called and thus what to look for.

If you run a UCI engine through Polyglot, all options that control Polyglot behavior (and there are a lot of those!) have names that start with "Polyglot ". I guess that at least WinBoard could group these in a separate section of the dialog, so that for UCI engines you would have two sections, very much like in the polyglot.ini file. For WinBoard engines this section would be absent, of course.

I guess button and check options are the narrowest (basically just the size needed to print the option name), spins a little wider (as they need a numeric input field next to the name), combo-boxes still wider (as their control element typically contains a short phrase), and string inputs the widest of all. I guess we could make the width ratio of these elements 1 : 1 : 2 : 2 : 4. We could then have 4 buttons or checks on a row, 2 spins or combos, and one string.

Toga has 7 checks, 19 spins, 2 combos and 2 strings. When grouped per type at 4 units per line that could go into 2 + 10 + 1 + 2 = 15 lines.

Polyglot has 15 checks, 5 spins and 2 strings. That could go into 4 + 3 +2 = 9 lines.

That might be just about doable, in two-columns (left column Polyglot, right column the engine, perhaps moving some engine options in the Polyglot column under a separator.).

Problem of grouping the controls for compactness is that many features are controlled by several controls of a different type, that would thus be separated. E.g. Delta Pruning (check) and Delta Margin (spin) or Verification Search (combo) and Verification Reduction (spin). Retaning the order in which the engine sends them would then give alternating check / spin combinations, which could be fit on a line, but still waste space. (And they might accidentally get on different lines because there was still room to fit a check there, defeating the purpose). The worst spacewise would be alternating checks and strings, e.g. Alternate Piece Values (check) and Piece-Value file (string). This would put only a single check per line.

Buttons seem to virtually never occur, and combos seem rare. Another design could be to have a column of checks on the left, and spins or combos right of it, or a total comlun width of 3 units. This could then also be used for a string input control, the name of the string option going above it, with room for a check on that same line. Checks with option names similar to a spin or string following or preceeding them could be preferentially be placed next to it (if WinBoard could be made smat enough to recognize the similarity), and solitary check options could be placed in the holes this placement would leave, top to bottom.

Any other ideas or suggestions?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine Settings menu (e.g. for UCI options)

Postby Eric Mullins » 14 Jul 2009, 16:12

I need to assimilate this more before offering my opinion. But you said the dialog already exists for xboard. Could you post a screenshot or two (I don't care if it's ugly), to give me clear picture of the data we're dealing with?
Eric Mullins
 
Posts: 47
Joined: 28 Aug 2008, 04:54
Location: Albuquerque, NM

Re: Engine Settings menu (e.g. for UCI options)

Postby H.G.Muller » 14 Jul 2009, 16:49

Unfortunately my webspace is overflowing and I cannot post large graphics files.

But I guess the following program, when run as if it were an engine, should enable you to see the dialog:

Code: Select all
main()
{
  printf("feature option=\"Null Move Pruning -check 1\"\n");
  printf("feature option=\"Null Move Reduction -spin 2 1 3\"\n");
  printf("feature option=\"Use Piece Values -check 0\"\n");
  printf("feature option=\"Piece Value File -string ./values.dat\"\n");
  printf("feature option=\"Style -combo Patzer /// *Club Player /// Grand Master\"\n");
  printf("feature option=\"Clear Hash -button\"\n");
  printf("feature variants=\"normal\" setboard=1 done=1\n");
  fflush(stdout);
  while(getchar() != EOF);
}
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine Settings menu (e.g. for UCI options)

Postby Eric Mullins » 14 Jul 2009, 17:14

H.G.Muller wrote:Unfortunately my webspace is overflowing and I cannot post large graphics files.

But I guess the following program, when run as if it were an engine, should enable you to see the dialog:


None of this seems to be working for me. When I click any of the Engine... settings under options, nothing happens except the popup menu disappears, but no dialog.

Perhaps there's a key to my invocation of xboard that's causing trouble. Here's how I invoke my analysis engine-- like if I double-click a .pgn file.

~/bin/pgn:
Code: Select all
#!/bin/sh
DIR=`dirname $1`
FIL=`echo $1 | sed 's/.*\///g'`
if [ "$DIR" = "." ] ; then
   DIR=`pwd`
fi
FUK=$DIR/$FIL
xboard \
-xmovesound \
-xautoflip \
-highlight \
-xanimate \
-fcp "./polyglot pgn.ini" \
-fd /home/eric/chess \
-size small \
-mode Analysis \
-td -1 \
-lgf $FUK &>/dev/null &
Eric Mullins
 
Posts: 47
Joined: 28 Aug 2008, 04:54
Location: Albuquerque, NM

Re: Engine Settings menu (e.g. for UCI options)

Postby H.G.Muller » 14 Jul 2009, 18:04

Well, it is good that we test this, as in the latest build it seems to be broken!

In XBoard 4.3.16 it is working though, with exactly the program I posted above. (Well, it needs an #include <stdio.h> to compile.) I start xboard with

./xboard -fcp ./dummy

I can click Options -> Engine #1 Settings, and I get the popup. With 4.4.0 it segfaults, though!
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine Settings menu (e.g. for UCI options)

Postby H.G.Muller » 14 Jul 2009, 18:52

OK, there is an obvious bug there, in xoptions.c. I don't understand how it could have ever worked in 4.3.16. There is a Widget variable "box" in SettingsPopUp() that is used to set properties of the widget, and it is never defined. It is used in 2 places, where it should really have been replaced by "last", which does hold a valid Widget.
I will commit the fix.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine Settings menu (e.g. for UCI options)

Postby H.G.Muller » 07 Aug 2009, 13:55

I have hacked together the following now:

http://home.hccnet.nl/h.g.muller/UCI.png

(Unfortunately this forum cannot show it directly, as it is more than 480 pixels high. :twisted: )

I still want to group many options who's name starts with the same word (in this case that would be "Plolyglot") by drawing a group box with that name around them, and leave out the leading word in the option description, but I have not figured out how to make such group boxes yet.

Please note my appeal on CCC to test this on as many UCI engines as possible.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 29 guests