Winboard_F and shatranj and ics play

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: Winboard_F and shatranj and ics play

Postby H.G.Muller » 17 Jan 2008, 21:04

This was already solved in the alpha.tst you were using now. The default promoChar in Shatranj is now not 'f', but PieceToChar(blackFerz), which should always work no matter what PieceToCharTable you defined.

I think I fixed the problem. It occurred in a place where I had to make changes before, in connection with problems with Crazyhouse on an ICS. The problem is that the ICS sends you the board position, without telling what game it is. To get the variant you have to ask for a move list, (the board+move that come in might be from a game you are observing, starting in the middle), which it does only after it becomes clear that the board+move are from a new game. So I had to prevent initializing the variant from setting up the the initial position in the first position of the game history, in case the board sent before was a nonstandard initial position of a wild game. So I skipped InitPosition if the board send was the first position of a game.

But this does also skip assigning the PieceToCharTable. In Crazyhouse that is not too noticible, but in Shatranj it is fatal.

I solved it by saving the board that was just recieved, always do InitPosition, setting up the opening board, and then copying the received board back, just in case InitPosition has overwritten it.

Please try the alpha.tst that I posted now, to see if the problem persists. Take note of how the pieces look (board size "middling" or "bulky"!) The Alfils should look like Elephants, not like Bishops!

Perhaps you could also try if you can observe already started Crazyhouse and Shatranj games.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard_F and shatranj and ics play

Postby PulsarMike » 17 Jan 2008, 21:41

My original download was from the fr thread about fr games not getting initial position of the fr game and i onlyl downloaded an exe not any piece sets. I have downloaded alph.tst on top of that. I dont have any piece sets yet. will this effect its ics play? it tends to have invisible pieces i think. I think you posted a link to your winboard_f page in this thread and i will go look for piece sets.

Mike
User avatar
PulsarMike
 
Posts: 83
Joined: 27 Nov 2007, 00:01
Location: California

Re: Winboard_F and shatranj and ics play

Postby H.G.Muller » 17 Jan 2008, 21:57

With board size "middling" and "bulky" you will never have any missing pieces. Missing pieces don't affect play.

The recommended piece font is George Tsavdiris' WinboardF font:
http://rapidshare.com/files/64874418/WinboardF.ttf
With that you should have pieces at any board size. But for very small board sizes there seem to be some problems with the fill function (making the white pieces transparent). But of course I like my own bitmaps more! :wink:
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard_F and shatranj and ics play

Postby PulsarMike » 17 Jan 2008, 22:08

just on a related note, i went to the 3 download links listed on your page, the first one, someones page, just had one file, the second one in the list seemed to have a broken link to winboard f on their page, nothing to click on and teh third one just had a zip with a exe and i think a help file. the two that had one exe file, is this an install file? if its not , its not clear to me how people downloading would get the full winboard f with pieces without reading the thread if they just assume the download is the only download.

Mike
User avatar
PulsarMike
 
Posts: 83
Joined: 27 Nov 2007, 00:01
Location: California

Re: Winboard_F and shatranj and ics play

Postby H.G.Muller » 17 Jan 2008, 22:36

Perhaps it is an idea to package Winboard_F with the WinbaordF font. Now it only comes as an executable, which is no install, but simply the wWinBoard itself, and a release-notes file describing the new features. The latter mentions the WinboardF font.

I did not include the WinboardF font, as it is not really mine. WinBoard_F is still only in the beta stage, so I have not really worried yet about how to eventually distribute it. You can see that there are still enough things to fix, and I still want to add a number of new features too (FRC, CRC, secondary time controls) as well.
Last edited by H.G.Muller on 19 Jan 2008, 13:00, edited 1 time in total.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard_F and shatranj and ics play

Postby Tony Hecker » 19 Jan 2008, 07:16

PulsarMike wrote:on the subject of ics play on icc and also in this case fics, existing crazyhouse engines, my program plays as well as others like sunsetter and sjeng, all use p-b-n-r-q-k for the pieces and the ics ( fics icc others ) use this as well. I noticed there are piece to char values for crazyhouse pieces ( i think promoted queens etc) Will this be an issue for my program and others that use standard chess pieces? I havent done any testing with winboardf and crazyhouse.

Mike


I briefly tested WinboardF with my engine (TJchess) in crazyhouse, and it worked on FICS, and also worked offline.
Tony Hecker
 
Posts: 25
Joined: 16 Jan 2008, 05:17
Location: USA

Re: Winboard_F and shatranj and ics play

Postby H.G.Muller » 19 Jan 2008, 13:12

Yes, for crazyhouse the promoted pieces have to be internally represented differently (so they will revert to pawns on capture), and it seemed a good idea to also display them differently. So I used some bitmaps from variant pieces for this, such as Archbishop for a Bishop that is really a promoted Pawn.

You don't want them to be designated in FEN or PGN by the letter for that fairy piece, though (which would be A in stead of B). So I added the mechanism that if the PieceToChar entry for a piece is defined as '~', it uses the letter for the corresponding demoted piece in moves, and prints the '~' after it in FENs (as is custom in Bughouse FENs). Just defining it as 'B' as well would not result in the latter action.

In fact the PieceToCharTable has become more than just a translation table to generate PGN and FEN output: it is really a string that programs the way the game works. You cannot promote to pieces that have no defined character, for instance, they are suppressed from the promotion popup. And it decides which Shogi pieces can promote and which not, and if in games with holdings the piece is demoted. And how: a piece defined as '~' will revert to Pawn, a piece defined as '+' will revert to its unpromoted form.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard_F and shatranj and ics play

Postby PulsarMike » 22 Jan 2008, 07:08

Afraid its still not working. Couldnt parse Ba3 at begging of game when biship jumpted. I had legality off, i was not using a piece to char table. I downloaded the alpha.txt and reneamed it alpha.exe that was linked to earlier in this thread.

debug file is at:
www.adam16mr.org/stuff/winboard1-21-08.zip

Mike
User avatar
PulsarMike
 
Posts: 83
Joined: 27 Nov 2007, 00:01
Location: California

Re: Winboard_F and shatranj and ics play

Postby H.G.Muller » 23 Jan 2008, 12:42

OK, thanks. Sorry for handling this in such an inept way. But this is really something that happens in a part of WinBoard that is very difficult to understand by looking at the code.

The whole handling of ICS communication in WinBoard is written as a state machine: just a very large bunch of conditional statements of the form "if you receive A when you were in state S, do X and go into state T, and loop back". So you really have no idea how control flows unless you know what exactly the ICS will send you.

It turns out an ICS sends you a board position together with every move (even for your own moves!). But old WinBoard interprets this board position without first finding out what the variant is. And it got away with that as long as the interpretation of that board position did not depend on the variant. Then it simply switched variant later, without worrying about what was on the board, when later communications with the ICS reveal what variant it is actually playing (e.g. because it suddenly receives a bughouse/crazyhouse holdings message, while it thought it was playing 'normal'). But you then cannot simply set up the default opening position for that variant, as the board sent to you previously might have been the initial position for a wild game in this variant. But the board is not re-sent.

I guess the fundamental solution is to save the last parsed board, and on a variant switch first reset the game for this variant (leading to the default opening being set up on board[0] of the game history, but also to assigningthe new PieceToChaTable), and then re-parse the board (which also contains the information what the move number was, so the position need not always be set up on board[0]). Even this is not entirely trivial, as the last board you have seen might not always have to belong to the same game as you just switched the variant for...

I will try to solve the problam fundamentally along these lines, and let you know when I think I have something that works. Anyway, thanks for your efforts.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Previous

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 21 guests