Expanding Winboard_x capabilities

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Expanding Winboard_x capabilities

Postby H.G.Muller » 06 Oct 2007, 11:48

I am currently working on building some new features into Winboard_x. These include:

Adjudications

Winboard_x could already adjudicate wins if both engines agreed that the score was above a user-preset level for a certain number of moves, and award a draw to games that were dragging on beyond a given number of moves.

I am adding to this a number of other draw adjudications:
* Insufficient mating material (KK, KBK and KNK).
* Trivial draws (3 moves into KRKR, KNNK, KBKN, KBKB, KNKN).
* 51-moves without capture / Pawn move.
* 4-fold repeat.
They are enabled if variant is "normal", and the user has set an adjudication threshold. (So the can be switched on without adjudicating wins by setting a threshold above mate level.)

I might still add a mate test to this.

Fairy piece support

The second change would allow variants with more than 6 different piece types. Currently I am setting it up for 9 piece types, so that all pieces on the back rank can be of different type. The three new piece types are indicated by H (NigHtrider), A (Archbishop) and M (Marshall), and these piece types can be used in FENs to set up positions.

A new varian, "fairy", is added, which uses the three new pieces on the Queen-side of the opening position. (Back row MHAQKBNR in stead of RNBQKBNR.) In standard H,A,M are displayed the same as N,B,R, respectively. To have them show up differently, you would have to define them through selecting a Chess font, and assign them to characters of this font (with /fontPieceToCharTable). How they show up (and how pieces on the King side show up) is then totally determiined by the user. How they move is of course determined by the engines; Winboard does not assume anything for this. (Legality testing has to be switched off in this mode, or it would not allow any moves with these pieces.)


So far I have not been able to compile Winboard_x; I get tons of linker errors. Seems I am missing a critical library; probably for the graphics interface.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Expanding Winboard_x capabilities

Postby Volker Pittlik » 06 Oct 2007, 12:09

H.G.Muller wrote:I am currently working on building some new features into Winboard_x. ...

So far I have not been able to compile Winboard_x; I get tons of linker errors. Seems I am missing a critical library; probably for the graphics interface.


Very interesting H.G.! Is there any chance of an Linux version too? Even the existing Winboard_x does not compile on Linux.

One idea from my side: I think it would be very good if all the different versions of Winboard would be unified again. Any contact to Tim Mann?

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Expanding Winboard_x capabilities

Postby Ilari Pihlajisto » 06 Oct 2007, 13:43

Volker Pittlik wrote:One idea from my side: I think it would be very good if all the different versions of Winboard would be unified again.


I second that. Xboard needs a good makeover. An upgrade to Gtk2 would be the first step. It should also have the same dialogs that Winboard has, like setting time controls and board size. Right now it's too much of a command line application.
User avatar
Ilari Pihlajisto
 
Posts: 78
Joined: 18 Jul 2005, 06:58

Re: Expanding Winboard_x capabilities

Postby H.G.Muller » 06 Oct 2007, 13:53

No, but I did contact Allessandro. If the changes are successful, they will be incorporated in the Winboard_x version he hosts on his website.

As for Linux: if the current Winboard_x doesn't compile there, it would be a surprise if my modified one did. I only modified 3 of the source files, and one header file, only adding some plain code.

As I said, so far I could not compile Winboard_x either (under Windows / Cygwin / gcc). The individual sources compile to objects (even those I modified :wink: ), with only one error (something to do with mysrand(), that causes a conflicting declaration with an existing one in a library include file). But if I work around that error, it won't link and I get scores of undefined references.

I am not sure what I am missing. I downloaded the Winboard_x sources from Allessando's page, and unzipped it into an empty folder, but it contained no 'make' file. So I am just trying 'gcc -O2 *.c'.

Does anyone here have experience in compiling Winboard_x?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Successes and Progress

Postby H.G.Muller » 12 Oct 2007, 06:50

OK, I finally learned how to compile Winboard_x. It turned out that, apart from the object files obtained from the sources included in the download, one needs an 'wbres.o' that is derived from a wbres.rc (included in the source download from Tim Mann) in a quite different way.

To share my acquired expertise for compiling under W2000 + Cygwin + gcc:
Code: Select all
gcc -I. -I.. -O2 -mwindows -mno-cygwin -c *.c
windres --use-temp-file --include-dir .. windres.rc -O coff -o windres.o
gcc -mwindows -mno-cygwin *.o -lwsock32 -lwinmm -o winboard.exe


It seems the adjudications are all working now, including tests for mate and stalemate.

I also made progress in divorcing the board height from the board width. In the original Winboard (and Winboard_x) these were both controlled by the same variable BOARD_SIZE, forcing a square board. I went through the code to decide everywhere when this constant refers to height or width of the board, and changed it accordingly. This now seems to work (at least for as far as the graphics go): I made the board size user selectable (up to a compile-time determined maximum, which I currently set to 12x12) through the command-line options /boardHeight and /boardWidth (both defaulting to 8). I even included initial positions for a 10x8 (Gothic Chess) and 12x8 (Courier Chess) board.

The Winboard code is rather crummy in this respect, though. :( I found many places that had the board size hard-coded as 8 (or 7), rather than referring to BOARD_SIZE (or BOARD_SIZE-1). It is quite possible that I overlooked some of those in the makeover. I am sure I did in the move generator, but as games needing other board sizes are only expected to work with legality testing switched off anyway, this should not matter.

I made it such that any lateral King move of more than 1 square with a King from its initial position is interpreted as a castling, and leads to the piece on the corresponding board edge of the same rank to be placed on the other side next to the King. (Tord's FRC code has precedence, though, but only works properly on an 8x8 board as it hard-coded the back ranks and corner squares.)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Winboard_F operational!

Postby H.G.Muller » 18 Oct 2007, 12:13

OK, one more thing I learned:

The parser.c file is machine-generated, and impossible for a human to
understand / modify. It is generated by 'flex' from the file parser.l, by the command:

Code: Select all
flex -oparser.c -L parser.l


This file describes the move parser Winboard uses to read both PGN files, and moves from the engines. I had to modify it for allowing more ranks, files and promotion pieces.

With these modifications, I now seem to have a fully operational version ('Winboard_F') that suppots Capablanca Chess, including saving and loading of PGNs.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard_F operational!

Postby Pablo » 18 Oct 2007, 20:12

H.G.Muller wrote:OK, one more thing I learned:

The parser.c file is machine-generated, and impossible for a human to
understand / modify. It is generated by 'flex' from the file parser.l, by the command:

Code: Select all
flex -oparser.c -L parser.l


This file describes the move parser Winboard uses to read both PGN files, and moves from the engines. I had to modify it for allowing more ranks, files and promotion pieces.

With these modifications, I now seem to have a fully operational version ('Winboard_F') that suppots Capablanca Chess, including saving and loading of PGNs.


Hello Harm:
I read at the wbec forum you finally obtain a winboard_F that works OK and is able to play Capablanca chess.
I wonder if you can mail it to me. My adress is indech@ctcinternet.cl.
Thanks in advance with my best regards,
Pablo Urzua
Pablo
 
Posts: 242
Joined: 26 Sep 2004, 21:57
Location: Santiago-Chile


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 8 guests