General attacking chessboard squares

This is a general version of this beautiful puzzle.

Place any number of standard chess pieces on a 8x8 chessboard, such that there is at least 1 empty square attacked by exactly 1 piece, at least 1 empty square attacked by exactly 2 pieces, ..., at least 1 empty square attacked by exactly $$N$$ pieces. What is the largest value of $$N$$ you can obtain? We have already seen that $$N=6$$ is possible, but can we do better?

Note I am also interested in the version of this puzzle where we include at least 1 empty square that is not attacked by any piece.

UPDATE:

0 - 15

I'll start the bidding with

0 - 14

Here are the counts for all empty squares. These were hand counted so there is a residual chance of error.

     0  .  4  .  3  .  2  .
.  .  .  .  .  .  .  .
.  . 14  . 13  2 10  .
.  9  .  .  .  .  .  .
.  .  7  .  8  .  4  .
.  7  2  .  3  .  .  .
4  . 12  2 11  .  6  1
.  .  .  .  .  5  .  .


• +1 rot13( Guvf vf bcgvzny, be ng yrnfg pybfr gb bcgvzny, fvapr na rzcgl fdhner pna or nggnpxrq ol ng zbfg fvkgrra cvrprf. ) Commented Mar 9 at 6:29
• 15 is optimal. I show that 16 is impossible: youtube.com/watch?v=i7ZkqoDVuEg Commented Mar 9 at 21:37

Via integer linear programming, as in https://puzzling.stackexchange.com/a/102587/65277, here's another $$8\times 8$$, with

exactly one each of 0-15: $$\begin{matrix}&B&N&Q&N&N&Q&B&N\\&N&9&R&Q&N&10&N&N\\&B&K&15&N&7&6&K&N\\&N&Q&R&8&N&14&Q&R\\&B&N&11&N&Q&5&B&N\\&2&Q&4&K&N&13&0&N\\&R&R&12&N&P&3&B&N\\&N&Q&R&K&N&R&N&1\\\end{matrix}$$

And another $$9\times 9$$, with

exactly one each of 0-16: $$\begin{matrix}&Q&N&B&N&B&N&B&N&P\\&N&N&0&P&N&9&R&B&N\\&B&N&B&N&B&K&15&2&R\\&N&Q&Q&12&4&11&5&Q&N\\&Q&N&14&K&7&N&Q&N&Q\\&N&8&K&10&N&B&3&6&N\\&B&N&13&N&Q&K&16&1&R\\&N&Q&Q&B&N&Q&R&B&N\\&Q&N&R&N&N&N&Q&N&Q\\\end{matrix}$$

Here is a solution for $$N=8$$:

where the numbers (0 through 8) indicate how many knights attack that square.

• Nice! I like the use of just one piece type. We could have solutions for each piece type. Although some pieces would be a little boring. Commented Mar 9 at 12:53

Some exotic solutions

0-16 is possible on a 9x9 board

0-8 with queens on a 6x6 board

0-8 with knights on a 6x6 board

0-8 with kings on a 5x5 board is equivalent to my old Minesweeper puzzle

• These are optimal, and the remaining optimal results are rooks: 0-4, bishops: 0-4, pawns: 0-2. Commented Mar 10 at 3:41

Here's another nice variant:

Each of 0-15 occurring exactly once:

Found with a SAT solver.