Eight queens with all of the chess pieces

Eight queens with all of the chess pieces

The Eight Queens Problem is a classic — can you place eight queens onto a chessboard in such a way that no two queens attack each other? Each queen attacks every piece that shares a rank (row), a file (column), or a diagonal of the 8-by-8 chessboard. It’s a fiendishly tricky puzzle to solve by hand. It has appeared many times in puzzle magazines and math books. I loved playing the interactive version of it it in the fantastic 1994 video game The 7th Guest.

7thGuestQueens.jpg

I’ve seen the 8-rooks version of the problem, as well as versions with bishops and knights in computer programming competitions. This week, I wondered whether it would be possible to place all of the chess pieces onto the board in such a way that no two attack each other. Could a position like that actually happen in a real game?

It turns out that you can place all 16 of the white pieces onto the board like this.

8x8.png

Note that no piece is attacked by any other piece. This is just one of the 19,291,358 solutions, and it looks like there is plenty of space to fit more pieces. Can we use less space?

It turns our that a 7x7 board cannot fit all of the white pieces if we insist on having a light-squared and a dark-squared bishop. What a coincidence that exactly 8x8 is required! If we allow non-square boards, then an 8x6 board will suffice.

8x6.png

But a 6x8 board will not work. This is because I’m not allowing pawns to appear on the first or last rank of the board. That would never happen in a real chess game because pawns start on rank 2, can never move backwards, and get promoted to other pieces when they reach the last rank.

But this is only if we insist on having a light-squared bishop and a dark-squared bishop. Without this restriction, Tomek Czajka found a 7x7 board that fits all 16 pieces. Note the two light-squared bishops. This happens to be the only solution, not counting its mirror images.

7x7.png

Tomek also found a position in which every cell is either empty and under attack, or occupied and not under attack.

8x8all_attacked.png

The next obvious observation is that these arrangements look awfully one-sided. Can we add some black pieces? Here is a position in which every empty square is attacked by both a black and a white piece, but no piece is attacked by any friendly piece. This wacky position obviously cannot ever appear in a real game of chess. But at least we don’t have both kings under check, so the position is valid in that sense. And it is almost symmetric.

8x8BW_all_attacked.png

Can we find a way to place all 32 pieces with no piece under attack by an opposing piece? That’s easy. I’ll leave this one as an exercise for the reader. What about no piece being under attack by any other piece — friendly or otherwise? That turns out to be very difficult. There is not enough space to put all of the 32 chess pieces onto the 8x8 board that way. We can’t even do this if we ignore all of the pawns. For that, we have to go up to 10x10.

10x10no_pawns.png

With the pawns, we have to go up to 13x13, which is the large picture at the top of this page. I mean… I think we have to go up to 13x13. What I know for sure is that 11x11 doesn’t work, at least if we insist on having light-squared and dark-squared bishops. 12x12 is a mystery, although I wouldn’t bet on it having a solution.

2020-04-08 edit: Tomek Czajka found an 11x12 solution that has the additional property of attacking every empty square. Great job!