Duck Chess

Discussion of chess software programming and technical issues.

Moderator: Ras

JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Duck Chess

Post by JohnWoe »

Yes, I compiled wrong version. Now I see DuckChess. I don't want to play but test my engine.

I use uci2wb

Code: Select all

./xboard -fcp "uci2wb ./mayhem-duck-1.1-x86-linux-classic-64bit" -pieceImageDirectory 'svg' -debug
I guess some variant stuff in MayhemDuck needs recompiling. Somehow xiangqi is "supported". It's not. MayhemDuck only plays DuckChess. Nothing else. Debug:

Code: Select all

locale = fi_FI.UTF-8
recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
shuffleOpenings = 0
shuffleOpenings = 0
Version: xboard 4.9.1 + uci2wb ()
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
StartChildProcess (dir=".") uci2wb ./mayhem-duck-1.1-x86-linux-classic-64bit
528 >first : xboard
protover 2
551 <first : feature setboard=1 usermove=1 debug=1 ping=1 name=1 reuse=0 exclude=1 pause=1 sigint=0 sigterm=0 done=0
551 >first : accepted setboard
551 >first : accepted usermove
551 >first : accepted debug
551 >first : accepted ping
551 >first : accepted name
551 >first : accepted reuse
551 >first : accepted exclude
551 >first : accepted pause
551 >first : accepted sigint
551 >first : accepted sigterm
551 >first : accepted done
551 <first : feature option="UCI2WB debug output -check 0"
551 >first : accepted option
551 <first : feature option="ponder always -check 0"
551 >first : accepted option
789 <first : feature myname="MayhemDuck 1.1 (UCI2WB)"
789 >first : accepted myname
789 <first : feature option="UCI_DuckChess -check 1"
789 >first : accepted option
790 <first : feature option="UCI_DuckChess960 -check 0"
790 >first : accepted option
791 <first : feature option="Level -spin 100 0 100"
791 >first : accepted option
791 <first : feature option="MoveOverhead -spin 100 0 10000"
791 >first : accepted option
791 <first : feature variants="normal,xiangqi"
791 >first : accepted variants
791 <first : feature smp=1 memory=1 done=1
791 >first : accepted smp
791 >first : accepted memory
791 >first : accepted done
792 >first : memory 68
792 >first : cores 1
792 >first : new
random
792 >first : level 40 5 0
792 >first : post
792 >first : hard
792 >first : ping 1
Impossible move , type = 0
793 <first : Error (unknown command): cores
863 <first : pong 1
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
recognized 'normal' (-1) as variant normal
recognized 'xiangqi' (-1) as variant xiangqi
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Duck Chess

Post by hgm »

Well, if an UCI engine does not announce what variant it plays, UCI2WB will assume it can be a Chess or a Xiangqi engine (as these commonly use UCI).

Are you sure Mayhem annonces it plays Duck Chess, by having 'duck' as one of the possible choices in the UCI_Variant option?
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Duck Chess

Post by JohnWoe »

After Herculean effort I managed to get it work.
I compiled uci2wb also.
So it was duck in variants.
But XBoard doesn't use the correct form of notation. MayhemDuck expects e2e4@e6. I want to block e6.
MayhemDuck is very picky on moves entered as Mayhem.

Code: Select all

[Event "Computer Chess Game"]
[Site "desktop"]
[Date "2022.10.30"]
[Round "-"]
[White "me"]
[Black "MayhemDuck 1.2 (UCI2WB)"]
[Result "0-1"]
[TimeControl "40/300"]
[Variant "duck"]

1. e4,e6
{Error: first chess program (./UCI2WB ./mayhem-duck) exited unexpectedly} 0-1
Debug:

Code: Select all

locale = fi_FI.UTF-8
recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
shuffleOpenings = 0
shuffleOpenings = 0
Version: xboard 4.9.1 + UCI2WB ()
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
StartChildProcess (dir=".") ./UCI2WB ./mayhem-duck
647 >first : xboard
protover 2
679 <first : feature setboard=1 usermove=1 debug=1 ping=1 name=1 reuse=0 exclude=1 pause=1 sigint=0 sigterm=0 done=0
679 >first : accepted setboard
679 >first : accepted usermove
679 >first : accepted debug
679 >first : accepted ping
679 >first : accepted name
679 >first : accepted reuse
679 >first : accepted exclude
680 >first : accepted pause
680 >first : accepted sigint
680 >first : accepted sigterm
680 >first : accepted done
680 <first : feature option="UCI2WB debug output -check 0"
680 >first : accepted option
680 <first : feature option="ponder always -check 0"
680 >first : accepted option
928 <first : feature myname="MayhemDuck 1.2 (UCI2WB)"
928 >first : accepted myname
928 <first : feature option="Level -spin 100 0 100"
928 >first : accepted option
928 <first : feature option="MoveOverhead -spin 100 0 10000"
928 >first : accepted option
928 <first : feature variants="duck,atomic"
928 >first : accepted variants
928 <first : feature smp=1 memory=0 done=1
928 >first : accepted smp
928 >first : accepted memory
928 >first : accepted done
recognized 'duck' (-1) as variant duck
Reset(1, 0) from gameMode 0
recognized 'duck' (-1) as variant duck
GameEnds(0, (null), 2)
930 >first : quit
shuffleOpenings = 0
StartChildProcess (dir=".") ./UCI2WB ./mayhem-duck
992 >first : xboard
protover 2
994 >first : cores 1
994 >first : new
random
994 >first : variant duck
994 >first : level 40 5 0
994 >first : post
994 >first : hard
994 >first : ping 1
Impossible move , type = 0
1001 <first : feature setboard=1 usermove=1 debug=1 ping=1 name=1 reuse=0 exclude=1 pause=1 sigint=0 sigterm=0 done=0
1001 >first : accepted setboard
1001 >first : accepted usermove
1001 >first : accepted debug
1001 >first : accepted ping
1001 >first : accepted name
1001 >first : accepted reuse
1001 >first : accepted exclude
1001 >first : accepted pause
1001 >first : accepted sigint
1001 >first : accepted sigterm
1001 >first : accepted done
1001 <first : feature option="UCI2WB debug output -check 0"
1002 >first : accepted option
1002 <first : feature option="ponder always -check 0"
1002 >first : accepted option
1243 <first : feature myname="MayhemDuck 1.2 (UCI2WB)"
1243 >first : accepted myname
1243 <first : feature option="Level -spin 100 0 100"
1243 >first : accepted option
1243 <first : feature option="MoveOverhead -spin 100 0 10000"
1243 >first : accepted option
1243 <first : feature variants="duck,atomic"
1243 >first : accepted variants
1243 <first : feature smp=1 memory=0 done=1
1243 >first : accepted smp
1243 >first : accepted memory
1243 >first : accepted done
1243 <first : Error (unknown command): cores
1244 <first : pong 1
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
recognized 'duck' (-1) as variant duck
recognized 'atomic' (-1) as variant atomic
Reset(1, 1) from gameMode 0
recognized 'duck' (-1) as variant duck
GameEnds(0, (null), 2)
4137 >first : quit
shuffleOpenings = 0
StartChildProcess (dir=".") ./UCI2WB ./mayhem-duck
4206 >first : xboard
protover 2
4206 >first : cores 1
4206 >first : new
random
4206 >first : variant duck
4206 >first : level 40 5 0
4206 >first : post
4206 >first : hard
4206 >first : ping 2
Impossible move , type = 0
4242 <first : feature setboard=1 usermove=1 debug=1 ping=1 name=1 reuse=0 exclude=1 pause=1 sigint=0 sigterm=0 done=0
4242 >first : accepted setboard
4242 >first : accepted usermove
4243 >first : accepted debug
4243 >first : accepted ping
4243 >first : accepted name
4243 >first : accepted reuse
4243 >first : accepted exclude
4243 >first : accepted pause
4243 >first : accepted sigint
4243 >first : accepted sigterm
4243 >first : accepted done
4243 <first : feature option="UCI2WB debug output -check 0"
4243 >first : accepted option
4243 <first : feature option="ponder always -check 0"
4243 >first : accepted option
4514 <first : feature myname="MayhemDuck 1.2 (UCI2WB)"
4514 >first : accepted myname
4514 <first : feature option="Level -spin 100 0 100"
4514 >first : accepted option
4514 <first : feature option="MoveOverhead -spin 100 0 10000"
4514 >first : accepted option
4514 <first : feature variants="duck,atomic"
4514 >first : accepted variants
4514 <first : feature smp=1 memory=0 done=1
4514 >first : accepted smp
4514 >first : accepted memory
4514 >first : accepted done
4514 <first : Error (unknown command): cores
4514 <first : pong 2
nps: w=-1, b=-1
6591 >first : name th
nps: w=-1, b=-1
6593 >first : time 30000
6593 >first : otim 30000
book hit = (NULL)
6593 >first : usermove 6593 >first : e2e6,e6e4
6599 <first : 0 0 0 0 Bad move: e2e6,e6e4
 69 67 68 70131 68 67 69
 66 66 66 66 66 66 66 66
132132132132133132132132
132132132132132132132132
132132132132  0132132132
132132132132132132132132
  0  0  0  0132  0  0  0
  3  1  2  4 65  2  1  3
Impossible move a1d1`, type = 26
6618 <first : tellusererror UCI2WB: ./mayhem-duck died on me
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Duck Chess

Post by hgm »

Well, WB protocol uses a comma, and is pretty picky too. An @ sign is reserved for drop moves. Do not use it for other cases.

You will also have to repeat the to-square. Like e2e4,e4f5 if you want to place the Duck on f5.
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Duck Chess

Post by TonyJH »

Hi HG, is it possible to get a Winboard 4.9 binary with duck chess support?
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Duck Chess

Post by hgm »

Probably not today. I would still have to port the modifications in the WinBoard front end from the Alien Edition to the v4.9.x branch, and I have a busy schedule today. And I would want to have Duck Chess be selectable from the menu. But if I am going to alter the New Variant dialog, I want to alter it such that the engine-defined variants can be selected from a combobox, as some engines now support a ridiculously large number of variants, for which radio buttons are no longer practical. But I will work on it.
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Duck Chess

Post by TonyJH »

hgm wrote: Sat Nov 05, 2022 9:27 am Probably not today. I would still have to port the modifications in the WinBoard front end from the Alien Edition to the v4.9.x branch, and I have a busy schedule today. And I would want to have Duck Chess be selectable from the menu. But if I am going to alter the New Variant dialog, I want to alter it such that the engine-defined variants can be selected from a combobox, as some engines now support a ridiculously large number of variants, for which radio buttons are no longer practical. But I will work on it.
Okay, I'm not in any hurry for it, but if you get to it someday, great. :)
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Duck Chess

Post by hgm »

OK, I brewed something, and it actually works. I am sad to say that the XBoard version in my repository did not. I had no Duck Chess engine on Linux, so I had not tested it, but when I equiped it with a WinBoard front end it turned out to contain several crippling bugs. Actually it would not even compile, due to another untested WinBoard front-end patch.

I uploaded it to http://hgm.nubati.net/Duck2.zip . It has duck images at sizes petite (33x33), middling (49x49) and bulky (72x72). At other sizes the Duck shows up as a black hole. (But apart from that it should still work.

[Edit] The bug-fixes are now in my on-line repository, so an XBoard built from the v4.9.x branch there should now work too.
MTaktikos
Posts: 59
Joined: Fri Oct 25, 2019 7:58 pm
Full name: Michael Taktikos

Re: Duck Chess

Post by MTaktikos »

Thank you! For a test, a two-games match Quack 1.3b vs DuckChess.zrf (Zillions of games), I think, in this chess variant it is the first engine match ever.

[Event "Edited game"]
[Site "DESKTOP-UG2MCF4"]
[Date "2022.11.06"]
[Round "1"]
[White "Quack 1.3b-"]
[Black "DuckChess.zrf"]
[Result "0-1"]
[Variant "duck"]

1. Nc3,f3 Nf6,b5 2. Nf3,d4 Ng4,d5 3. e4,g1 c6,g8 4. b3,f6 h6,d3 5. d2d4,e3

This was an illegal move from White, the pawn cannot jump over the duck on d3,
so Black won

[Event "Edited game"]
[Site "DESKTOP-UG2MCF4"]
[Date "2022.11.06"]
[Round "2"]
[White "DuckChess.zrf"]
[Black "Quack 1.3b"]
[Result "1-0"]
[Variant "duck"]

1. Nc3,b5 e5,c6 2. Nf3,e7 Nc6,e3 3. d3,f6 Bb4,g4 4. Nd5,d2 Bc5,f4 5. Be3,d4 a5,d6
6. Bxc5,f6 b5,h6 7. e4,f6 g6,b3 8. Kd2,f6 Nge7,b4 9. Nf6,f8#

Image

In its engine output Quack wrote "Black resigns" - after it was mated.
So the match ended 2-0 for Zillions. But I think, the bug fixes (that only knights can jump over the duck, and to be able to recognize an immediate mate) won't be too hard, and that in one of the next versions you will manage to catch up with or to surpass the Zillions version
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Duck Chess

Post by TonyJH »

Thank you HG.

I ran into the problem below using my own duck chess engine (work in progress):
Second engine sent move g8f6,f6f4. But WinBoard sent g8f6,f4g6 to the first engine instead of g8f6,f6f4.

My engine sends moves using two lines, since I followed the example of Quack engine.
move g8f6,
move f6f4

winboard.debug:

Code: Select all

17680 <first : move d2d4,
17680 <first : move d4d6
Handle: kill = 3,5
H2: kill = 3,5
Apply: kill = 3,5
17680 >second: time 6000
17680 >second: otim 5811
book hit = (NULL)
17680 >second: d2d4,d4d6
17680 >second: go
silence
20667 <second: move g8f6,
20668 <second: move f6f4
Handle: kill = 5,3
H2: kill = 5,3
Apply: kill = 5,3
20668 >first : time 5811
20668 >first : otim 5701
book hit = (NULL)
20668 >first : g8f6,f4g6
silence
22495 <first : move c1g5,
22512 <first : move g5e4
Handle: kill = 4,3
H2: kill = 4,3
Apply: kill = 4,3
22512 >second: time 5701
22512 >second: otim 5627
book hit = (NULL)
22512 >second: c1g5,g5e4
silence
22794 <second: Illegal move: c1g5