Page 17 of 19

Re: Hooray!!

Posted: Mon Jan 24, 2011 6:44 pm
by Richard Allbert
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!

Re: Hooray!!

Posted: Mon Jan 24, 2011 8:01 pm
by Richard Allbert
Ok, it's been uploaded, played 60 games vs FairyMax with no problems!

Re: Hooray!!

Posted: Tue Jan 25, 2011 6:15 pm
by hgm
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...

Re: Hooray!!

Posted: Tue Jan 25, 2011 10:02 pm
by Richard Allbert
:shock: My fault again....

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

Link should work, I just tested it.

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

Posted: Tue Jan 25, 2011 10:14 pm
by Daniel Shawul
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.

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

Posted: Tue Jan 25, 2011 11:05 pm
by hgm
Are you in board size middling or bulky? Most fairy pieces only exist in those sizes.

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

Posted: Tue Jan 25, 2011 11:45 pm
by Daniel Shawul
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 :)

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

Posted: Wed Jan 26, 2011 9:45 am
by hgm
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.

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

Posted: Wed Jan 26, 2011 10:40 am
by hgm
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!)

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

Posted: Wed Jan 26, 2011 2:20 pm
by Daniel Shawul
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 ?