Duck Chess

Discussion of chess software programming and technical issues.

Moderator: Ras

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 »

I have uploaded a new WinBoard bundle to http://hgm.nubati.net/Duck2.zip , which now also contains DuckSlayer (and puts the engines in separate directories). WinBoard is still unaltered.
MTaktikos
Posts: 59
Joined: Fri Oct 25, 2019 7:58 pm
Full name: Michael Taktikos

Re: Duck Chess

Post by MTaktikos »

hgm wrote: Sat Nov 12, 2022 1:30 pm I have uploaded a new WinBoard bundle to http://hgm.nubati.net/Duck2.zip , which now also contains DuckSlayer (and puts the engines in separate directories). WinBoard is still unaltered.
Thank you! Here the test vs Zillions:

[Event "Computer Chess Game"]
[Site "AMD 3900x"]
[Date "2022.11.12"]
[Round "1"]
[White "DuckChess.zrf"]
[Black "DuckSlayer 0.00"]
[Result "0-1"]
[TimeControl "40/600"]
[Variant "duck"]
[Annotator "1... +0.00"]

1. Nf3,c6 Nf6,c3 2. Nd4,e4 Nc6,e6 3. e3,b4 e5,f5 4. Nxc6,e2 dxc6,d3 5.
Qf3,d7 Bd6,e2 6. Nc3,c5 Bg4,g3 7. Qe2,f3 O-O,f5 8. Qc4,e4 Bf5,e2 9. a4,e4
a5,e2 10. h4,e4 Nd5,e2 11. Nxd5,e4 cxd5,a3 12. Qxd5,e7 Bxc2,c6 13. Ke2,b8
Qxh4,h3 14. Qxb7,h2 Qxa4,a3 15. Rh3,a2 Rfb8,a3 16. Qxa8,b4 Rxa8,a3 17.
g3,a2 Bd1,c2 18. Kxd1,b3 Qxa1,c4 19. Bd3,b1 c5,e4 20. Bc2,b1 Kh8,d3 21.
Rh5,b1 g6,h6 22. Rh3,b1 f5,f3 23. Ke2,b1 e4,d3 24. f4,b1 exf3,c3 25.
Kxf3,b1 Be5,b3 26. e4,b1 Bxb2,d1 27. Bxb2,d3 Qxb2,d1 28. Ba4,c2 Qa3,b5 29.
Bc2,b3 Qc1,a4 30. Bb3,h2 Qf1,c4 31. Ke3,g2 Re8,d5 32. Rh2,f2 Rxe4,d3 33.
Kf3,f2 Qd3,g2 34. Ba2,e3 Qxd2,g2 35. Bb3,e3 Qxh2,c4 36. g4,c8 Qf4,e2 37.
Kg2,c4 Qxg4,f2 38. Kh2,d8 Re2,d5 39. Kh1,c4 Qh3,g1 40. Bf7,h2 Re1,g1 41.
Bxg6,e2 Rxh1,e8
{Xboard adjudication: King destroyed} 0-1

Like in thes game vs Mayhem before, Zillions has shown positional weaknesses.
But DuckSlayer found all of them and had an overwhelming victory

[Event "Computer Chess Game"]
[Site "AMD 3900x"]
[Date "2022.11.12"]
[Round "2"]
[White "DuckSlayer 0.00"]
[Black "DuckChess.zrf"]
[Result "*"]
[TimeControl "40/600"]
[Variant "duck"]
[Annotator "1. +0.03"]

1. Nf3,c3 Nc6,b4 2. d4,c3 Nf6,d2 3. Nc3,d5 e6,d2 4. e4,d6 h5,g8 5. Bd3,b4
Bd6,e5 6. O-O,g8 Ne7,e5 7. Nb5,f4 Bb4,e5 8. a3,a5 c6,c5 9. e5,d5 cxb5,g8
10. exf6,d6 gxf6,c7 11. axb4,a6 Nd5,c4 12. Bd2,b6 a6,c3 13. Ne1,a3 f5,f3
14. Qe2,d6 Nxb4,c3 15. Qxh5,h6 Nxd3,h7 16. Nxd3,h6 Qf6,h7 17. h3,h6 Qxd4,h7
18. Bc3,h6 Qg7,e5 19. Nf4,h7 e5,d4 20. Nd5,h6 Rb8,g5 21. Qf3,d6 f6,f4 22.
Qh5,h6 Kf8,g5 23. Bb4,h6 Kg8,g5 24. Qe8,h7 Qf7,f8

Until here, DuckSlayer didn't show mercy and has doubtless a winning position. But now follow repetitions, which open the question: Does there exist in Duck Chess a draw by 3-fold-repetition like in Chess?
If not, then no problem, DuckSlayer has time to finish his winning position with a victory. If yes, then in the following moves he throws his victory away and the game results in a draw

25. Ne7,c1 Kg7,e1 26.Nxf5,g6 Kg8,f8 27. Nh6,h7 Kg7,e1 28. Nf5,g6 Kg8,f8 29. Nh6,h7 Kg7,e1 30.Nf5,g6
*
At this point Zillions announced "3-Time-Repetion: Draw!" and didn't want to continue:

Image

But Winboard didn't stop the game with the same adjucation. The above question, if a 3-fold repetition exists, remains open. DuckSlayer had for sure a winning position and wouldn't miss the win if he had to consider a 3-fold-repetition.
Congrats HG, Duck Chess has a new champion now!
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 »

Good point. I vaguely recall that KingSlayer's repetition avoiding was done by leaving visited game positions in the Transposition Table with draw scores. This currently does not work, because for now DuckSlayer suppresses use of all info it gets from the TT. (I fake a miss always.) So it does store and probe, but just ignores the result. I did this because the current TT does not store the info that is needed: in Duck Chess a node returns two scores and the duckzwang square, while the TT only holds one score. Using that score as if there never would be any duckzwang would lead to grave blunders.

Also, since a single move will often not be able to cause a beta cutoff (when the Duck can block it), the TT should really remember multiple 'hash moves' for a given position. TT design is an area that wI will still have to think through. But at least I could examine whether a TT entry is marked as holding a game position (recognizable because those get their depth upgraded to MAXDEPTH, to avoid they can ever be replaced), and return a draw score when they do.

In WinBoard you can configure the number of repeats after which it adjudicates (or switch off such adjudication altogether, by setting the number of repeats to 0), in the Adjudication Options menu dialog. For Duck Chess it is a good question what to consider a repetition. I guess a different Duck location should not really be considered different. Otherwise you might as well not have the rule, as people could repeat the same FIDE position virtually forever and still avoid a draw by putting the Duck in a different place all the time.
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Duck Chess

Post by TonyJH »

Here is a new duck chess engine: http://tonyjh.com/chess/TJchessDuck_0.1.zip (Windows 64-bit, Winboard engine)
It is based on TJchess, so I just called it TJchessDuck for now.
It is working for me with HGM's updated Winboard package for duck chess.
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 »

Wow, that is a strong engine. Congrats!
MTaktikos
Posts: 59
Joined: Fri Oct 25, 2019 7:58 pm
Full name: Michael Taktikos

Re: Duck Chess

Post by MTaktikos »

Indeed it is very strong, and the new champion in Duck Chess, congrats TonyJH!
Here the test against yesterday's champion DuckSlayer:

[Event "Duck Chess Game"]
[Site "AND 3900x"]
[Date "2022.11.14"]
[Round "1"]
[White "TJchess-Duck 0.1"]
[Black "DuckSlayer 0.00"]
[Result "1-0"]
[TimeControl "40/300"]
[Variant "duck"]
[Annotator "1. +0.21 1... +0.00"]

1. d4,d5 Nf6,a3 2. Bg5,e4 Nc6,f3 3. Bxf6,e3 exf6,f3 4. e3,d6 Be7,c3 5.
Bb5,b8 O-O,d2 6. Bxc6,d6 dxc6,d7 7. Ne2,e6 Bd7,g1 8. a3,e6 a5,c3 9. Nd2,e6
h6,g1 10. Nc3,d6 Be6,g1 11. e4,d5 Bg4,f3 12. h3,e2 Bh5,g4 13. f3,d7 Bg6,g1
14. Nb3,b6 Ra6,g1 15. Qd3,d6 Qc8,c5 16. O-O,d6 Qd7,c5 17. f4,d6 a4,c5 18.
Nxa4,a5 Bd6,c5 19. Nc3,f5 Rb6,h5 20. Na4,a6 Rb5,c5 21. f5,c3 Bh5,g4 22.
c4,b4 Rb6,h1 23. g4,b4 Ra6,a5 24. Nac5,c8 Bxc5,d6 25. Nxc5,c8 Qd6,c2 26.
Nxa6,c5 Qg3,f3 27. Nb4,g2 c5,f3 28. dxc5,g2 b6,f3 29. c6,g2 Bxg4,f3 30.
hxg4,g2 Qxg4,d5 31. Kh2,h4 Rd8,d5 32. Na6,d6 Rc8,d7 33. c5,f4 b5,d7 34.
Rae1,h4 Qg5,d7 35. Qxb5,f4 Qh4,b7 36. Kg2,g4 Qg5,b7 37. Kh1,g4 Qh4,d3 38.
Kg1,g3 Qg4,b7 39. Re3,g3 Qf4,f3 40. Qe2,e5 Qh4,b4 41. b3,g6 Qg5,h1 42.
Kh2,g6 Qh4,a4 43. Rh3,g4 Qg5,f4 44. Qd2,e3 Qg4,d7 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Qd3,a3 33. Kg1,b5 bxa2,d7 34. Qxa2,g5
Rd6,e1 35. Qa4,g5 Qc2,b3 36. Qa2,h3 g5,e1 37. Bh3,h4 Kb7,g4 38. Kg2,a4
Rf8,g4 39. Re1,a4 Ned8,e3 40. Qa1,a8 Rd5,a2 41. Bg4,b5 Nxa5,a2 42. Re2,d2
Qg6,a2 43. b4,d3 Nc4,c5 44. Qa2,d3 Nb6,e3 45. Kh2,d3 Rh8,e3 46. Kg1,d3
Nc6,e3 47. Re1,d3 Rd6,e3 48. Qb3,a8 Rd2,e3 49. Ra1,d3 Ka7,e3 50. b5,e8
Nd8,a5 51. Qb1,d3 Qd6,a5 52. bxa6,d1 Qc5,d4 53. Qc1,c4 Qxf2,e2 54. Kh1,h2
Qf1,d1 55. Bh5,g1 Rxh5,d1
{Xboard: Forfeit due to invalid move: c1f1;h2 (c1f1 via h2, `0) res=25} 0-1

Apparently DuckSlayer tried the illegal move 56.Qc1xf1 (jumping over the Duck d1),
but Winboard did not accept it. Impressive games by TJChessDuck!

Although there seems to be a new and serious candidate around the corner,
https://github.com/ianfab/Fairy-Stockfish/tree/duck, the progress atm appears to be slow,
so for now it doesn't threat the top position of TJChessDuck
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Duck Chess

Post by TonyJH »

Thanks for testing. Fairy-Stockfish will crush it.
Btw, TJchessDuck can use multiple CPU cores. I've only tested this on my PC so far (an old generation Intel i7).
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Duck Chess

Post by JohnWoe »

Great to see more engines !

Thanks for the game. I added 1 tactic to MayhemDuck. I uploaded MayhemDuck-1.4 to the latest Mayhem release.
Some work has been done. Added "play" command so anybody can watch game in shell. Tons of bugs found and fixed.
My thinking is that v1.4 is much stronger. As it now solves all tactics ( + symmetry ) immediately.
Signature: 38185312
I recommend avx2 version as it's a bit faster than 64bit.

Nice finish 60. g7h7@h6 !!

Code: Select all

[ White: "MayhemDuck 1.4" ]
[ Black: "MayhemDuck 1.4" ]
[ TimeControl: "1000 ms" ]
[ Fen: "rbbnkqnr/pppppppp/8/8/8/8/PPPPPPPP/RBBNKQNR w KQkq - 0 1" ]
[ Variant: "DuckChess" ]
1. d1e3@e6 d8c6@f5 2. g1f3@f6 e7e6@d3 3. c2c3@a5 g8f6@d3 4. f3g5@d6 h7h6@f3 5. g5h3@a5 f8d6@d3 6. e3c4@c5 d6d5@d3 7. c4e3@c5 d5e4@d3 8. b1c2@f8 f6d5@d3 9. f2f3@g6 e4h4@f2 10. c2e4@g3 e8g8@f2 11. g2g3@d8 h4h3@g2 12. e3d5@d8 e6d5@g2 13. e4d5@e7 d7d6@g2 14. f3f4@e7 c8e6@g2 15. d5c4@d5 a7a5@g2 16. f1f3@d5 e6g4@e4 17. c4f7@c8 f8f7@e4 18. f3d3@a7 h3g2@f1 19. h2h3@e3 g4f5@e4 20. d3b5@g1 g2h1@b6 21. h3h4@g1 h1h3@f2 22. b5b7@a6 h3g3@f2 23. e1d1@a7 g3f4@b1 24. b7a8@b7 f4f1@e1 25. d1c2@e4 f5d7@d3 26. e2e4@c8 f1e1@d1 27. d2d3@f6 e1e3@d2 28. a2a4@f6 g7g6@d2 29. h4h5@f6 g6h5@d2 30. b2b3@f6 d6d5@d2 31. e4d5@c8 e3e2@d2 32. c2b1@c2 e2e3@d2 33. d5c6@c8 e3d3@c2 34. b1b2@b7 d3e3@d2 35. a8b8@c8 e3f2@d8 36. c6d7@c2 f7d7@d8 37. c1h6@c2 g8h7@c8 38. h6c1@c2 h7g6@c8 39. b2b1@h4 d7d3@d1 40. b1c2@d2 d3d7@e2 41. c1d2@d6 h5h4@h1 42. b8e8@f7 g6g7@h3 43. e8d7@f7 c7c5@e7 44. c3c4@d4 g7g6@c3 45. d7e8@f7 g6g7@e1 46. a1d1@h3 f2e2@e3 47. e8e5@e4 e2f2@f6 48. d2e3@e2 f2f6@b5 49. e5c7@e7 g7g6@d4 50. c7a5@f5 f6e5@d4 51. d1d3@h3 e5f5@e5 52. a5b6@d4 f5e4@e6 53. e3c5@f6 g6g7@g3 54. b6e6@e5 e4e2@e3 55. d3d2@e4 e2g4@f5 56. e6e5@f4 h4h3@f6 57. d2d7@f5 g7g6@e6 58. d7g7@f6 g6h6@g5 59. e5f6@g6 h6h5@a1 60. g7h7@h6 h3h2@b4 61. h7h5@a8 { 1-0 White wins by checkmate }
Speed is quite good in bench: ~10MNPS

Code: Select all

...
[ 13/14 ; r1b1kb1r/ppp2ppp/2p2n2/3q4/*3p3/4P2Q/PPPP1PPP/RNB1KB1R w KQkq - 2 7 ; bm h3c8@b8 ]
info depth 1 nodes 2345 time 1 nps 2345000 score cp 254 pv h3c8@b8
info depth 2 nodes 53500 time 6 nps 8916666 score cp 646 pv h3c8@b8
info depth 3 nodes 173047 time 19 nps 9107736 score cp 695 pv h3c8@b8
info depth 4 nodes 569199 time 59 nps 9647440 score cp 692 pv h3c8@b8

[ 14/14 ; rnb1kb1r/pppp1ppp/4p2q/*3P3/3Q4/2P2N2/PPP2PPP/R1B1KB1R b kqKQ - 2 7 ; bm h6c1@b1 ]
info depth 1 nodes 2345 time 1 nps 2345000 score cp 254 pv h6c1@b1
info depth 2 nodes 53527 time 7 nps 7646714 score cp 646 pv h6c1@b1
info depth 3 nodes 159540 time 19 nps 8396842 score cp 695 pv h6c1@b1
info depth 4 nodes 555445 time 60 nps 9257416 score cp 692 pv h6c1@b1

+-+-+-+-+-+-+-+-+-+-+-+

Nodes:    38185312
Time(ms): 3849
NPS:      9920839
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

hgm wrote: Sat Nov 12, 2022 1:30 pm I have uploaded a new WinBoard bundle to http://hgm.nubati.net/Duck2.zip , which now also contains DuckSlayer (and puts the engines in separate directories). WinBoard is still unaltered.
I have played a few games with DuckSlayer vs DuckSlayer. It seems the games ALL start with the same sequence of moves:
1.Nc3,f3 Nc6,f6
2.Nf3,d3 Nf6,d4
3.d3,d2 d5,e3
4.Bd2,e6 Bd7,e4
5.Bg5,b5 Be6,e4
6.a4,f4 h6,e3
7.Bf4,h5 d4,b5

Is this the intended result?
Retired actuary and software developer. I love chess, coffee, wine and food
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

I have seen several games continue to the identical position after move 13, which is lost for White:
8. Ne4,h5 Nd5,a3
9. Bg3,c5 Bc8,f4
10. a5,a6 f5,f4
11. Nc5,d7 f4,e6
12. Bh4,g5 Qd6,e4
13. Nb3,g5 Qb4,d2

(sorry, can't load the screen capture)
Retired actuary and software developer. I love chess, coffee, wine and food