winboard and crazyhouse

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

winboard and crazyhouse

Postby PulsarMike » 13 Feb 2009, 00:39

Another issue that has actually come up more than once with users of my program is at crazyhouse in home play people asking about, is to my understanding winboard does not support retract move in crazyhouse. I have implemented retract move for crazyhouse in pulsar but found out afterwords that winboard does not support it. In normal games you can simply keep a copy of the board at every move and rights and revert back. like going back to a fen. In crazyhouse the board also consists of the captured pieces and the idenity of which pieces on the board are really promoted pawns. If you support tracking this information you can also revert back to earlier moves by going back to the 'expanded fen'. I have 2 pawn arrays, one for black and one for white, that keep track of the square every pawn is on. bear in mind a player can have up to 16 pawns due to captures as well as many more captured pieces then 16 since he can capture back his own pieces. When a pawn moves its tracked on the pawn array. when its promoted it remains on the pawn array. if its captured its off the pawn array but goes back on when it comes into play.

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

Re: winboard and crazyhouse

Postby H.G.Muller » 13 Feb 2009, 09:56

I am surprised that this does not work. WinBoard does use the method of storing all previous boads. When I implemented the crazyhouse holdings, I did it by making them part of the board: as far as WB is concerned, Crazyhouse is played on a 12x8 board. And WB internally represents pieces that are promoted Pawns differently from the normal pieces in Crazyhouse, and they are even displayed differently. So the entire game state is remembered, just like in any other variant. (The different display does not work in ICS mode, as there WB is a slave of the ICS, and the ICS does represent them as normal pieces. But there it is the ICS that remembers the game stae, and would send a new board to WB after undoing one or more moves.)

If there is a problem here, it must be because there is some mis-communication between the engine and WB. I think using the 'retract' menu simply discards the last two boards of WB's game history, and sends the engine the remove command, supposing the engine will correctly restore the board from two ply ago. If you go through another board of the game history, and try to resume the game from there (I guess you first have to switch to Edit Game mode first to do this without WB complaining that the board is not the current one), WinBoard tries to set up the position by sending a setboard command with a FEN. The FEN contains the holdings, and indicates promoted Pawns by printing a ~ behind the piece they promoted to, like is usual in bFENs.

So in principle, everything should be taken care of. If something does not work as intended, please let them save a debug file, (or at least the game + details on which engine was used, so that I could try to recrate the error while making a debug file), so that I can see what goes wrong.

I tried 'retract' in a Crazyhouse game against Sunsetter, and it seemed to work without problems.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: winboard and crazyhouse

Postby PulsarMike » 13 Feb 2009, 18:28

Then this is probably not an issue. i'll have to try it. Havent run crazyhouse in home play in awhile, i might have noticed it fixed and forgot about it. Was in the two threads trying to recall the quirks that were broken in winboard wild support that i had run accross like the castle in giveaway issue. there actually never were that many and winboard overall has had good wild support. with the crazyhouse takeback fixed and the captured pieces shown now in the new winboard this makes winboard much nicer for crazyhouse.
User avatar
PulsarMike
 
Posts: 83
Joined: 27 Nov 2007, 00:01
Location: California


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 28 guests