Xboard engine and ICS selection menu

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

Moderators: hgm, Andres Valverde

Xboard engine and ICS selection menu

Postby Josh Pettus » 16 Feb 2010, 16:51

Hi Mr. Muller, I was wondering if you have given any more thought to your idea for selecting engines and ICS from within an xboard menu. I guess all one really need do is create an option in the xboard config file to list First/Second Engines and ICS, as we do the winboard .ini, and then with the menu, have xboard automatically relaunch with the selected settings upon hitting OK. Personally, I think this would be extremely useful for xboard. What do you guys think?
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard engine and ICS selection menu

Postby H.G.Muller » 16 Feb 2010, 19:19

Well, it would also b useful to select them from a menu within WinBoard. So I stared working on that already, in a side branch of the development version not stored on-line, by making the startup dialog accessible at any time through the main menu. I just added an item 'New Engine' to the file menu, and that way I did not have to make new menu dialogs. :)

I encountered the following problems: the startup dialog does not only to select engines, but also ICS, or zippy mode. In fact, by selecting a new engine line from the combobox, the new engine name can be accompanied by any other set of WB command-line options. This was done because you almost certainly will need to specify a new engine directory, but also if the engine is UCI, if it has an own book, if it should get time odds, etc. This is normally all stored on the engine line in the first/secondProgramNames. But you could bury any option there, including those that switch on ICS play, or zippy mode. You could do that even when I would take out or disable the ICS radio-button in the startup dialog.

The only thing I want to allow, really, is to change one engine for another, or to no engine. So if you are connected to an ICS you should be able to go from zippy mode to plain ICS mode, or from game-viewer mode to engine mode, and vice versa. It should not be able to alter the ICS connection status.

Changing the engine requires a part of the initialization to be redone. So I must first split out the various initialization routines into a part done for the engines (which needs to be redone) and a part for other things (such as ICS), which should not be redone. I already started working on that. Best would be to make the engine-related part into a general engine-only initialiation routine, that would be able to handle each engine. (So that settings for the second engine will not be changed just because you loaded another first engine.)

Once all this groundwork will be finished, I want there to be a single option -programNames that would contan a list of engines to be used both for the first and the second engine combo-box. It is a bit ridiculous that these are different; the onl reason for this peculiar design seems to be that the second engine needed /sd=..., where the first needs /fd=... But s should not be that difficult to do such replacement automatically before you process the line.

When all that works in WinBoard, I would be ready to also make a dialog callable by an XBoard menu File -> New Engine, that would present you the same combo-boxes as are now in the WinBoard startup dialog. And both in WB and XB I would then want to add a few buttons and checkboxes to that menu that allow you to delete engines from the combo-box list (removing them from the /programNames string, and thus from the ini file), or add the one you typed to that menu. Perhas there should also be Up and Down buttons to move the selected one around. I guess to do away with the combo boxes, and make the dialog similar to what the Options -> Game List dialog we have now, with the difference that you should be ae to add lines yourself.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard engine and ICS selection menu

Postby Josh Pettus » 16 Feb 2010, 21:39

That sounds more complicated then what I had in mind, but I certainly can see the benefits! :mrgreen: Good luck! I have a couple of questions.

First could the proposed -programNames command at least store the location of engines and if they are UCI, like we do in Winboard? Because xboard doesn't store this information anywhere. I know you intend for Xboard and it's files to be handled by the OS such as /usr/games folder (Doesn't work on mac btw, I think it just looks for applications to be in the /usr/bin/ folder) and be launched via command-line. But for mac purposes, given the user-base, it is nice to launch xboard via the GUI. As such, It would be nicer to be able to configure engine location somewhere in the config file so we don't have to install them in the hidden folders, but in plain site such as an engines folder next to Xboard. Which is why a winboard type setup would be nice, or at least only those two arguments. Because as you say, other commands would get in the way on an ICS.

Second how will Xboard users be able to select an ICS? Will that be a separate menu option or are we going to keep with launching it via commandline? Seeing as there a few settings and commands one has to enter to launch it, I'd say preconfigured in a config file and being able to select it later would be very nice.

As far as mac users are concerned, I think it would be a good policy to build a user-base if we made it so a user could, potentially if configured right, never have to type a command in a terminal to launch xboard, which at this point given those two items, I think we can do. :D
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard engine and ICS selection menu

Postby H.G.Muller » 16 Feb 2010, 23:15

The conventional solution in WinBoard for the ICS selection is to start WB from a shortcut. (Where the shortcut can be on the desk top or in the start menu.) I am sure the Mac must have something similar to shortcuts? I hate the principle of a startup dialog, and would like to eliminate it from WinBoard. So I am certainly not going to create one for XBoard...

Perhaps the ICS part and the engine part of the startup dialog should be separated, and each be made available at any time as a separate menu item, where the ICS selection item is only active if WB was started with the option -ics. I guess there is no harm to allow switching of ICS once you are in ICS mode.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard engine and ICS selection menu

Postby Josh Pettus » 16 Feb 2010, 23:46

Yes the separate menu option was what I meant, no need for a start-up dialogue. Macs don't have shortcuts instead they have aliases which have it's advantages and disadvantages. It's advantages is that it wont break if the object it is linked too is moved. It does this by assigning a variable and searching for the variable. However it isn't a command-line link and there is no way you can use it to add commands to the object. :( The mac answer for advanced users would be to create a bash script but that would still be command line... Could there be a menu option to trigger ICS mode, or better yet if one is selected, automatically go to it? You could add "none" to the list for non ics play like you propose -ncp for the engine menu.

I wonder, when you log out of an ICS, winboard/xboard closes. How should that be handled?

[Edit] I stand corrected you can save the bash script as a file.command and it will launch via clicking on it. The things you learn! :D
I created this little bash script for instance:

#!/bin/bash
echo "Logging in to FICS"
/Applications/Xboard/xboard -ics -icshost freechess.org -icsport 5000 -icshelper=/Applications/Xboard/timeseal -evalGraphUp false -engineOutputUp false -saveSettingsOnExit false
exit 0

Oddly enough, it wont run do to permissions. I tried changing them to all to read/write but it still wouldn't work. :?
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard engine and ICS selection menu

Postby H.G.Muller » 17 Feb 2010, 13:44

you would have to change it to all execute (chmod 755). Writing does not help, and is not needed to execute a script.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard engine and ICS selection menu

Postby Josh Pettus » 17 Feb 2010, 14:14

Good call! :D I will certainly add a few of these to my install package!
Lol, writing wouldn't but I was indeed quite flabbergasted. ;)

Now, in the future, I will be able to create a bash script to launch xboard into -ics mode whenever that time comes.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 19 guests