This is an interesting test for LLMs. - ChatGPT was able to solve it in 6 seconds. - Opus exhausted my entire days token limit on the problem & didn’t solve it.
Is it? Or has ChatGPT read the answer before.
You just want the answer.
61–70 of 79 posts
> The task is to place four black queens and one black bishop on the chessboard so that there is no square not under their attack. In other words, after arranging the five black pieces, it must be impossible to place the white king anywhere without it being in checkmate. That last word should be "check". not "checkmate". A king next to an unprotected queen will be in check but not checkmate as it can capture the quee…
well there are all sorts of irregularities in the stated puzzle, since you cannot move into check or checkmate it follows that you should not be able to place it on the board and have it be in those conditions. However let us suppose that you can place it on the board and have it be in either check or checkmate. If it has been placed on the board and it is in check, since it cannot move into check it follows that it…
I don’t see why that would be uninteresting. Before analyzing this, it isn’t clear that there is no way to place four black queens and a black bishop on the board in such a way that they attack all blank squares _and_ defend each other against capture.
If that were the case, the puzzle where you have to find a setup where you cannot place a king on the board without it being in check is easier than the one where you have to find a setup where you cannot place a king on the board without it being in checkmate.
Also, if you interpret the puzzle description in the latter way (and that, I think, is the most natural way to do it), it seems the puzzle doesn’t have a solution (https://news.ycombinator.com/item?id=48129115)], so do you think this puzzle is not very interesting?
Neat. Surprisingly, there are 388 solutions, and a lot of them look rather unintuitive. ........ ...Q.... ........ ........ .....Q.. ........ ........ Q..B..Q. Q....... ........ ........ ........ ..QQB..Q ........ ........ ........ My original intuition was to place the queens on unique rows and columns to cover as much as possible but it turns out there are solutions with three of them on the same row. Python script…
const solution = {
a8: "b1",
b8: "q1",
f7: "q2",
a4: "q3",
e3: "q4"
};
It would be cool if it randomly selected one of those 388, so you could click repeatedly and develop an intuition for what kinds of distributions were a valid solution.Neat. Surprisingly, there are 388 solutions, and a lot of them look rather unintuitive. ........ ...Q.... ........ ........ .....Q.. ........ ........ Q..B..Q. Q....... ........ ........ ........ ..QQB..Q ........ ........ ........ My original intuition was to place the queens on unique rows and columns to cover as much as possible but it turns out there are solutions with three of them on the same row. Python script…
It's a bit disappointing, then, that the page's action on clicking the "solution" button is just to set the pieces to: const solution = { a8: "b1", b8: "q1", f7: "q2", a4: "q3", e3: "q4" }; It would be cool if it randomly selected one of those 388, so you could click repeatedly and develop an intuition for what kinds of distributions were a valid solution.
this is the kind of HN post i come here for.
Bonus problem: find an arrangement of 4 queens on the board such that:
1. There is exactly 1 square on which a bishop can be placed, such that the 4 queens and the bishop attack all unoccupied squares
AND
2. There is exactly 1 square on which a rook can be placed, such that the 4 queens and the rook attack all unoccupied squares
Amazingly, modulo rotation / reflection, this problem has exactly 1 solution.
Neat. Surprisingly, there are 388 solutions, and a lot of them look rather unintuitive. ........ ...Q.... ........ ........ .....Q.. ........ ........ Q..B..Q. Q....... ........ ........ ........ ..QQB..Q ........ ........ ........ My original intuition was to place the queens on unique rows and columns to cover as much as possible but it turns out there are solutions with three of them on the same row. Python script…
More fun facts: After identifying solutions up to rotation and reflection there are only 49 solutions. No solutions have rotational symmetry, and there is exactly one solution with reflection symmetry (already mentioned by an earlier commenter). Out of the 49 solution classes, there are 18 distinct queen layouts. The layouts have between 1 and 5 ways to place the bishop to complete the solution. Interestingly, there…
The trick for me was to place a queen (most anywhere, but start with a corner it’s easier), then check and look for the spot with the most reds around it (eg 9, or 8, or 7), place the next queen there, repeat. Then place the bishop as needed. The key was realizing the proximal spaces next to the placed queen are the most important to cover. Forget about trying to have a long reach, it comes naturally.
What's the logic for putting the initial queen in a corner rather than using the same heuristic as for the remaining places?