Bug in xboard 4.4.4; banned for ICC rated play!

Discussion of chess software programming and technical issues.

Moderator: Ras

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

Re: Will re-attempt xboard 4.5.2a

Post by hgm »

sje wrote:
hgm wrote:Well, isn't "gameend" the default value of -zippyGameEnd?
Default or not, it seems to me that any default should have been overridden by:

Code: Select all

        -xrm "*zippyGameEnd: seek 5\nseek 15\n" \
These seeks do show up correctly as far as I can tell.
Oh sorry, I missed that because I was only looking at the start of eah line.

I could not find -xrm amongst the XBoard options, and have no idea what it is supposed to do. Why don't you simply say

-zippyGameEnd "seek 5\nseek 15\n"

?
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Will re-attempt xboard 4.5.2a

Post by sje »

hgm wrote:
sje wrote:
hgm wrote:Well, isn't "gameend" the default value of -zippyGameEnd?
Default or not, it seems to me that any default should have been overridden by:

Code: Select all

        -xrm "*zippyGameEnd: seek 5\nseek 15\n" \
These seeks do show up correctly as far as I can tell.
Oh sorry, I missed that because I was only looking at the start of eah line.

I could not find -xrm amongst the XBoard options, and have no idea what it is supposed to do. Why don't you simply say

-zippyGameEnd "seek 5\nseek 15\n"

?
First, I checked again and the seeks weren't being seen with 4.5.2a. Yet this set-up with xboard 4.4.4 did work without any need for a server side alias.

So that's something that worked with the old, but not with the new.

Where did "-xrm" come from? I don't recall other than I didn't make it up on my own.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Will re-attempt xboard 4.5.2a

Post by hgm »

Well, all option-handling code of XBoard 4.4 has been removed, and replaced by corresponding WinBoard code in 4.5 (so that this is now shared code). So that there could be some subtle difference inoption handling between 4.4 and 4.5 should not come as a total surprise (the persistence of options being the most noticeable effect). I am a bit surprised there is no error response to -xrm, though, as this is definitely not in the list of options I defined. Perhaps it is a general option that means something to the system, and is already removed by it before argv is passed to the option parser.

Anyway, to alter the game-end string, -zippyGameEnd would be the option to do it in 4.5.x.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Will re-attempt xboard 4.5.2a

Post by sje »

Alright, I'm going to have to take another look at this. My preference is to place all the appropriate option information in one place, preferably in the command line call. Having it scattered among the call, a configuration file, menu options, and server-side macros is not the way to go.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Will re-attempt xboard 4.5.2a

Post by hgm »

Well, this should be possible wihout problem. What you specify on the command-line prevails over whatever was in the settings file.

Note that in 4.5 you now have the option to specify an 'indirection file' on the command line as well: when you say

xboard @icsoptions

the contents of the file "icsoptions.ini" will be substituted for it. So you ould collect all optios you need for a certain usage into a file.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Command line arguments for the win

Post by sje »

Being a long time Unix user, I'll stick with the command line option approach. That's consistent with traditional Unix usage for nearly all applications and has also been effectively endorsed by Linux/GNU. Since xboard on my machines is always activated by a batch file, it makes sense to stick all the option settings in that same batch file. The batch file is machine independent and so runs on any X Window Unix-like box. The only thing that needs changed is the FICS/ICC selector.

For Winboard, I have no opinion as I do not use any Microsoft software.

I've got Symbolic connected to FICS via xboard 4.5.2a and will continue to fine tune the option settings. Once this setup runs to my satisfaction, I'll do the same with an ICC connection. When this is done, I'll try both using Ubuntu 11.04. And then I can get back to working on my program.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Command line arguments for the win

Post by hgm »

Wel, running an ICS bot is pretty much a "fire and forget" task, and command-line options are perfect for that. Some people use XBoard for more interactive tasks, however (game-viewer, analyzing games, playing against an engine,watching engine-engine games), and the menus are mainly intended for those. It would be very inconvenient when you are analyzing a game with one engine, and now you want to have the opinion of a second, you would have to restart XBoard, and then set up the position again... Much better to just change engine from the menu, without disturbing the loaded game! Or when you have been playing normal Chess and now feel like a game of Shatranj.

The menus can also be seen as a convenient way to change the startup defaults. Of course you can edit the ~/.xboardrc settings file to change the command-line options listed in those, but it is often much quicker to changewhat you want through the menu, and rely on the presistence of
options to make that new setting permanent.

Finally note that those who dislike persistence can easily switch it off: it iscontrolled by the option -saveSettingsOnExit. Just set that to false once (e.g. from the Options menu), and then use the menu item "Save Settings Now" (also in Options) to make that persistent, or edit it to "false" in the settings file, and you will freeze the default settings to whatever they are.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Newline embedding failure with -zippyGameEnd

Post by sje »

hgm wrote:I could not find -xrm amongst the XBoard options, and have no idea what it is supposed to do. Why don't you simply say

-zippyGameEnd "seek 5\nseek 15\n"
I played with this and similar for a while and no luck because the embedded newlines are never translated into real newlines.

The best I was able to do was a simple:

Code: Select all

-zippyGameEnd "seek 5"
Looking at the source, xboard always supplies a final newline for the option, so the "\n" is not needed and in fact will cause a failure if present.

I think that the "-xrm" option is something specific to X Windows and for some reason no longer works with the latest xboard.

Server side macros aren't too much help as they may expand into a maximum of a single command.

In any case, I now have Symbolic connected to FICS and ICC, both using xboard 4.5.2a. But in both cases, there is only a single seek ad posted at the end of a game.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Newline embedding failure with -zippyGameEnd

Post by hgm »

Oh, the \n might be a Windows thing. Can't you simply write unescaped linefeeds in strings, on Linux? Like

-zippyGameEnd "seek 5
seek 15"


?

I vaguely remember that people did write

-initString "new
random"


on Linux in stead of

-initString "new\nrandom"

like you would do in WinBoard.

I also though that ";" could be used on ICS to put multiple commands on one line, like

-zippyGameEnd "seek 5;seek 15"

It could be that this only works on FICS, though.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Newline embedding failure with -zippyGameEnd

Post by sje »

hgm wrote:Oh, the \n might be a Windows thing. Can't you simply write unescaped linefeeds in strings, on Linux? Like

-zippyGameEnd "seek 5
seek 15"


I vaguely remember that people did write

-initString "new
random"


on Linux in stead of

-initString "new\nrandom"

like you would do in WinBoard.

I also though that ";" could be used on ICS to put multiple commands on one line, like

-zippyGameEnd "seek 5;seek 15"

It could be that this only works on FICS, though.
It would be possible to have an unescaped newline, but it takes a backslash to escape:

Code: Select all

-zippyGameEnd "seek 5 \
        seek 15"
And that's not very pretty, and accidentally typing a a space or tab after the backslash breaks the whole thing.

The zippyGameEnd and similar options should take a sequence of zero or more strings as arguments without having to rely upon any escaped character nonsense.

Also, the command; command idea works neither on FICS nor ICC.