An FRC compatible xboard (sort of)

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

Re: An FRC compatible xboard (sort of)

Postby Fabien Letouzey » 25 Jul 2005, 08:36

Volker Pittlik wrote:Maybe it should be considered also that X/Winboard already supports FRC on servers (although http://www.tim-mann.org/xboard/engine-intf.html#8 is possibly misleading).


Hi Volker,

We will have a look at that.

Last week it was faster for us to just add separate code, so we've got something useful for us already (which works with UCI engines).

Integrating the new code in the existing WinBoard is going to require more work ...

Fabien.
Fabien Letouzey
 
Posts: 110
Joined: 03 Dec 2004, 10:17
Location: France

Re: An FRC compatible xboard (sort of)

Postby Fabien Letouzey » 25 Jul 2005, 08:43

Hi Bryan,

Bryan Hofmann wrote:I don't know if it is the engine or xboard that is the issue. Above the 1st move was a castleing one. Also while it states above that variant fischerandom is a unknown command it plays fine up until a castling move happens.


WinBoard refused the castling move (KxR). I guess it got confused by the variant, which is probably sent by the server. We don't use variants at all in engine matches. I'm not even sure if we could if we wanted to.

In other words I think that the fischer-random code in WinBoard is activated ONLY when playing on-line.

Also while it states above that variant fischerandom is a unknown command it plays fine up until a castling move happens.


That's PolyGlot not supporting "variant" yet. That version only supports Chess960 anyway.

Fabien.
Fabien Letouzey
 
Posts: 110
Joined: 03 Dec 2004, 10:17
Location: France

Re: An FRC compatible xboard (sort of)

Postby Tord Romstad » 25 Jul 2005, 13:50

Fabien Letouzey wrote:Hi Bryan,

Bryan Hofmann wrote:I don't know if it is the engine or xboard that is the issue. Above the 1st move was a castleing one. Also while it states above that variant fischerandom is a unknown command it plays fine up until a castling move happens.


WinBoard refused the castling move (KxR). I guess it got confused by the variant, which is probably sent by the server. We don't use variants at all in engine matches. I'm not even sure if we could if we wanted to.

In other words I think that the fischer-random code in WinBoard is activated ONLY when playing on-line.

Yes, it is. And the existing fischer-random code in Winboard isn't really useful at all when trying to add support for FRC in offline play. If I recall correctly, the server does all the work of legality checking and updating the board.

I haven't had a chance to look at Anastasios's code yet, but I am fairly sure it is much more robust and complete than the more recent attempt of Fabien and me. If we want to add full FRC support to the official xboard/Winboard distribution, Anastasios's version is probably the better starting point.

I'll try to have a look at this again in the end of this week, or perhaps early next week.

On an entirely unrelated note, I am getting more annoyed every day that all the commonly used names of this game are so silly. "FischeRandom chess" (what kind of word is "FischeRandom"?) and "Chess960" (a board game with a number as part of its name?? Yeah, there is also "Nine Men's Morris" and "Connect Four", but that's not quite the same) both look so ugly that it is painful to type them, and "FullChess" which I have also seen a few times isn't really any better. It's a pity that the nice name "shuffle chess" is already used by a similar, but not quite identical chess variant. When and why did the practise of captalising letters inside a word start? For technical reasons it makes sense for identifiers in source code and (to a lesser extent) for program names, but for company names, names of board games, and the like?

Tord
User avatar
Tord Romstad
 
Posts: 639
Joined: 09 Oct 2004, 12:49
Location: Oslo, Norway

Re: An FRC compatible xboard (sort of)

Postby Volker Pittlik » 25 Jul 2005, 17:44

Tord Romstad wrote:...
... When and why did the practise of captalising letters inside a word start? For technical reasons it makes sense for identifiers in source code and (to a lesser extent) for program names, but for company names, names of board games, and the like?

Tord


This has been in detail discussed in usenet (in de.etc.sprache.deutsch, de.etc.language.german). IIRC the source is in fact programming. Because variables can't contain white spaces and something as "Fischer-Random-Chess" is uncomfortable to type capital letters are used instead.

Because using language related to computers look "modern" and "up-to-date" it has been adapted by advertising experts and this way found its way to the common language.

BTW: I think "FischeRandom" is simply a typo.

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

Re: An FRC compatible xboard (sort of)

Postby Reinhard Scharnagl » 25 Jul 2005, 19:10

Volker wrote:BTW: I think "FischeRandom" is simply a typo.

No, as far as I could investigate this is basing on Bobby Fischer himself. So you will find this even in a book title: Svetozar Gligoric: "Shall We Play Fischerandom Chess?" or within http://www.fischerandom.narod.ru/

Reinhard.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: An FRC compatible xboard (sort of)

Postby milix » 25 Jul 2005, 23:04

I haven't had a chance to look at Anastasios's code yet, but I am fairly sure it is much more robust and complete than the more recent attempt of Fabien and me. If we want to add full FRC support to the official xboard/Winboard distribution, Anastasios's version is probably the better starting point.


Actually I consider my mods as a quick hack. For example, I encode user castle moves as a promotion to a piece 'O' (this is Oh). I found that this needs less work but it may be confusing to other people. Also, the legality test is left to the engine. After Mainz we will all have much more time to do a better work for supporting properly FRC in xboard.
Anastasios Milikas
milix
 
Posts: 54
Joined: 04 Nov 2004, 19:36
Location: Greece

Re: An FRC compatible xboard (sort of)

Postby Tord Romstad » 26 Jul 2005, 08:57

milix wrote:
I haven't had a chance to look at Anastasios's code yet, but I am fairly sure it is much more robust and complete than the more recent attempt of Fabien and me. If we want to add full FRC support to the official xboard/Winboard distribution, Anastasios's version is probably the better starting point.


Actually I consider my mods as a quick hack. For example, I encode user castle moves as a promotion to a piece 'O' (this is Oh). I found that this needs less work but it may be confusing to other people. Also, the legality test is left to the engine.

OK, but just the fact that you feel confident enough that you want to use your hack to run your program in Mainz makes me believe that it is much more complete than the hacks by Fabien and me. :)

After Mainz we will all have much more time to do a better work for supporting properly FRC in xboard.

Yes. Mainz will also be a good opportunity to discuss how to proceed. It's a pity Fabien won't be there.

Tord
User avatar
Tord Romstad
 
Posts: 639
Joined: 09 Oct 2004, 12:49
Location: Oslo, Norway

Re: An FRC compatible xboard (sort of)

Postby Fabien Letouzey » 26 Jul 2005, 08:59

Bryan Hofmann wrote:I don't know much about the rule of Chess960 but wanted to try out a xboard-960,polyglot-960 with Glaurung FRC on FICS. It plays fine until a castling move occurs.


I fixed a couple of bugs in XBoard-960 and adapted PolyGlot-960 to the "fischerandom" variant. I can't guarantee that the combination will work on-line, but it does in local engine matches when adding "-variant fischerandom" to the command line. I haven't tested manual play though, but the user should be able to castle by capturing his own rook. I've sent the updated versions to Tord.

Note that XBoard-960 still does not comply to the xboard protocol because it sends KxR moves (in coordinate notation) rather that the official O-O/O-O-O. However engines may request the SAN feature.

Fabien.
Fabien Letouzey
 
Posts: 110
Joined: 03 Dec 2004, 10:17
Location: France

Re: An FRC compatible xboard (sort of)

Postby Fabien Letouzey » 26 Jul 2005, 09:07

Hi Tord,

Tord Romstad wrote:Yes, it is. And the existing fischer-random code in Winboard isn't really useful at all when trying to add support for FRC in offline play. If I recall correctly, the server does all the work of legality checking and updating the board.


I can confirm this. However the variant is transmitted to the engine and stored in PGN files. This will be useful for a mixed normal-chess/Chess960 version of PolyGlot. For offline play, you have to specify the variant on the command line.

I haven't had a chance to look at Anastasios's code yet, but I am fairly sure it is much more robust and complete than the more recent attempt of Fabien and me. If we want to add full FRC support to the official xboard/Winboard distribution, Anastasios's version is probably the better starting point.


I think this is not true anymore, after my recent changes. I will of course have a serious look at his changes.

Fabien.
Fabien Letouzey
 
Posts: 110
Joined: 03 Dec 2004, 10:17
Location: France

Re: An FRC compatible xboard (sort of)

Postby Tord Romstad » 26 Jul 2005, 11:54

Fabien Letouzey wrote:
Bryan Hofmann wrote:I fixed a couple of bugs in XBoard-960 and adapted PolyGlot-960 to the "fischerandom" variant. I can't guarantee that the combination will work on-line, but it does in local engine matches when adding "-variant fischerandom" to the command line. I haven't tested manual play though, but the user should be able to castle by capturing his own rook. I've sent the updated versions to Tord.

These are now available for download. I added a couple of changes of my own. XBoard-960 now includes two new protocol features (as described in the engine interface protocol specification, see http://www.tim-mann.org/xboard/engine-intf.html). These are:
Code: Select all
fen960 (boolean, default 0, recommended 1)
      If fen960=1, xboard will send the engine FENs in the new format defined in the UCI
      protocol documentation.  For instance, the initial position for normal chess will be
      sent as rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w HAha - 0 1.
oocastle (boolean, default 1)
      If oocastle=1, xboard will send castle moves in the "O-O" format in FischeRandom
      games.  If oocastle=0, castle moves will be sent as "king captures rook", like in UCI.
      This feature has no effect except in FischeRandom chess.

I also added a couple of lines of new code to PolyGlot_960. It now sends
Code: Select all
feature fen960=1
feature oocastle=0

at startup.

Thanks to Fabien's additions and bug fixes, XBoard-960 is now able to read and write PGN files correctly.

Download links:
http://www.math.uio.no/~romstad/xboard-960.tar.bz2
http://www.math.uio.no/~romstad/polyglot_960.tar.gz

Tord
User avatar
Tord Romstad
 
Posts: 639
Joined: 09 Oct 2004, 12:49
Location: Oslo, Norway

Re: An FRC compatible xboard (sort of)

Postby Tord Romstad » 26 Jul 2005, 16:33

Hi all,

I just noticed that there is a Linux version of AICE, and decided to give it a try. It turns out that it works perfectly with the most recent XBoard-960. I was able to play a little test match against Glaurung, without any problems.

In case it is confusing, here are some brief instructions about how to use XBoard-960 and PolyGlot_960 in Mac OS X or Linux. I think a very similar procedure would work in Windows.

First of all, you have to download and compile XBoard-960 from my site. This should be sufficient to run xboard FRC engines (like AICE), or to read and write FRC PGN files. If you want to run UCI FRC engines (like Glaurung), you will also need PolyGlot_960. Finally you will probably want a text file containing all the 960 starting positions in SMK's new FEN format for FRC games. If you don't have such a file, you can download it by clicking here.

In order to play FRC games, you start XBoard-960 with the -fischerandom parameter, and use the -lpi and -lpf parameters to load a position from your text file containing the FRC FENs. For instance, in order to play a 2-game match between AICE and Glaurung from position number 123, type the following:
Code: Select all
xboard-960 -fcp aice -fd /path/to/aice/ -scp polyglot_960 -sd /path/to/glaurung/ -lpf frc-fens.txt -lpi 123 -mg 2

If you want to play a match from multiple positions, the easiest way is to write a script which loops through your frc-fens.txt file and starts XBoard once for each position.

In case there is any interest, I can try to make binary packages for Linux and Mac OS X containing XBoard-960, PolyGlot_960 and frc-fens.txt, simple usage instructions, and a small script file for running engine vs engine matches. If somebody wants to prepare a similar package for Windows, they are of course welcome to do so. I can host all files on my Web page, if necessary.

Tord
User avatar
Tord Romstad
 
Posts: 639
Joined: 09 Oct 2004, 12:49
Location: Oslo, Norway

Re: An FRC compatible xboard (sort of)

Postby Tord Romstad » 26 Jul 2005, 18:49

Tord Romstad wrote:For instance, in order to play a 2-game match between AICE and Glaurung from position number 123, type the following:
Code: Select all
xboard-960 -fcp aice -fd /path/to/aice/ -scp polyglot_960 -sd /path/to/glaurung/ -lpf frc-fens.txt -lpi 123 -mg 2

Sorry, I made a mistake. You should add '-variant fischerandom' to the command line.

Tord
User avatar
Tord Romstad
 
Posts: 639
Joined: 09 Oct 2004, 12:49
Location: Oslo, Norway

Re: An FRC compatible xboard (sort of)

Postby Alessandro Scotti » 26 Jul 2005, 20:00

I've incorporated the changes into my (Windows) version and compiled, but not tested yet in play. However, everything seems ok so far.

Here is also an attempt at generating a random initial position... not sure it follows all the rules but it certainly is fun to see the board shuffled.

Code: Select all
static int FindEmptySquare( Board board, int n )
{
    int i = 0;

    while( 1 ) {
        while( board[0][i] != EmptySquare ) i++;
        if( n == 0 )
            break;
        n--;
        i++;
    }

    return i;
}

static void ShuffleFRC( Board board )
{
    int i;

    srand( time(0) );
   
    for( i=0; i<8; i++ ) {
        board[0][i] = EmptySquare;
    }

    board[0][(rand() % 4)*2  ] = WhiteBishop; /* On black square */
    board[0][(rand() % 4)*2+1] = WhiteBishop; /* On white square */
    board[0][FindEmptySquare(board, rand() % 6)] = WhiteQueen;
    board[0][FindEmptySquare(board, rand() % 5)] = WhiteKnight;
    board[0][FindEmptySquare(board, rand() % 4)] = WhiteKnight;
    board[0][FindEmptySquare(board, 0)] = WhiteRook;
    board[0][FindEmptySquare(board, 0)] = WhiteKing;
    board[0][FindEmptySquare(board, 0)] = WhiteRook;

    for( i=0; i<8; i++ ) {
        board[7][i] = board[0][i] + BlackPawn - WhitePawn;
    }
}


A call to ShuffleFRC(boards[0]) can be put inside InitPosition()...case VariantFischeRandom: in backend.c to get a new position each time the "Reset Game" command is invoked.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: An FRC compatible xboard (sort of)

Postby Tord Romstad » 26 Jul 2005, 20:44

Alessandro Scotti wrote:I've incorporated the changes into my (Windows) version and compiled, but not tested yet in play. However, everything seems ok so far.

Great!

It would be nice if you could try to play some normal (i.e. non-FRC) games. I think the most recent XBoard-960 should behave exactly like the normal XBoard except when playing FRC, but it is entirely possible that we have accidentally broken something.

Here is also an attempt at generating a random initial position... not sure it follows all the rules but it certainly is fun to see the board shuffled.

I haven't tested it, but it looks correct. Thanks for the code!

A call to ShuffleFRC(boards[0]) can be put inside InitPosition()...case VariantFischeRandom: in backend.c to get a new position each time the "Reset Game" command is invoked.

Excellent! Now I don't even have to hunt for the right location in the code to change. I'll add this to our XBoard-960 source code tomorrow.

Tord
User avatar
Tord Romstad
 
Posts: 639
Joined: 09 Oct 2004, 12:49
Location: Oslo, Norway

Re: An FRC compatible xboard (sort of)

Postby Roger Brown » 26 Jul 2005, 22:14

Alessandro Scotti wrote:

I've incorporated the changes into my (Windows) version and compiled, but not tested yet in play. However, everything seems ok so far.




Hello Alessandro,

Is this version available or are you going to do some more work on it?

Later.
Roger Brown
 
Posts: 346
Joined: 24 Sep 2004, 12:31

Re: An FRC compatible xboard (sort of)

Postby Alessandro Scotti » 26 Jul 2005, 22:47

Roger Brown wrote:Is this version available or are you going to do some more work on it?


Hi Roger,
if you want to give it a try here are sources and Windows executable:

http://www.ascotti.org/programming/chess/zip/winboard_x_frc.zip

Add "-variant fischerandom" to the command line parameters and pieces should start shuffling right away! :)
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: An FRC compatible xboard (sort of)

Postby Roger Brown » 26 Jul 2005, 23:06

Alessandro Scotti wrote:
Roger Brown wrote:Is this version available or are you going to do some more work on it?


Hi Roger,
if you want to give it a try here are sources and Windows executable:

http://www.ascotti.org/programming/chess/zip/winboard_x_frc.zip

Add "-variant fischerandom" to the command line parameters and pieces should start shuffling right away! :)







Hello Alessandro,


Thanks for the rapid response. Commercial software vendors should respond so quickly to their client base.


A couple of quick questions (I am at work so I cannot test the executable just yet):


Without the command line parameters, this version plays normal chess, correct?


Can this version load frc epd/pgn positions?


I am not really interested in frc in and of itself but any development of Winboard and its capacities fascinates and excites me. 8-)


I will get a life right after this post!


:!:


Later.
Roger Brown
 
Posts: 346
Joined: 24 Sep 2004, 12:31

Re: An FRC compatible xboard (sort of)

Postby Fabien Letouzey » 27 Jul 2005, 09:28

Hi all,

Tord Romstad wrote:I think the most recent XBoard-960 should behave exactly like the normal XBoard except when playing FRC, but it is entirely possible that we have accidentally broken something.


I have broken an "FICS wild" variant where the board is left/right flipped (including O-O/O-O-O notation). I intend to add the old code back later.

I have not yet checked normal chess. I expect that only castling moves could bring problems ...

Fabien.
Fabien Letouzey
 
Posts: 110
Joined: 03 Dec 2004, 10:17
Location: France

Re: An FRC compatible xboard (sort of)

Postby Fabien Letouzey » 28 Jul 2005, 08:51

Tord Romstad wrote:It would be nice if you could try to play some normal (i.e. non-FRC) games. I think the most recent XBoard-960 should behave exactly like the normal XBoard except when playing FRC, but it is entirely possible that we have accidentally broken something.


Well we have broken something by design. We use KxR to represent castling moves. In particular, "O-O" as input is translated to KxR.

Normal-chess engines will break when receiving the move.

Fixing this is not so easy, because I am not sure we can access the "variant" field at any time.

So don't use XBoard-960 for normal-chess engine matches. If one engine sends moves in SAN and the other one reads coordinate moves, the latter will crash.

Fabien.
Fabien Letouzey
 
Posts: 110
Joined: 03 Dec 2004, 10:17
Location: France

Re: An FRC compatible xboard (sort of)

Postby Reinhard Scharnagl » 28 Jul 2005, 09:25

Why not use the scheme SMIRF does? Between engine and GUI castling moves are translated corresponding to the GUI input gesture which is: a) King moves to his castling target field, if this would cause at least two elementary steps, b) otherwise King moves to the involved Rook to signal a matching castling. That way even short range castling moves are distinct from King's single step moves. Castling moves from traditional chess also compatibly fit still into that scheme.

http://www.chessbox.de/Compu/schachsmirf.html

Reinhard.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

PreviousNext

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 28 guests

cron