On a Chessboard, place as many chess pieces as you can.
Position the center of each piece on the center of a square.
Avoid placing any 4 pieces at the corners of a square (even a tilted square).
How many pieces can you place?
On a Chessboard, place as many chess pieces as you can.
Position the center of each piece on the center of a square.
Avoid placing any 4 pieces at the corners of a square (even a tilted square).
How many pieces can you place?
I found a solution with 34 generated with some code I wrote. But as the comments mention - this problem is tough to find solutions to and just as hard to verify a given solution. The code I wrote does not to solve for all possibilities so it is still possible that this is not optimum (or correct!).
Text Based:
O O O O O * O O * O * O * O O * O * * * * * O O O * * * O O O * O * * O * O * * O * * O * O O O O O * * * * * * * O O O O * O O
Edit: Original upload had 31. Putting a little bit of a random into the code I got a result with 34. I've replaced the 31 solution with the 34.
(a, b)
is down a
over b
. That might be a better way to say it.
$\endgroup$
Me and two friends solved the problem using a backtracking algorithm with a lot of pruning. You can find the code we used on my GitHub. The computation considered 4096834073 states in a little less than 10 minutes. We made heavy use of symmetrical, geometrical and constraint-driven properties to limit the number of states.
As Scott showed, at least 34 pieces could be placed on the chessboard without forming any squares. Our exhaustive search proves (assuming the code is correct) this is the maximum.
A solution with 35 pieces:
XXXXXXXX X.X.X..X X.....XX XX.....X X.....XX XX.....X X..X.X.X XXXXXXX.
Shown above the no upright square solution with 35 pieces. And the no. of possible squares.