Xboard crazyhouse problem

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Xboard crazyhouse problem

Post by stevenaaus »

I'm new to crazyhouse, and I havent managed to sort out whether a pawn
promoted to queen, and then taken, is available as a spare queen.

And in this game between TJChess and Sjeng, xboard adjudicates an illegal move when Sjeng
tries to play a queen he had just taken (via a TJChess promoted pawn).

Is Xboard or Sjeng at fault ?

[Event "Computer Chess Game"]
[Site "localhost.localdomain"]
[Date "2012.03.23"]
[Round "-"]
[White "TJchess 1.1"]
[Black "Sjeng 11.2"]
[Result "1-0"]
[TimeControl "40/300"]
[Variant "crazyhouse"]
[Annotator "1. +0.07 1... +0.00"]

1. Nf3 {+0.07/13} e6 {+0.00/10 6} 2. e3 {+0.09/12 4} Nf6 {+0.44/10 7} 3.
Nc3 {+0.07/13 2.3} Rg8 {-0.22/9 7} 4. Ng5 {+0.45/12 3} h6 {-0.49/9 6} 5.
Nf3 {+0.23/12 4} Nc6 {+0.11/9 7} 6. Bb5 {+0.36/13 6} Na5 {-0.07/9 7} 7. O-O
{+0.59/13 5} Bb4 {-0.58/10 13} 8. d4 {+0.61/12 10} c6 {-0.90/10 6} 9. Bd3
{+0.92/12 5} Bxc3 {-1.00/9 6} 10. bxc3 {+1.12/12 4} Nd5 {-1.48/8 6} 11. c4
{+1.46/12 7} Nf6 {-1.89/9 7} 12. Ba3 {+2.16/12 6} d6 {-2.00/8 7} 13. B@b4
{+2.44/12 5} N@e4 {-2.00/9 5} 14. Nd2 {+2.34/12 2.0} Nxd2 {-1.77/10 6} 15.
Qxd2 {+2.12/12 2.2} Nxc4 {-2.05/9 8} 16. Bxc4 {+2.17/12 2.6} P@h3
{-1.28/8 7} 17. f3 {+2.17/12 11} hxg2 {-1.23/9 7} 18. Qxg2 {+2.13/11 7}
N@f5 {-1.54/8 6} 19. P@f2 {+2.13/11 6} a5 {-1.49/8 5} 20. Bxd6
{+3.49/11 2.1} Nxd6 {-1.62/9 8} 21. Bxd6 {+4.49/12 7} Qxd6 {-4.11/9 7} 22.
P@e5 {+5.08/12 16} Qc7 {-4.40/8 7} 23. N@d6+ {+4.73/11 1.7} Kd8 {-4.92/8 6}
24. Nxc8 {+5.68/11 9} Rxc8 {-5.03/8 6} 25. exf6 {+5.75/11 13} B@d6
{-5.83/7 6} 26. fxg7 {+5.91/10 24} N@d2 {-6.21/7 6} 27. P@h7 {+7.41/9 4}
Bxh2+ {-6.60/7 5} 28. Kh1 {+9.23/10 13} Re8 {-8.95/8 8} 29. g8=Q
{+10.85/10 6} Nxf1 {-9.22/6 7} 30. Qxe8+ {+199.89/7 9} Kxe8 31. N@g7+
{+199.91/7 16} Kf8 {-9999.91/5 7} 32. R@h8+ {+199.93/7 2.1}
{Xboard: Forfeit due to invalid move: q@g8 (_1_1) res=24} 1-0
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Xboard crazyhouse problem

Post by hgm »

I think Sjeng is at fault, as the WB prtocl specs say that pieces need to be upper case. So it should be Q@g8, rather than q@g8. This could be a bit controversial, though, because it is only specified by example. So if it specifies a7a8q as a way to send a promotion, does that realy mean that a7a8Q or A7A8Q would be non-compliant? (I think it does...)

What version of XBoard are you using? I thought the hand-written parser accepted lower-case pieces again.
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: Xboard crazyhouse problem

Post by stevenaaus »

I think Sjeng is at fault, as the WB prtocl specs say that pieces need to be upper case.
Hmmm... Is this the problem ? Sjeng thinks it has a queen to drop. But XBoard does not show a queen in the piece tray (after 30 Qxe8+ Kxe8). The queen promotion has already suceeded, and a normal queen drop works fine. Only queen drops eventuating from promoted pawns fail.

I'm using 80b445539bef9950cbc2df9ed8f21f0d xboard-4.6.0.tar.gz
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: Xboard crazyhouse problem

Post by ilari »

stevenaaus wrote:
I think Sjeng is at fault, as the WB prtocl specs say that pieces need to be upper case.
Hmmm... Is this the problem ? Sjeng thinks it has a queen to drop. But XBoard does not show a queen in the piece tray (after 30 Qxe8+ Kxe8). The queen promotion has already suceeded, and a normal queen drop works fine. Only queen drops eventuating from promoted pawns fail.

I'm using 80b445539bef9950cbc2df9ed8f21f0d xboard-4.6.0.tar.gz
Xboard did the right thing. Promoted pieces become pawns again when they're captured by the opponent.
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: Xboard crazyhouse problem

Post by stevenaaus »

ilari wrote:Xboard did the right thing. Promoted pieces become pawns again when they're captured by the opponent.
Cheers... Yes the pawn count goes up one.
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Xboard crazyhouse problem

Post by hgm »

stevenaaus wrote:Hmmm... Is this the problem ?
Oh, I see. Indeed, in Crazyhouse (and Bughouse and Shogi) promoted pieces revert to their original form when captured. The variant where they don't is known as 'Loop Chess'.

If you want to play Loop Chess in WinBoard, all you have to do is give the Additional options

-variant crazyhouse -pieceToCharTable "PNBRQKpnbrqk"

This removes the promoted versions of the pieces from the game. (Default pieceToCharTable for crazyhouse is "PNBRQ.......++++Kpnbrq.......++++k", where the + in the second row of the 'periodic system' of pieces tells WinBoard that it should use the alternative form as promotion piece. Because these would map outside of the holdings, they are automatically demoted to Pawn when captured.)

Of course if the opponent engine still wants to play Crazyhouse, this will not help much.
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: Xboard crazyhouse problem

Post by stevenaaus »

I contacted Sjeng's author and he's acknowledged the problem.

TJChess is another crazyhouse engine - probably stronger than sjeng - and Tony has made a Linux version. I can't see it on his website yet. http://tonyjh.com/chess/tjchess/

Re SCID and drop variants. Damn it, That's not going to happen. There's no way to hack the drop moves into the current 1 byte move encoding which crisscrosses the project.

Looks like i'm stuck with the super powerful but infuriating XBoard. (Sorry HG) Whaayyyy cant that thing remember settings ?. Do i really have to use the command line. And it crashes at the drop of a hat with my old XOrg, :twisted: though it's probably not xboards fault.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Xboard crazyhouse problem

Post by Daniel Shawul »

If you are looking for engines, Nebiyu can play crazyhouse and shogi too

Code: Select all


variant crazyhouse 2
8 8 5
.*PpKkQqRrBbNnUuOoIiGg
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR[-] w KQkq - 0 1
#PNBRQFEACWMOHIJGDVLSUKpnbrqfeacwmohijgdvlsuk
 PNBRQ....UOIG........Kpnbrq....uoig........k
P  100  wpawn
p  100  bpawn
K 1000  king
k 1000  king
Q  900  queen
q  900  queen
R  500  rook
r  500  rook
B  350  bishop
b  350  bishop
N  300  knight
n  300  knight
U  900  queen
u  900  queen
O  500  rook
o  500  rook
I  350  bishop
i  350  bishop
G  300  knight
g  300  knight
18 8 8 2
P 4 U O I G
p 4 u o i g
109 2
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Xboard crazyhouse problem

Post by TonyJH »

I just added the Linux (XBoard) version of TJchess to my website. This is a faster binary than I sent to you before, Steven.

This issue reminds me of another issue I've seen:
When using WinBoard to play back a crazyhouse game from a PGN file, WinBoard behaves as if it's a loop chess game instead of crazyhouse, so it will wrongly claim an illegal move if a player drops a pawn that used to be a promoted piece. I think this was easy to reproduce and occurs with recent WinBoard versions. It's only an issue for viewing PGNs. I can try again and provide a debug file if H.G. is interested.

Btw, TJchess can play loop chess too, but it wouldn't currently work with WinBoard/XBoard since TJchess would require the interface to send "variant loop".
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: Xboard crazyhouse problem

Post by stevenaaus »

TonyJH wrote:I just added the Linux (XBoard) version of TJchess to my website. This is a faster binary than I sent to you before, Steven.
Thanks for staticly linking glibc. This morning i found i can't even run the new Dirty chess binary on Fedora14 (64bit) because of a glibc mis-match. It's quite an issue for closed source engines.