# Fit the most chess pieces on a board with these rules

Fit the most pieces on a chess board.

• You are only allowed to place Rooks, Knights and Bishops.
• The number of rooks, knights and bishops must be approximately equal (specifically, the number of rooks, knights and bishops must all be either $k$ or $(k+1)$ for some $k$).
• Every piece has to be attacked by exactly one other piece.

I don't know what the answer to this problem is. Highest legit answer wins, internet bonus points if you can prove that you found the optimum.

• You mean the number of each piece may not be more than sum of the numbers of pieces of other two ?(rule #2) Commented Nov 25, 2017 at 12:17
• Sorry, english is not my first language. I mean if you have 3 copies of two pieces, you can have 2, 3, or 4 of the other piece. Maybe you can help me phrase that a bit better. The difference between number of rooks and number of bishops may only be 0 or 1. Same for the other two combination of pieces. Commented Nov 25, 2017 at 12:27
• Maybe: The number of each piece must be within 1 of the number of pieces of each of the other two. Commented Nov 25, 2017 at 14:48
• So if I get this correctly... If I have 2 knights and 3 bishops, I can have 6 rooks? Commented Nov 25, 2017 at 15:08
• The usual assumption in this kind of problems is that all the pieces are the same colour, but can still attack each other. Does this hold here?
– Bass
Commented Nov 26, 2017 at 11:27

POST MORTEM EDIT (well, post-tick, anyway) There was way too much flexibility left in the earlier solution, I just had to keep wiggling everything until I got a bishop on the other long diagonal too. Here it is:

9 knights, 9 bishops and 8 rooks, for a total of 26 pieces.

Please do double check it; I checked it several times already, but wishful thinking often makes it impossible to see one's own mistakes.

POST POST MORTEM EDIT: Here’s a completely different approach with the same result (now with much more symmetry)

9 knights, 9 bishops, 8 rooks = 26 pieces.

This time much easier to confirm: the rooks attack everything except the very corners, nothing else attacks anything, except the corner bishops that attack each other.

The original accepted answer is below the line.

Remorselessly stealing Daniel Duque's incredible solution, which had just enough wiggle room to add another knight:

25 pieces (9 knights, 8 bishops, 8 rooks)

Here's another with the same number of pieces, but with a lot more room for improvement, it seems (I hope there aren't any mistakes, I'm getting pretty cross-eyed here..)

9 knights, 8 bishops, 8 rooks = 25 pieces
(There are lots of promising lookin variations going on in here, please feel free to use this one in your own answer)

Here's my first (original) attempt with

20 pieces: 7 bishops, 7 knights and 6 rooks. (with some wiggle room left in the bottom middle)

Like so:

As you can probably tell, squeezed everything together by starting with a greedy approach with the difficult pieces on the top side.

• Just in case anyone (let's say, someone without enough fake internet points to add a comment) wonders, when I stole the answer, I did move a rook from H5 to F3 to create a legal spot for the extra knight at F1.
– Bass
Commented Nov 27, 2017 at 9:09
• I'll accept this answer as the best one. Nice! Commented Nov 29, 2017 at 10:44
• @Tweakimp Does that mean I can start bruteforcing? :D Commented Dec 1, 2017 at 10:44
• Do it! After the inital confusion with the number of pieces, I thought about changing the rule to equal amount of knights, rooks and bishops. maybe you can start with that problem. :) Commented Dec 1, 2017 at 12:46

Here is my second attempt with:

8 Bishops, 8 Knights and 8 Rooks for a total 24 pieces.

I did it using the following configuration:

$$29$$, obtained via integer linear programming:

$$\begin{matrix}B&B&N&B&N&B&N&R\\.&.&.&R&.&R&.&.\\.&.&R&.&.&.&.&.\\.&N&.&N&.&N&.&N\\R&.&.&.&R&.&.&.\\.&R&.&.&.&.&.&.\\B&B&N&B&N&B&N&B\\.&.&.&R&.&R&.&B\\\end{matrix}$$

$$28$$, obtained via integer linear programming:

$$\begin{matrix}B&.&.&.&R&.&B&.\\.&.&.&N&.&R&B&.\\B&.&.&.&R&.&N&.\\B&N&.&N&.&.&B&R\\N&.&R&.&.&.&N&.\\B&N&.&N&.&.&B&R\\N&.&R&.&.&.&N&.\\.&R&.&R&.&.&B&.\\\end{matrix}$$

$$27$$, obtained via integer linear programming:

$$\begin{matrix}R&N&.&.&B&.&.&N\\N&B&.&.&B&.&R&R\\.&.&.&R&B&.&.&N\\B&.&R&.&N&.&.&B\\.&.&.&.&.&R&.&.\\.&R&.&.&.&.&.&.\\N&N&N&.&.&B&.&B\\R&N&.&.&.&B&.&R\\\end{matrix}$$

• I always get a chuckle when you show up--someone will ask "How did you get your answer?" And subconsciously I'll be like "Duh, ~sorcery~ ILP." It's always cool to see the work of someone who is skilled in something I'm not. It's the same way with @codewarrior0 exhuming all these old cipher posts. Commented Jul 11, 2023 at 15:07

I've managed to fit in

6 rooks, 6 5 knights and 5 bishops (17 16 pieces total)

Using this setup:

It's based on the following principles:

The rooks attack each other, and the other outgoing rays are blocked by other pieces. The bishops also attack each other and are positioned such that they don't attack any other pieces.

EDIT: Had to remove one piece since it was inadvertently attacking another piece, as noted by Ibrahim mahrir.

• The bishop at G4 is attacked by two (the knight at F6 and the rook at G5). Commented Nov 25, 2017 at 20:39
• Thanks for the heads up! I fixed it now, at the expense of one piece. Commented Nov 25, 2017 at 20:46

Here is my solution using:

6 Bishops, 6 Knights, 5 rooks.

In the following configuration:

And here is an improvement to the solution given by Lolgast. I was able to add:

One Knight in (A,4).

• >! for spoilerless quotes. Commented Nov 25, 2017 at 23:02
• Here is the whole guide. Commented Nov 25, 2017 at 23:05

To start off the discussion, here is a solution with:

5 knights, 5 bishops and 4 rooks

If i understood the 3rd rule correctly

Every piece has to be attacked by exactly one other piece.

the solution must be

the answer must be 12 = 4bishopes + 4knights +4rooks

the solution image look like exactaly one piece is to be attacked by other and there are a number of ways you can rearrange the solution

if you putting more any three of them(bishope, rooks, knights) then it would not fit into the solution because it attacks more than one piece on the board or increase the number of attacks by other pieces on the board both of them violates the 3rd rule like this image below:-

• Just because your solution doesn't allow any more pieces to be added (Note: You actually could add a knight on a3 and a bishop on h2), that doesn't mean your solution is the solution. I'd suggest taking a look at the other answers - They adhere to the 3rd rule as well. EDIT: The 3rd rule only specifies that every piece can be attacked by only one piece, not that it can only attack one piece. Commented Nov 27, 2017 at 10:55
• @Loglast i have taken a closer look at the solutions submitted by others either they are not attacking or they are attacking more than 1 and the rule number 3 says it has to attack one no more no less Commented Nov 27, 2017 at 10:58
• 3rd rule says that each piece has to be attacked once, and only once. It has nothing to do with how many other pieces each piece attacks as long as it is attacked only once. It is a fun game; I'll give it a third try tonight when I get home. Commented Nov 27, 2017 at 11:15