xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XBoard-devel] Latest developments


From: h.g. muller
Subject: [XBoard-devel] Latest developments
Date: Thu, 29 Nov 2012 14:24:22 +0200

I have been experimenting a bit during my holiday with a WinBoard patch
to create opening books (in Polyglot format) from PGN files. This roughly
encompasses two features:

1) An item 'Create opening book' was added in the File menu;
    clicking it would go through all games in the current Game List,
    and add all positions in it (up to the 'Book depth' specified in the
    Common Engine dialog) to an internal hash table, counting W/D/L
    statistics for the moves from those positions.
      After that it would flush the hash table to the file specified as
    GUI book (also in the Common Engine dialog). The hash table
    would not be cleared, so you could repeat the process with another
    game file, to extend the book.

2) I implemented a new move-selection algorithm in the book-probing
   routine ('MC mode'). This is a kind of learning implementation; after
   each game (when the result gets known) it adds the game to the
   internal hash table, just like it does when converting a PGN file to
   book. But when probing book, it selects the move that is most
   'under-played' w.r.t. the results obtained with it. (So that good moves
   will be played a lot, and poor moves only infrequently.) If the playing
   frequency is about right, a book miss will be reported, so that the
   move selection is left to the engine (in the hope it will come up with
   a new ove, not yet listed).
     This probing mode can be used to build up a book from scratch;
   results are never saved to book directly, but the PGN record of a
   match or tournament played with this probing mode can be converted
   to book any time later.

These features are basically back-end; the only front-end support they
need is a menu item 'Create book', and a checkbox 'MC probing',
which will be easy to make in both XBoard and WinBoard.

Another deveopment is that a new release occurred in a fork of WinBoard,
called WinBoard zeta. This is a derivative (of an earlier version?) of
Winboard_x. It comes bundled with external 'Engine Manager' and
'Tournament Manager', performing the functions of the Load Engine
and Match Options of the latest XBoard. But what makes it of interest
is that it is patched to allow use of external piece bitmaps (something
that was only supported by XBoard, but not WinBoard, which was
dependent for external pieces on true-type piece fonts). It also has
the possibility to surround the board with a 'rim' bitmap, about half
a square wide, which some people seem to value a lot.

WinBoard zeta comes bundled with a respectably large variety of
piece-image sets (one 12-piece set for each of the 18 board sizes,
as is needed for (unscalable) bitmaps), and a handful of bitmap designs
that can be used as board rim. The bitmaps are all full color, and often
nicely anti-aliased. The patch to use external bitmaps, rather than the
built-ins stored in the Windows 'resource', is quite trivial. But of course
quite worthless without the availability of high-quality piece images.
As the latter problem seems to be solved now, it seems very worthwile
to include this patch in the main line, so that the WinBoard zeta bitmaps
can also be used there.

WinBoard zeta allows selection of the board-rims, piece bitmaps and
square textures interactively, through a hierarchical menu (Options ->
Design -> Textures / Pieces / Background -> ...). It also introduces
the concept of 'Themes', which seem to be combinations of settings
for textures, pieces and background, as well as for new options
determining the look of dialogs, and are selectable from a combobox.
(I could not get this to work, so far). The Themes seem to be defines
in a quite large set of ini files (with .thm extension).

Unfortunately the author (Alex Guerrero) is so far rather unresponsive
to requests for source code. From experience gathered during previous
dealings with him it seems unlikely he would ever be willing to transfer
copyright of his code to FSF anyway. It is also expressly forbidden to
redistribute his bitmap files.

Using the piece images was a trivial patch; I just activated the XBoard
option -bitmapDirectory (which will become -pieceImageDirectory when
I merge this with the latest master) for use in XBoard. I also wrote a
patch to draw a half-square-wide rim around the board from the
WinBoard-zeta bitmaps, but this is not entirely satisfactory, as the
bitmaps need to be scaled with board size (only a single 600x600
bitmap is provided for each boundary style), and without the WinBoard-
zeta source code it was not obvious what scaling method should be
used for this.

As for the themes, I did not really like the WinBoard zeta implementation.
The new options for specifying external piece bitmaps and board rim
needed new menu controls, and in fact WinBoard so far was lacking
such control for the existing board-texture and font-based piece rendering
options as well. So I created a new dialog (View -> Themes...), in analogy
to the Engine -> Load Engine... dialogs: the right-hand part of the dialog
contains controls for the various board-texture / piece-image / board-rim
options, plus a 'Theme name' field. When you specify the options and OK
without supplying a theme name (which by default is left empty), it just
controls the options as expected. But if you did supply a theme name,
the current combination of settings is added to a list of themes, which
is displayed in a listbox in the left-hand part of the dialog. As an alternative
to setting the individual options, you can simply double-click one of the
pre-defined themes to recall all the settings for that theme.

Currently the settings stored with a theme are piece font or bitmapDirectory,
piece-font scaling and mapping (char to piece), square texture bitmaps,
board-rim bitmap, piece and square colors, highlight colors, as well as
the various switching options that determine if these bitmaps are to be used.
Only relevant options are stored with the theme. (E.g. if textures are on, it
stores texture bitmaps, but not square colors.) The themes are stored in the
winboard.ini file, in a new multi-line option -themeNames, similar to
-firstChessProgramNames. In fact the entire code for handling the themes
is cloned from the code for handling engines. So far this is a WinBoard-only
feature, although porting to XBoard (which in fact already did have controls
for some of the settings in menu dialogs, while other features (such as
font-based rendering) simply do not exist there, and thus also don't need
any controls) should not be too difficult.

I am now in the process of sorting things out, and orderly committing them
to git, so I can push them.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]