Got this puzzle from a colleague.
Place the usual 32 black and white chess pieces on an 8x8 board so as to maximize the total number of attacks. The position does not have to be a legal chess position (so for example, it’s fine for both kings to be in check).
Any piece can be placed in any unoccupied square (including pawns on ranks they could not normally occupy). The position is not considered to have any history, so special rules like en passant captures do not apply. Pieces all have a value of 1 for this puzzle.
You might find the following resources useful:
- https://en.wikipedia.org/wiki/Rules_of_chess#Basic_moves
- https://python-chess.readthedocs.io/en/latest/
- https://python-chess.readthedocs.io/en/latest/svg.html for rendering boards like the example above
- https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation for sharing solutions