Bored with orthodox Chess?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27791
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Some questions to H.G.Muller about Winboard.

Post by hgm »

The colors indicate from which version on the text applies. Black was the original text of WB 4.2.7 (in so far it still applies), red is what was added by Alessandro Scotti for Winboard_x, green describes what I added in WinBoard 4.3.x, blue what was added in 4.4.x, and purple what is now added in 4.5.0. (But the html help is not really up to date with the latest changes; in fact the only reason that 4.5.0 is not officially released yet is because we are not finished making the documentation, which should merge existing XBoard and WinBoard docs.) Nothing is obsolete or scheduled for deprecation. The colors only serve to help people spotting the new stuff.

The 34-long /pieceToCharTable was abandoned quite long ago (early 4.3 versions?). Since 4.4.0 it can be upto 44 (= 2 x 22), and the order was changed a little.

PNBRQFEACWMOHIJGDVLSUK

PNBRQ=FIDEpieces
F=Ferz
E=Alfil
A=Archbishop
C=Chancellor
W=Wazir
M=Man
O=Cannon
H=Nightrider
I=Dragon Horse
J=Dragon King
G=Grasshopper
D=unspecified, Vortex-like Chancellor image
V=Falcon
L=Amazon or Berolina Pawn, Lance image
S=Snake
U=Unicorn (royal Knight)
K=King

The order was changed to allow A and C to be in the 'unpromoted' series, giving promoted Bishop and Rook their own representation, to allow crazyhouse versions of 10x8 Chess (as played by TJchess10x8).

You probably downloaded the Spartan.zip WB download, which in view of recent developments should beconsidered obsolete. InitiallyWB did not knowanything about Spartan Chess. It had to be played as variant fairy, switching legality testing off because many of the pieces were notimplemented in WinBoard). And due to the two Kings it needed a non-standard initial position that was defined in a FEN file. The pieceToCharTable was needed because Spartan Chess uses non-standard names for the Spartan pieces, to which I wanted toconform.

In this mode WB can be used as a GUI for almost any Chess variant; the engine is in control for decidng which moves are legal and who wins. Then I got the idea to also give the engine control over the initial position and pieceToCharTable, and extended WB protocol with an engine->GUI command to specify those (accepted from the first engine only, to be usable for shuffle games). I altered Fairy-Max to allow definitionof a pieceToChar table in its ini file. The new Fairy-Max with the new WinBoard now couldplay Spartan Chess (still as variant fairy with legality checking off) without an externally defined pieceToCharTable and initial position. And in fact many other variants: I equiped Fairy-Max with an engine-definedoption (setable in the Engine Settings dialog) to select which variant it actually plays when WB is set to 'fairy'. As I made Spartan Chess the default choice for this (next to a host of Chess with Different Armies cases, which nowall benefited from the possibility to let fary-Max set up the initial position in WB), it became easy to play. No spartan.ini file was required anymore, as all deviating settings were coming directly from the engine.

Yesterday, however, I upgraded WinBoard to make Spartan Chess a fully suported major variant, (variant spartan), meaning it now knows the exact moves of all pieces, automatically sets the proper pieceToCharTable when you select the variant, knows about duple checkso that you do not get spurious check or mate symbols in SAN, and can be played with legality checking on. It is recommended you use this version, obtainable (as installer) from

http://hgm.nubati.net/WinBoard-4.5.0.exe

The 'q' was initially in the pieceToCharTable because Fairy-Max can only promote to a single piece on its own moves (no under-promotions), and this piece could not be different for white and black. So I first play-tested with Hoplites that promoted to Queens. This has now been fixed in Fairy-Max (allowing different promotion pieces for white and black), so black no longer needs to have the Queen defined.
Richard Allbert
Posts: 792
Joined: Wed Jul 19, 2006 9:58 am

Re: Bored with orthodox Chess?

Post by Richard Allbert »

Great!

Testing now... Legality checking is a great help ;)

Just had a game get to 50 moves, before an illegal one from my engine. I had misread the rules and allowed both kings to be in check. :evil:

Hope to have a few error free games by the end of this evening...

Regards

Richard
Richard Allbert
Posts: 792
Joined: Wed Jul 19, 2006 9:58 am

Re: Bored with orthodox Chess?

Post by Richard Allbert »

:D :D

What did you say about a draw???

Here's the first game... My engine (Catalyst) smashed by Fairy for the whole game until finding a perpetual...

Code: Select all


[Event "Computer Chess Game"]
[Site "RICHARD-PC"]
[Date "2011.01.03"]
[Round "1"]
[White "Fairy-Max 4.8Q"]
[Black "Catalyst"]
[Result "1/2-1/2"]
[TimeControl "60+1"]
[Variant "spartan"]
[Annotator "1. -0.77   1... -4.99"]

1. Nf3 {-0.77/8 1.5} Lc6 {-4.99/6 2.7} 2. d3 {-0.61/7 2.0}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8 1.1} Ked6
{-8.81/5 1.2} 59. Rg6 {+5.27/6 1.2} Wd2+ {-7.83/5 1.0} 60. Kf2
{+5.23/8 1.7} We4+ {-7.88/5 0.8} 61. Ke2 {+5.25/8 0.9} Cd2+ {+0.00/5 1.1}
62. Ke1 {+5.22/8 0.7} Wf3+ {+0.00/5 0.8} 63. Kf1 {+0.03/9 0.6} Cd1+
{+0.00/5 1.0} 64. Kf2 {+0.02/10 1.3} We4+ {+0.00/5 0.7} 65. Ke2
{+0.01/10 1.7} Cd2+ {+0.00/6 0.6} 66. Kf1 {+0.01/9 0.7} Cd1+ {+0.00/5 0.7}
67. Ke2 {+0.00/17 1.7} Cd2+ {+0.00/6 0.5}
{XBoard adjudication: repetition draw} 1/2-1/2
Lol.... I need to work on the eval a bit!

Nice variant, though.
User avatar
hgm
Posts: 27791
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

Great!

ChessV is also already half working. (It plays black without problems.)
User avatar
George Tsavdaris
Posts: 1627
Joined: Thu Mar 09, 2006 12:35 pm

Re: Some questions to H.G.Muller about Winboard.

Post by George Tsavdaris »

Thanks for all the information but i don't understand something:

Why the Hoplite is represented with the l (el/the letter after k) letter?
Shouldn't be represented by the h letter?

It doesn't matter anyway.
But can you tell me with what letters the Spartan Chess pieces are represented?
After his son's birth they've asked him:
"Is it a boy or girl?"
YES! He replied.....
User avatar
hgm
Posts: 27791
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Some questions to H.G.Muller about Winboard.

Post by hgm »

The letter by which a piece is indicated is not fixed. It started out as fixed when there were only a few unorthodix pieces implemented (like Archbishop and Chancelor), but as the number of pieces and variants grew, this was untenable. To get standard SAN a Chancellor has to be C in Gothic Chess, but a Cannon has to be C in Xiangqi. That meant that the user had to redefine the character assignments for every variant he wanted to play through the /pieceToCharTableoption. This was very inconvenient (it precluded interactive variant switching), so at some point I switched to a system where each variant known to WB has its own default pieceToCharTable. This then also acquired the function of defining which pieces could be present in the variant (e.g. to promote to, or in pasted FENs).

The list above gave the pieceToChatTable assignment for varint fairy, which is the only 'variant' where all pieces known to WB are defined at the same time. The idea was that the user could use this as a catchall for variants not explicitly known to WB, if necessary switching legality testing off when the provided pieces did not contain exactly what he needed. In that case it is also likely that he would want to redefine the pieceToCharTable. Which is how I first implemented Spartan Chess. It had to be played with legality testing off because the WB Elephant did not exactly move as the Spartan Lieuteneant, and the General (which initially was a Chancellor, but later changed to a Crowned Rook because the Spartans were too strong) being represented by a Chancellor.

At this stage I needed to redefine the pieceToCharTable of variant fairy to conform to the piece naming of Spartan Chess, to get SAN that was standard for that variant. This is what you saw in the Spartan.ini file:

Code: Select all

PNBRQFEACWMOHIJGDVLSUKpnbrqfeacwmohijgdvlsuk
PNBRQ..............  K....q.lwg.....c...h  k
You see this redefines l (Lance) as h, c (Chancellor) as g, etc. (Note that if the given string is shorter than 44, the last letter in each half is used for King, and the others are used starting with Pawn.)

All in ll this way of using WB for variants unknow to it was quite cumbersome, needing allkind of support files, like the Spartan.ini and Spartan.fen. So in the next generation I designed a system to get around that,in the form of the 'setup' command. After receiving the command "variant fairy" from WB, Fairy-Max now replies with

setup (PNBRQ..............K....q.lwg.....c...hk) lgkcckwl/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR

causing WB to adapt the initial position and the pieceToCharTable without any need for an external source. A Fairy-Max user can now define his own variant in the fmax.ini file including a pieceToCharTable specification, and Fairy-Max will then automatically convert the initial position defined for the variant into a FEN and send it to the GUI with the setup command. This was very usefulfor defining all the different flavors of Chess with Different Armies in Fairy-Max. But WB could then not be used for such variants without engine (i.e. as game viewer).

In the latest WB even this is no longer needed for Spartan Chess: WB now knows "variant spartan", and is aware of the initial position and pieceToCharTable assignment for it, and the exact way all pieces move in this variant. So it can be used with legality testing on, can be used without engine, it will correctly indicate all squares the picked-uppiece can move to when you have "Highlight Dragging" on, etc.
Richard Allbert
Posts: 792
Joined: Wed Jul 19, 2006 9:58 am

Re: Bored with orthodox Chess?

Post by Richard Allbert »

30 Games played, no illegal moves, no crashes. A lot of losses though!

Hopefully there will be a small tournament?
User avatar
hgm
Posts: 27791
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

Yes, I am planning that. Gregory also sent me a corrected ChessV (which I still have to test), and I am setting up a server with on-line viewer for Spartan Chess now. (I have to make somenew gif images for that.)
Roger Brown
Posts: 782
Joined: Wed Mar 08, 2006 9:22 pm

Re: Bored with orthodox Chess?

Post by Roger Brown »

hgm wrote:I
I like your piece design. The 'woodware' I made for Spartan Chess looks like this (not quite finished...):


Hello H.G.

Is there any way that you could get those pieces for Winboard? I mean, is there possibly a file somwehere?

:-)

Of course what is important is the functionality of the gui but eye candy like wooden pieces are a part of the enjoyment too!

Later.
User avatar
hgm
Posts: 27791
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

WinBoard does not support arbitrary images for pieces. Only true-type fonts. XBoard does support arbitrary pixmaps, though.

My ChessLive! viewer page is on-line again, with Spartan Chess. This was not trvial, since the disk of my Chess PC on which all this software was, croaked a few months ago... It seemsI am back in business, though.

The first attempt of a Spartan-Chess viewer is now at:

http://80.100.28.169/spartan/spartan.html

It is not completely finished yet, and for the time being it is playing Fairy-Max against itself.