Weird tournament, and couple other things

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

Moderators: hgm, Andres Valverde

Weird tournament, and couple other things

Postby unic » 27 Jan 2013, 05:21

I just ran a Winboard tournament (4.6.2), 3 cycles, 2 games / match, using an opening file with 3 different openings in it, and at times running two Winboards concurrently for the tournament... and the outcome was certainly not what I expected - this is the final cross-table:
Code: Select all
Cross table, sorted by score percentage, Buchholz, SB

                              Nebiyu Sangga Sjaak  Oberon Fairy- Cataly
                              ###### 01010  111111 1111   111111 1111
 1. NebiyuChess_1.43          ######        1111          111111
                              ######                      11111           92%  37.0 (456.0, 405.0)

                              10101  ###### 1=1=   1111   11     11111
 2. Sangga v1.0                      ######
                                     ######                               85%  17.0 (315.5, 221.0)

                              000000 0=0=   ###### =110   111111 011
 3. Sjaak r470                0000          ######        111011
                                            ######        101101          53%  20.5 (609.5, 154.5)

                              0000   0000   =001   ###### 0110   10=
 4. Oberon 0.04                                    ######
                                                   ######                 26%   5.0 (337.5,  50.5)

                              000000 00     000000 1001   ###### 111
 5. Fairy-Max 4.8Rt           000000        000100        ######
                              00000         010010        ######          18%   8.0 (1059.5,  79.0)

                              0000   00000  100    01=    000    ######
 6. Catalyst                                                     ######
                                                                 ######   14%   2.5 (333.5,  28.0)

Here is the .trn-file:
Code: Select all
-participants {Fairy-Max 4.8
Sangga-v1.0 (spartan)
Nebiyu Chess Variants
Sjaak r470
oberonspartan (spartan)
Catalyst (spartan)
}
-seedBase 537434879
-tourneyType 0
-tourneyCycles 3
-defaultMatchGames 2
-syncAfterRound false
-syncAfterCycle true
-saveGameFile "C:\WinBoard-4.6.2\Files\Spartan5s.pgn"
-loadGameFile "C:\WinBoard-4.6.2\Files\spartan openings.pgn"
-loadGameIndex -2
-loadPositionFile ""
-loadPositionIndex -2
-rewindIndex 0
-discourageOwnBooks false
-mps 40
-tc 3:20
-inc -1.00
-results "-+-++-=-+--++++=+--+-+++-++-++-+-+-++-+-++-+--+--+-+-+--+--=-+-+--+++--+---=+--+-+--+++++-"


Hmm, looking at the cross-table, I think I know what happened - the programs that have played many games are the multi-variant ones, i.e. the ones that were installed prior to the tournament. So, the first copy of Winboard, in which I started the tournament, must never have saved its settings (including the engine list) - meaning the second copy was told to play games between programs it didn't know existed... but instead of giving some kind of sensible error message, it just kept scheduling games between the few programs that were known to it. Yup, looking at the engine list in the second copy, the new engines aren't listed. Still, I would really expect it to throw some sensible error message instead of just keeping on running a tournament with unknown players.

I've also noticed two other minor weirdnesses:

When I manually adjudicate a game during a tournament (typically because a program has run out of clock, or has encountered a bug), that game does not get saved to the tournament .pgn-file.

I regularly get the "Changing Time Control during a game is not implemented" in situations where no moves (for new games) / no new moves (for loaded games) have been done on the board, and the clocks have not yet started running. I am not sure by what criteria Winboard deems those games to be in progress... of course, an easy work-around is restart the game and then change time control, but it seems odd that I can't just change it in the first place.
unic
 
Posts: 2
Joined: 22 Dec 2012, 03:13

Re: Weird tournament, and couple other things

Postby H.G.Muller » 27 Jan 2013, 21:11

Indeed, I guess some sanity checks need to be added. The development version now already checks if every participant entered in the tournament dialog is an installed engine, and complains otherwise. But this would not cover the situation of a WinBoard instance with a different install list reading the tournament file, and choking on it. I think currently an engine that cannot be found in the install list is replaced by the default engine, which was not something I intentionally programmed, but happened to be a reproducible form of 'undefined behavior'.

I guess I should actually test for the engine nickname in the participants list has been successfully expanded to a full engine line, and if it isn't, cause an error exit.

The problem of 'out-of-sync' settings file is a more general one, though. With multiple copies of WB running, chances of closing them in an order that erases changes that were made earlier in the ini file by another instance increase. An error exit of the WB instance with the old engine list could very well save that old list, overwriting the already saved new list, losing you all installed engines.

Perhaps XBoard should remember the time when it reads its ini file (I guess it already does this, because it is the time it started), and then, every time it would like to save its own settings, check the modification time of the existing ini file. And if that was later, put up a popup to the user to ask if it should overwrite.

I will have a look at the user-adjudication problem.

The time-control problem typically happens after loading a new engine. This currently always leaves WinBoard in EditGame mode. While changing Time Control is only allowed in the state BeginningOfGame. I guess I could make an effort here to remember the mode WB was in before loading the engine, and trying to restore that. At least for the common cases BeginningOfGame and AnalyzeMode, and perhaps even MachineWhite and MachineBlack. (But a problem is that the latter two modes cannot be started when it is not the engine's turn, and of course no one would change one engine for another when the engine is thinking.)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Weird tournament, and couple other things

Postby H.G.Muller » 28 Jan 2013, 14:34

I will make the occurrence of an un-identified engine nickname in the participants list of the tourney a non-fatal error, that will simply make WinBoard stop playing games and produce an error popup as soon as it tries to play a game for the offending engine. The user can then decide whether he wants to save the settings or not, before he actually quits WinBoard. (It seems a quit is mandatory in any case, to restart with a corrected settings file.)

I could not reproduce the problem with saving of user-adjudicated games in the development version. For me, all games appear nicely in the save file, after using the Action->Adjudicate to white/ to black / draw. If they contain any moves, that is. WinBoard never saves games without moves.

[Edit] I now also managed to preserve the mode on Loading an engine when it was BeginningOfGame or AnalyzeMode. which should be the most important cases. (There seems to be very little reason for changing engine during a game...)
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 7 guests