# 3 Colors of Chess Pieces Attacking Each Other Once Each

Yes, it's another "Chess Pieces Attacking Each Other" puzzle. This time we have 3 colors. Your goal is to place as many of the same type of chess piece (excluding pawns since you can't define the "forward" direction for 3 players) as possible onto an 8x8 board in 3 colors such that each piece attacks exactly 1 piece from each of the other colors. Pieces may attack any number of their own color, these are ignored. Note that there will necessarily be the same number of each color in every solution.

I have come up with a number of potentially optimal solutions (by hand, not verified by computer). The number of pieces for each is hidden in the following hint. Don't look if you'd rather see how many you can get on your own without knowing where the lower bar is, though I suspect that there is room for improvement on some of these.

Bishops: 14 each
Knights: 10 each
Rooks: 20 each (fairly certain this is optimal)
Queens: 6 each
Kings: 12 each

• By the way we can also ask for 4 colors (I have some solutions already). Also we can ask about attacking 2 opponent pieces and so on. – Dmitry Kamenetsky Mar 26 '20 at 12:36
• @DmitryKamenetsky I have (I believe) optimal solutions for Knights and Kings in 4 colors, but they're pretty much identical to some of the 1- or 2- color solutions, so not very interesting. 4-color Queens might be worth a look. Attacking 2 of each other color may be possible for Knights/Queens/Kings, but 3+ would definitely not be (unless there's only 2 colors, which we already did). Another variation of this would be if you either forbid or require pieces attacking 1 of their own color. – Darrel Hoffman Mar 26 '20 at 13:28
• I've posted the 4-color queens question here: puzzling.stackexchange.com/questions/95374/… – Dmitry Kamenetsky Mar 27 '20 at 8:18

Bishops

16 each

 . A . A A . A .
B A . C C . A B
C . B C C B . C
B B C B B C B B
A C B A A B C A
. C A A A A C .
. B C A A C B .
. . C B B C . .

Knights

12 each

 A B C . . C B A
A B C . . C B A
C B A . . A B C
C B A . . A B C
. . . . . . . .
B . . A A . . B
. . C C C C . .
. A B . . B A .

Rooks

18 each

 A B B A C C A B
C C C A B B A C
B A . A B B A C
B A C C C C A B
C A B B A . A B
C A B B A C C C
B A C C A B B A
. . . . . . . .

Queens

8 each

 A . B . . B . A
C . C . . C . C
B . A . . A . B
. . . . . . . .
. . . . . . . .
B . A . . A . B
C . C . . C . C
A . B . . B . A

Kings

12 each

 . A B C A B C .
C . . . . . . A
B . A B B A . B
A . C . . C . C
C . C . . C . A
B . A B B A . B
A . . . . . . C
. C B A C B A .

• Nice, you squeezed a few more bishops and queens than I was able to. My kings solution is a completely different arrangement, but same number so this is valid. – Darrel Hoffman Mar 21 '20 at 23:12
• @Darrel Those knights were challenging. Solutions with 8 each were easy, but I was not able to get 10. Then suddenly... – Daniel Mathias Mar 22 '20 at 1:37
• Your knights solution is almost the same as mine, actually, at least the top half is. But you managed to squeeze in two more on the bottom, so congrats again. If you can beat my 20 rook solution I'll be really impressed. (21 is the theoretical maximum, but I'm pretty sure that's impossible? Might be proven wrong again though...) – Darrel Hoffman Mar 22 '20 at 2:38
• @Darrel I've added a solution for rooks. Only 18 each, buy I probably won't spend much more time on it. – Daniel Mathias Mar 22 '20 at 18:24
• Hmm, so should I wait a bit before posting my rook solution? You'll probably get the checkmark of course, since you solved 4/5 of them, in 3 cases better than mine, so unless someone finds even better solutions, it's yours, but if I close it now it might discourage others from trying. Maybe I'll give it another day or so. – Darrel Hoffman Mar 22 '20 at 19:40

Via integer linear programming, the maximum for knights is

The maximum for queens is at least

Other maxima are

20 rooks, 16 bishops, 12 kings

• Ooh, that Queens solution is funky. You expect to see some sort of symmetry on most of these and then boom, total random mess, but it works. Not sure what to do with the checkmark at this point since the answers are pretty evenly split... – Darrel Hoffman Mar 25 '20 at 3:12

Here are my own solutions I put together. With the exception of the Rooks solution, they have already been equaled or surpassed by Daniel's answer, so I'm just posting them for comparison.

Bishops:

14 of each can fit:

 . B . A . C . .      . B A A B C C .
A . C . B . A .     A B C C B A A B
. C . . . . . B     . C C . . . A B
. . B . . . . .     . . B A . C . .
. . . A . C . .     . . B A . C . .
. . C . . . A .     . C C . . . A B
. B . C . A . B     A B C C B A A B
. . A . B . C .     . B A A B C C .
Just one color       Both together

Rooks:

20 of each can fit:

 C B B C C B B C
A A A A A A A A
B C C B B C C B
B C C B B C C B
A A A A A A A A
C . . C C . . C
B B B B B B B B
A C C A A C C A

Knights:

10 of each can fit:

 A C B . . B C A
A C B . . B C A
B C A . . A C B
B C A . . A C B
. . . . . . . .
. . . A A . . .
. . C . . C . .
. . . B B . . .

Queens:

6 of each can fit:

 A B . . B A . .
C . . . . C . .
C . . . . C . .
A B . . B A . .
. . . . . . . .
A . . . . . . .
. . . . B . . .
B . C C A . . .

Kings:

12 of each can fit:

 A B B A . A B .
C . . C . C . B
C . . C . . C A
A B B A . . . .
. . . . A C C A
A B . . B . . B
C . B . B . . B
. C A . A C C A

I have improved the queens solution

9 Queens each!

 3 . 2 . . 2 3 3
3 . . . . . . .
2 1 1 . . . . .
. . 1 1 1 2 . 2
. 1 . 1 . . . 1
2 . . . . 2 . .
. . 3 . . . . .
2 3 3 . 1 2 3 3


or


3 . . 1 . 1 . 3
2 . . 1 1 . . 2
2 2 . . . . 2 2
. . . . 3 . . 2
. . 3 3 3 . . .
1 . 3 3 3 . . 1
1 . . . . . 1 .
2 . . 2 . 1 . .


some more


1..2.2.1
3..22..3
33....33
...11...
2..11.2.
2.111...
3......3
3..2..2.

..1.33.2
3...33..
..22..11
1222..1.
..22....
1......1
..113...
33...3.2

3..2...2
1..2....
.1....11
1..33..1
.13333..
...33...
22....22
.2.11.2.


• Oops looks like I was beaten to this. – Dmitry Kamenetsky Mar 26 '20 at 12:33
• It's alright, these are interesting too - strange that all of the 9-queen solutions are all just an asymmetrical mess. I wonder if there's one with a nice pattern like the others? (I know there's only 1 symmetrical solution to the old 8 colorless queens problem, excluding rotations/reflections.) – Darrel Hoffman Mar 26 '20 at 13:20
• I don't yet know that 9 is optimal, so there might still be an opportunity to improve this. – RobPratt Mar 26 '20 at 13:40
• @DarrelHoffman, if you require 180-degree rotational symmetry in the occupancy pattern (ignoring colors), 8 is optimal. – RobPratt Mar 26 '20 at 15:56
• @RobPratt No, it's not required, I was just curious as to why everything else can be managed with some symmetry except for the queens. It's certainly mathematically interesting that a symmetrical solution does not appear to exist. – Darrel Hoffman Mar 26 '20 at 16:13