Bored with orthodox Chess?

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Richard Allbert
Posts: 770
Joined: Wed Jul 19, 2006 7:58 am

Re: Hooray!!

Post by Richard Allbert » Mon Jan 24, 2011 5:44 pm

It was a stupid bug with Promotion and King location.

I have a variable in the position structure which tracks the king squares for white and black.

Early in takemove(), the function says "if piece on to square is a king, update king sq to the from sq"

Of course this is ok in standard chess, but not in Spartan where the move may have been a promotion, and takemove should set the square to null, as the king won't exist!

As you pointed out, this causes all manner of problems.

It's playing a 60 game match vs Fairy at the moment, if all goes well, I'll post the link again for the repaired version.

Sorry!

Richard Allbert
Posts: 770
Joined: Wed Jul 19, 2006 7:58 am

Re: Hooray!!

Post by Richard Allbert » Mon Jan 24, 2011 7:01 pm

Ok, it's been uploaded, played 60 games vs FairyMax with no problems!

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

Re: Hooray!!

Post by hgm » Tue Jan 25, 2011 5:15 pm

Where exactly is it uploaded? When I click the Catalyst link on your engine page, it just sends me to a domain-name registration site...

Richard Allbert
Posts: 770
Joined: Wed Jul 19, 2006 7:58 am

Re: Hooray!!

Post by Richard Allbert » Tue Jan 25, 2011 9:02 pm

:shock: My fault again....

http://www.bluefever.net/enginepage.html

Link should work, I just tested it.

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

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

Post by Daniel Shawul » Tue Jan 25, 2011 9:14 pm

I am getting blank pieces all over while trying to use the /pieceToCharTable for jetan chess.
Even for spartan using setup you provided here, the Lieutenants have black pictures ? Jetan has two more fairy pieces (fliers & thoat)
after substituting the others by suitable FIDE pieces. I don't think the jetan pieces are included in the winboard fairy piece list you provided a couple of posts ago.

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

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

Post by hgm » Tue Jan 25, 2011 10:05 pm

Are you in board size middling or bulky? Most fairy pieces only exist in those sizes.

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

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

Post by Daniel Shawul » Tue Jan 25, 2011 10:45 pm

That worked. I was looking for other possible problems in vain when all I had to do was change board size.

Another question.
Is it possilbe to mix alien variants with different board sizes ? I have two 8x8 variants (spartan & normal) and a 10x10 alien jetan. If I started with jetan, I get a 10x10 board which I can switch to 8x8 variant later (only to spartan not to normal it seems).

Also I added international checkers on 10x10, so which checkers will it switch to when I select checkers from the menu (to be added later). So to avoid these problems, I just listed all my variants with different board sizes in a combo box and send them as 'feature option -combo'. But later when I tried to change board size to 10x10, I understood this doesnt work since winboard allows board size change only through the variants menu.

So is there a way that the engine can register to winboard what it supports so that only those will be shown to the user as available ?
For instance for fairy-max , I had to click so many radio buttons to figure out what it supports :)

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

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

Post by hgm » Wed Jan 26, 2011 8:45 am

Daniel Shawul wrote:So is there a way that the engine can register to winboard what it supports so that only those will be shown to the user as available ?
For instance for fairy-max , I had to click so many radio buttons to figure out what it supports :)
Oh, that s funny! This is an enhancement I just added, because it started to annoy me as well. (Despite the fact that I know what Fairy-Max supports. :wink: ) It now greys out the variants that are not recognized in the engine's variants feature. I uploaded that version now. Yesterday I rebased the Alien branch in by git repository to move this greyout patch close to the branch point (to before the addition of all the weird variants), so that we can easily move it to the master branch and include it in the 4.5.0 release.

In the current implementation Checkers would by default be 8x8, and if you want to interactively switch to 10x10 you would have to set that in the New variant menu. I see that even in the new version this is not possible without selecting a new variant from the menu first. So it is not possible to stay in an 'unlisted' variant, unless you click cancel, but that would also discard the board size. I think that clearly is a mistake; if none of the radio-buttons is selected when you OK, WinBoard should just stay in the current variant, in stead of switching to "variant unknown" (which draws an error message).

Your idea to let the engine control this definitely has merit. Having to use the New Variant dialog is cumbersome (because it is yet an extra step, and in two-machines mode you would already have to switch the variant in the private settings menu of both engines), and in XBoard the board format is currently not in the menu at all. In general it is not possible to recognize the variant from a FEN, but it is of course possible to recognize the board size. So on receiving a setup for the initial position from the first engine, it could deduce the board size from the FEN, switch to that board size before setting up the position (the alternative used now is to ignore the setup command due to an uninterpretable FEN), and then send the new board size (as part of the variant name) to the second engine, followed by a setboard (or edit) for the position (which already happens in the current version).

However, it would be simpler to extend the specs of the setup command, to allow it to contain an explicit board size modifier just in front of the FEN. Because derivng board size from FEN is not entirely trivial, and for holdings size in fact not possible at all. So how about (say)

setup (P...Q.p...q.) 6x6+0 1p1p1p/p1p1p1/6/6/1P1P1P/P1P1P1

for 'mini-Checkers'. I can then simply let WB match for "%dx%d+%d" after the pieceToCharTable, and the engine would be able to control the holdings size. The board-format specifier would be optional, and in its absence WB would use the default values for that variant. But it would never be an error to specify these as well.

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

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

Post by hgm » Wed Jan 26, 2011 9:40 am

OK, the version I uploaded now should implement the board-format element in the setup command. I have no way to test it, and the whole implementation of the setup command is not really error-proof anyway, so the engines had better not send anything with bad syntax, or the result will be very undefined. The idea is that the board-format element, just like the pieceToCharTable element, should only be present in a setup command sent in response to the variant comamnd for setting up the initial position, and that later setup commands in variant alien should only contain a FEN. (But this is not checked currently!)

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

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

Post by Daniel Shawul » Wed Jan 26, 2011 1:20 pm

Yes it works. I added the board size in the first setup the engine sends and now I can change variants with different board size from my options combo box! More later.

Edit1:
I also needed to make sure that the same variants are selected in the private options of both engines.

Edit2:
Since both engines change the board size winboard blinkers. So maybe ignore the setup of the second engine ?

Post Reply