This chess variant is really popular now on chess.com and I was wondering if there any engine supporting it? I find it pretty fascinating and there can be a lot of theory and strategy hiding undiscovered.
But how would you even approach this, because it doesn't seem trivial at all... I guess now the "move" consists of both regular piece move part and duck move part, but that increases complexity exponentially. Let say there's 40 available piece moves on average and 40 duck moves, which gives around 1600 moves available per position! That's more possibilities than in Go...
Or should the move be split into two stages and game turn into 4 stages (white moves piece, white moves duck, black moves piece, black moves duck)? But then it breaks existing framework where there are only two stages (white to move / black to move).
Duck Chess
Moderator: Ras
-
- Posts: 87
- Joined: Thu Oct 07, 2021 12:48 am
- Location: Warsaw, Poland
- Full name: Michal Witanowski
Duck Chess
Author of Caissa Chess Engine: https://github.com/Witek902/Caissa
-
- Posts: 28353
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Duck Chess
Can you shortly explain the rules? (Or give a link to those?)
-
- Posts: 211
- Joined: Sun Jan 18, 2009 11:27 pm
- Location: Sweden
- Full name: Patrik Karlsson
Re: Duck Chess
After your move (standard rules) you place the duck on any empty square. The duck blocks pieces from moving to or through that square. Knights can still jump over it.
Eric Rosen playing it:
Eric Rosen playing it:
-
- Posts: 87
- Joined: Thu Oct 07, 2021 12:48 am
- Location: Warsaw, Poland
- Full name: Michal Witanowski
Re: Duck Chess
As elpapa wrote, after doing a regular move you also need to move the duck (so it can't stay in same place) that acts like a brick. There's no check or checkmate - you need to capture the enemy king.
There's also a webpage with "official" rules: https://duckchess.com/ (need to scroll down a bit)
Author of Caissa Chess Engine: https://github.com/Witek902/Caissa
-
- Posts: 28353
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Duck Chess
Very simple variant. The branching ratio is not relevant. There are only about 32 times as many game states as without Duck. So after the first ply all Duck moves will be tranpositions, and only the root has more moves than normal Chess.
But even without TT it would not be hard to search. The only function of the Duck is to prevent the opponent's best move in the next ply. After that it can again be anywhere. So if you do not prevent the opponent's best move with the Duck, you might as well have taken it off the board; he will simply play his best move, and drop the Duck back onto the board.
So you first search the position without Duck, and then assume the Duck has been placed on one of the squares the best move passes through. Rather than just keeping track of the best move, you also keep track of the second best with another piece or in another direction. (In this respect it differs from Veto Chess, where you keep track of the second-best per se.) If the path of that second-best move intersects that of the best, then both can be 'vetoed' by placing the Duck on the intersection, and you would even need the next-best move. Moves that can be 'ducked' would not increase alpha, but as soon as the set of moves that already have received a score cannot be ducked all at once, alpha is increased to the worst that you cannot block.
There is still one complication: you must move the Duck, so you can get in 'duckzwang'. Once you have concluded what the most-annoying location of the Duck is in a certain node, you should communicate that to the parent, and the parent should also consider that you would have placed the Duck there on your previous move, rather than blocking his best. This is only needed if there is exactly a single way to block the best move. If the opponent has multiple ways to block your best move, he will never be in duckzwang. If he has none, it doesn't matter at all where he places the Duck.
So in short: you will not make the Duck part of the game state, but only search the FIDE part, pruning one or more of the best moves in every node.
But even without TT it would not be hard to search. The only function of the Duck is to prevent the opponent's best move in the next ply. After that it can again be anywhere. So if you do not prevent the opponent's best move with the Duck, you might as well have taken it off the board; he will simply play his best move, and drop the Duck back onto the board.
So you first search the position without Duck, and then assume the Duck has been placed on one of the squares the best move passes through. Rather than just keeping track of the best move, you also keep track of the second best with another piece or in another direction. (In this respect it differs from Veto Chess, where you keep track of the second-best per se.) If the path of that second-best move intersects that of the best, then both can be 'vetoed' by placing the Duck on the intersection, and you would even need the next-best move. Moves that can be 'ducked' would not increase alpha, but as soon as the set of moves that already have received a score cannot be ducked all at once, alpha is increased to the worst that you cannot block.
There is still one complication: you must move the Duck, so you can get in 'duckzwang'. Once you have concluded what the most-annoying location of the Duck is in a certain node, you should communicate that to the parent, and the parent should also consider that you would have placed the Duck there on your previous move, rather than blocking his best. This is only needed if there is exactly a single way to block the best move. If the opponent has multiple ways to block your best move, he will never be in duckzwang. If he has none, it doesn't matter at all where he places the Duck.
So in short: you will not make the Duck part of the game state, but only search the FIDE part, pruning one or more of the best moves in every node.
-
- Posts: 87
- Joined: Thu Oct 07, 2021 12:48 am
- Location: Warsaw, Poland
- Full name: Michal Witanowski
Re: Duck Chess
That's pretty nice approach to the problem, I've always thought that the duck must be a part of the game state.
So it sounds like you need to perform multi-PV search at every single node (up to the point where you find a best move that can't be ducked together with best moves found so far). Am I right? This seems expensive
I wonder if the idea of using duck to just prune oponnent's best move isn't too simplistic and will lead to optimal (strongest) play.
So it sounds like you need to perform multi-PV search at every single node (up to the point where you find a best move that can't be ducked together with best moves found so far). Am I right? This seems expensive
I wonder if the idea of using duck to just prune oponnent's best move isn't too simplistic and will lead to optimal (strongest) play.
Author of Caissa Chess Engine: https://github.com/Witek902/Caissa
-
- Posts: 28353
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Duck Chess
Well, it is only multi-PV in PV nodes. If you use PVS then in nodes with null window you only have to find a move that cannot be ducked above beta. You don't need open-window searches there.
But indeed, search in Veto Chess is more expensive than in normal Chess. You need two moves that score above beta to cut, as the first will be vetoed. That drives up the EBF in iideal alpha-beta by a factor sqrt(2) = 1.4. But that is a lot better than the 'naive approach' of saing that a turn now consists of a choice among 40 moves times 40 possible vetoes. That would drive up the EBF with a factor sqrt(40) = 6.5. (If it was't for the TT.)
'Unforced Duck Chess', where you can also leave the Duck where it was, is just a form of veto chess where you can veto groups of moves. Like in Veto Chess it is only needed to search the cases where the veto includes the best move; all other vetoes are equivalent (and equivalent to no veto at all). In cut nodes for Unforced Duck Chess you would just continue to clollect cut-candidates, make the bitboard of empty squares thy pass rhrough or end on, and AND these together. As soon as this gives you an empty board there is no way to duck them all, and you take the beta cut. With open window it would be more tricky to determine how to increase alpha. But if you find an unblockable move (a contact capture) you can immediately raise alpha to its score, and if two moves cannot be ducked simultaneously, you can raise alpha to the score of the worst of those two. So it is not like you have to keep the window fully open, as in multi-PV.
With true Duck Chess it is still a bit more complex. As instead of ducking your opponent's best move(s), you could deny him the right to veto your best move 2 ply later, making many of his moves worse, rather than just supressing his best. I would have to think a little ore about that t o see how this could be handled exactly.
But indeed, search in Veto Chess is more expensive than in normal Chess. You need two moves that score above beta to cut, as the first will be vetoed. That drives up the EBF in iideal alpha-beta by a factor sqrt(2) = 1.4. But that is a lot better than the 'naive approach' of saing that a turn now consists of a choice among 40 moves times 40 possible vetoes. That would drive up the EBF with a factor sqrt(40) = 6.5. (If it was't for the TT.)
'Unforced Duck Chess', where you can also leave the Duck where it was, is just a form of veto chess where you can veto groups of moves. Like in Veto Chess it is only needed to search the cases where the veto includes the best move; all other vetoes are equivalent (and equivalent to no veto at all). In cut nodes for Unforced Duck Chess you would just continue to clollect cut-candidates, make the bitboard of empty squares thy pass rhrough or end on, and AND these together. As soon as this gives you an empty board there is no way to duck them all, and you take the beta cut. With open window it would be more tricky to determine how to increase alpha. But if you find an unblockable move (a contact capture) you can immediately raise alpha to its score, and if two moves cannot be ducked simultaneously, you can raise alpha to the score of the worst of those two. So it is not like you have to keep the window fully open, as in multi-PV.
With true Duck Chess it is still a bit more complex. As instead of ducking your opponent's best move(s), you could deny him the right to veto your best move 2 ply later, making many of his moves worse, rather than just supressing his best. I would have to think a little ore about that t o see how this could be handled exactly.
-
- Posts: 9
- Joined: Thu Mar 09, 2006 7:35 pm
Re: Duck Chess
I've played couple of Duck chess games.
Unfortunately what is the worst move in normal chess is the best move is Duck chess.
For example there is Queen capture Knight move and a Bishop can recapture in normal chess,
but in Duck Chess you can place the Duck in the Bishop recapture path.
Unfortunately what is the worst move in normal chess is the best move is Duck chess.
For example there is Queen capture Knight move and a Bishop can recapture in normal chess,
but in Duck Chess you can place the Duck in the Bishop recapture path.
-
- Posts: 965
- Joined: Fri Aug 21, 2020 1:25 am
- Location: Planet Earth, Sol system
- Full name: Michael J Sherwin
Re: Duck Chess
There is one more stratagem that needs to be considered. If one does not want their opponent to block on a square one can place the duck on that square and the opponent will have to move the duck off of that square.hgm wrote: ↑Fri Oct 14, 2022 10:14 pm Very simple variant. The branching ratio is not relevant. There are only about 32 times as many game states as without Duck. So after the first ply all Duck moves will be tranpositions, and only the root has more moves than normal Chess.
But even without TT it would not be hard to search. The only function of the Duck is to prevent the opponent's best move in the next ply. After that it can again be anywhere. So if you do not prevent the opponent's best move with the Duck, you might as well have taken it off the board; he will simply play his best move, and drop the Duck back onto the board.
So you first search the position without Duck, and then assume the Duck has been placed on one of the squares the best move passes through. Rather than just keeping track of the best move, you also keep track of the second best with another piece or in another direction. (In this respect it differs from Veto Chess, where you keep track of the second-best per se.) If the path of that second-best move intersects that of the best, then both can be 'vetoed' by placing the Duck on the intersection, and you would even need the next-best move. Moves that can be 'ducked' would not increase alpha, but as soon as the set of moves that already have received a score cannot be ducked all at once, alpha is increased to the worst that you cannot block.
There is still one complication: you must move the Duck, so you can get in 'duckzwang'. Once you have concluded what the most-annoying location of the Duck is in a certain node, you should communicate that to the parent, and the parent should also consider that you would have placed the Duck there on your previous move, rather than blocking his best. This is only needed if there is exactly a single way to block the best move. If the opponent has multiple ways to block your best move, he will never be in duckzwang. If he has none, it doesn't matter at all where he places the Duck.
So in short: you will not make the Duck part of the game state, but only search the FIDE part, pruning one or more of the best moves in every node.
-
- Posts: 59
- Joined: Fri Oct 25, 2019 7:58 pm
- Full name: Michael Taktikos
Re: Duck Chess
Have implemented a script for "Zillions of games" that plays this,hgm wrote: ↑Fri Oct 14, 2022 10:14 pm Very simple variant. The branching ratio is not relevant...
But even without TT it would not be hard to search. The only function of the Duck is to prevent the opponent's best move in the next ply. After that it can again be anywhere. So if you do not prevent the opponent's best move with the Duck, you might as well have taken it off the board; he will simply play his best move, and drop the Duck back onto the board.
...
There is still one complication: you must move the Duck, so you can get in 'duckzwang'. Once you have concluded what the most-annoying location of the Duck is in a certain node, you should communicate that to the parent, and the parent should also consider that you would have placed the Duck there on your previous move, rather than blocking his best. This is only needed if there is exactly a single way to block the best move. If the opponent has multiple ways to block your best move, he will never be in duckzwang. If he has none, it doesn't matter at all where he places the Duck.
So in short: you will not make the Duck part of the game state, but only search the FIDE part, pruning one or more of the best moves in every node.
https://github.com/mtaktikos/DuckChess
Although your idea, to produce a normal chess game tree and then simply prune away the parts to be vetoed, looks at first glance interesting, I don't agree with it. Because in my implementation there appear sometimes positions where a King runs straight in check and blocks it afterwards with the Duck, so here are produced moves that could not have been produced by a normal chess movegenerator.
_____________________
https://github.com/mtaktikos?tab=repositories
https://github.com/mtaktikos?tab=repositories