Duck Chess

Discussion of chess software programming and technical issues.

Moderator: Ras

rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

TonyJH and I were both watching Eric Rosen a few weeks ago on Twitch, playing against DuckChessZero:

Facing the World's STRONGEST Duck Chess Engine
https://www.twitch.tv/imrosen/video/1711412379

Here is the web interface to play against DuckChessZero:
http://peter.website/duck-chess/analysis

"This is an engine + analysis interface for duck chess that runs entirely in the browser, with the networks trained with tabula rasa self-play, like AlphaZero"
https://github.com/petersn/duckchess
Retired actuary and software developer. I love chess, coffee, wine and food
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 managed to let the diagram in the Duck Chess article at chessvariants.com play in such a way that it also uses the Duck to reserve its own next move, rather than only attempting to block the best move of the opponent. This should cover the essence of Duck Chess; it is not really perfet, because it only attempts blocking the opponent's best move on an adjacent square. But the errors it would make because of this are probably insignificant to the errors it would make because it does not search deep enough.

To implement this I replaced the AlphaBeta function of the diagram's innate AI by one that tracks 3 scores, rather than just the best (and only takes a beta cutoff if the lowest of these three exceeds beta): one for when the best move is blocked on the adjacent square, one for when the Duck is placed to prevent the opponent's best Duck move, and one for all other Duck locations. It then returns the lowest of these scores as best score, together with the Duck location required to achieve it. And it returns the second-lowest as the 'exception score' for when the Duck was already there, so that it could not stay in the best position (the 'duckzwang score').

It should make an entertaining opponent.

As a spin-off I also made diagrams that can play Blue-Chip Chess and Refusal Chess.
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Duck Chess

Post by TonyJH »

rgrosz789 wrote: Mon Jan 30, 2023 4:37 am TonyJH and I were both watching Eric Rosen a few weeks ago on Twitch, playing against DuckChessZero:

Facing the World's STRONGEST Duck Chess Engine
https://www.twitch.tv/imrosen/video/1711412379
I don't remember that. I am interested to know more about DuckChessZero though. I don't think I heard of it before now.
Looks like that twitch video is only available to subscribers of his channel.
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

Sorry, my mistake Tony.
I saw a comment on that twitch stream from @fifdspence about testing TJDuckChess against DuckChessZero. Eric Rosen found a few bugs, actually won two out of three games.
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 »

hgm wrote: Mon Jan 30, 2023 11:19 am I managed to let the diagram in the Duck Chess article at chessvariants.com play in such a way that it also uses the Duck to reserve its own next move, rather than only attempting to block the best move of the opponent.
...
It should make an entertaining opponent.
Yes, it does - I lost a few games playing against it (silly mistakes).
Retired actuary and software developer. I love chess, coffee, wine and food
defrag71
Posts: 5
Joined: Wed Dec 28, 2016 12:46 pm
Location: Italy

Re: Duck Chess

Post by defrag71 »

MTaktikos wrote: Tue Jan 24, 2023 8:13 pm Good news, Belzedar and I have published today our first official duck nnue net, can be downloaded from
https://fairy-stockfish.github.io/nnue/
Have updated here the complete winboard suite with the strongest FSFDuck so far (avx2 compile), combined with this net, and the other duck engines:
https://filehorst.de/d/etcBsCHx

Enjoy!
Thanks!
Nice improvement in strength.
I compiled myself the exe because avx2 doesn't run on my system, maybe it is a bit slow, anyway these are my results:

Code: Select all

Rank Name                      Elo    +    - games score oppo. draws
   1 TJchessDuck 0.2           502  149  149    70   97%  -108    3%
   2 FSFduck nnue              130  109  109    70   57%    52    6%
   3 FSFduck                  -256  121  121    70   13%   217    3%
   4 MayhemDuck 1.9 (UCI2WB)  -376  169  169    30   10%   125    7%
Vinvin
Posts: 5287
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: Duck Chess

Post by Vinvin »

rgrosz789 wrote: Mon Jan 30, 2023 4:37 am TonyJH and I were both watching Eric Rosen a few weeks ago on Twitch, playing against DuckChessZero:

Facing the World's STRONGEST Duck Chess Engine
https://www.twitch.tv/imrosen/video/1711412379
What was the score ?
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

Eric only played three games. He won two games, but should have lost all three.

In the 2nd game, DuckChessZero let Eric take its King, which was clearly a programming bug (it had a mate in 2). In the 3rd game, DuckChessZero allowed Eric to checkmate with a Knight, also clearly a programming bug (Eric's position was very bad).
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 »

MTaktikos wrote: Tue Jan 24, 2023 8:13 pm Good news, Belzedar and I have published today our first official duck nnue net, can be downloaded from
https://fairy-stockfish.github.io/nnue/
Have updated here the complete winboard suite with the strongest FSFDuck so far (avx2 compile), combined with this net, and the other duck engines:
https://filehorst.de/d/etcBsCHx

Enjoy!
I have been using a Windows Virtual Machine (using VMWare) to run engine tests. I can run this VM on a Windows PC, and everything works fine.

Now I'm trying to set up this VM so it can run 24x7 on a separate PC. But FSFDuck does not work when I run the exact same VM on a Linux PC.

Any idea why that might happen?
http://www.softwarepolish.com/images/FSFDuck-VM.png

I can't add the image ("Sorry, the board attachment quota has been reached")
Retired actuary and software developer. I love chess, coffee, wine and food
MTaktikos
Posts: 59
Joined: Fri Oct 25, 2019 7:58 pm
Full name: Michael Taktikos

Re: Duck Chess

Post by MTaktikos »

rgrosz789 wrote: Sat Feb 11, 2023 6:17 pm
MTaktikos wrote: Tue Jan 24, 2023 8:13 pm Good news, Belzedar and I have published today our first official duck nnue net, can be downloaded from
https://fairy-stockfish.github.io/nnue/
Have updated here the complete winboard suite with the strongest FSFDuck so far (avx2 compile), combined with this net, and the other duck engines:
https://filehorst.de/d/etcBsCHx

Enjoy!
I have been using a Windows Virtual Machine (using VMWare) to run engine tests. I can run this VM on a Windows PC, and everything works fine.

Now I'm trying to set up this VM so it can run 24x7 on a separate PC. But FSFDuck does not work when I run the exact same VM on a Linux PC.

Any idea why that might happen?
http://www.softwarepolish.com/images/FSFDuck-VM.png

I can't add the image ("Sorry, the board attachment quota has been reached")
First thing that in the new VM can be tried is to reduce the hardware requirements: in the common options of Winboard, try to set instead 20 cores single core for a first test.
Additionally, there may be compatibility issues with the virtualization software or the operating system on the Linux machine. For this case, here is a Linux native compile of the engine, again avx2: https://filehorst.de/d/eDqcvBeF
You have to unzip it in the same folder where the nnue is, i.e. in the same folder where the Windows engine FSFDuck.exe is. May be you want also to install the Linux native xboard GUI with sudo apt install xboard,
but for a first test try to run it from the bash with ./FSFDuck to confirm if it works

And last not least, the issue may be related to the CPU architecture of the Linux machine's processor. If the Linux machine's CPU architecture is different from the Windows PC's CPU architecture, the engine may not be able to run on the Linux VM. Then perhaps a bmi2 compile, a modern (popcnt) compile or an old simple x64 compile will work