WinBoard 4.4.3 released

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: WinBoard 4.4.3 released

Post by michiguel »

muxecoid wrote:There were many ambitious free like in freedom chess GUIs in development, most of them never reached maturity. Knights was very promising but it died in late alpha stage. Eboard is mature but it is limited on features. xboard is rich on features but you need to fight the counter-intuitive GUI to use even the basic features. xboard is extremely lightweight, but 15 years old hardware limitations are no longer relevant today.

Looks like commercial Shredder GUI is the only cross platform interface that just works. Java eats some memory but it is neglectible on modern computers.
Shredder does not support Xboard engines.

Miguel
muxecoid
Posts: 150
Joined: Sat Jan 30, 2010 10:54 am
Location: Israel

Re: WinBoard 4.4.3 released

Post by muxecoid »

I looked at the xboard code a little. I'm amazed by the effort to achieve great generality to support multiple variants. GenPseudoLegal() is 450 lines of code, 90% of which is not related to standard chess.

If you know that board height is equal to board width and both are equal to 8 and all playable pieces are on board (I love crazyhouse!) it is probably easier to make your board look great in any resolution.

Preprocessor trick inside backend.c are worthy of some special obfuscation award:

Code: Select all

ChessSquare  FIDEArray[2][BOARD_FILES] = {
    { WhiteRook, WhiteKnight, WhiteBishop, WhiteQueen,
	WhiteKing, WhiteBishop, WhiteKnight, WhiteRook },
    { BlackRook, BlackKnight, BlackBishop, BlackQueen,
	BlackKing, BlackBishop, BlackKnight, BlackRook }
};
....
....
....
#if (BOARD_FILES>=10)
ChessSquare CapablancaArray[2][BOARD_FILES] = {
    { WhiteRook, WhiteKnight, WhiteAngel, WhiteBishop, WhiteQueen, 
        WhiteKing, WhiteBishop, WhiteMarshall, WhiteKnight, WhiteRook },
    { BlackRook, BlackKnight, BlackAngel, BlackBishop, BlackQueen, 
        BlackKing, BlackBishop, BlackMarshall, BlackKnight, BlackRook }
};
....
....
....
#else // !(BOARD_FILES>=10)
#define XiangqiPosition FIDEArray
#define CapablancaArray FIDEArray
With HGM's modifications xboard supports 30 chess variants, and engines for variants :), and variant play on server(!). If you want with reasonable effort you can add your own variant with 3-way castle. :)

The original code was written with different functional requirements so long ago... I'm not experienced in developing but supporting Chinese chess and standard chess in the same program with the same code looks a bit extreme.:)
User avatar
hgm
Posts: 28418
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard 4.4.3 released

Post by hgm »

On the contrary. From the POV of a GUI these are nearly the same games. It has great advantages to support them in the same GUI. You focus on the code that is involved with the actual game rules, and of course there each variant adds a substantial contribution, despite the fact that there is a lot of overlap between the variants. You point it out yourself: with only 10 times as much code I can support 30 times as many variants.

But that variant-specific code makes up less than 10% of the total XBoard code. Most of the code is totally variant-independent. Adding an Evaluation Graph, ICS Seek Graph, variation-tree viewing, ICS Chat Boxes, stepping through the PV... As soon as I add it, it works for all 30 variants. For no extra effort I then also have a Chinese-Chess GUI that supports all these features. By adding a few rules in the move generator, and a few extra piece bitmaps, I can play Chinese Chess against an engine, on an ICS, have the engine play Chinese Chess on the ICS... Or Gothic Chess, or Makruk... And all that for an initial investment of less than 1% of the total code.