Live data from Hacker News

Chess puzzle I found in my dad's old book

ardoedo.it

71–79 of 79 posts

Re: Chess puzzle I found in my dad's old book

#74
post #70

Earlier quoted context omitted.

What's the logic for putting the initial queen in a corner rather than using the same heuristic as for the remaining places?

I was wondering that too. One would think that with a greedy approach, 1 square diagonally from the corner would be better. (But that doesn't work as well.)

Idk but here’s more reading https://en.wikipedia.org/wiki/Mathematical_chess_problem#Dom...

Re: Chess puzzle I found in my dad's old book

#75
post #56
post #3

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…

Even more fun facts: if you change the problem instead to 4 queens and one knight, there is exactly one solution up to symmetries (rotations and flipping). Here it is:

    ..N.....
    ........
    ........
    ....Q...
    .....Q..
    ...Q....
    ......Q.
    ........
Edit: even more fun facts: if we take the standard piece values of Q=9, R=5, B/N=3, then we can ask for the smallest piece budget that attacks every square. The cheapest possible configuration is 24 points, you can see one with 8 bishops:

    ........
    ....B...
    ....B...
    .B......
    ...B.B..
    .....B..
    ..B.....
    ....B...
Which has pleasing symmetry when you view it as a composition of light-square bishops and dark-square bishops.

Re: Chess puzzle I found in my dad's old book

#76
post #74
post #70

Earlier quoted context omitted.

I was wondering that too. One would think that with a greedy approach, 1 square diagonally from the corner would be better. (But that doesn't work as well.)

Idk but here’s more reading https://en.wikipedia.org/wiki/Mathematical_chess_problem#Dom...

The only ones of these I've tried before (on an old 8-bit computer, where the challenge was to keep runtime acceptable) are the knight's tour and the 8-queens "independence" (no co-attacking) problems.

For the knight's tour all you need is a simple heuristic, consistently applied, of doing the hardest bits first - visiting the next square that has fewest remaining squares that lead to it, meaning that you start in a corner. This is what has me wondering about the puzzle/heuristic being discussed where the first placement is using a different heuristic.

On a slow computer the trick to a fast 8-queens solution is to recognize that a minimal constraint is that the queens need to all be on different rows and columns, so you can start by using an efficient permutation algorithm to generate permutations of {1, 2, .. 8} (corresponding to column placement of queen on n'th row), then just check the diagonals of this reasonable number of candidates.

Re: Chess puzzle I found in my dad's old book

#77
post #3

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…

yeah i had that same intuition and then realized that you _have_ to have pieces that overlap responsibility to fully “cover”. amazing puzzle. i can’t claim i solved it, because i didn’t, but i did give it 15 minutes of focused time, which is pretty good.

Re: Chess puzzle I found in my dad's old book

#78
post #56

Earlier quoted context omitted.

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…

Even more fun facts: if you change the problem instead to 4 queens and one knight , there is exactly one solution up to symmetries (rotations and flipping). Here it is: ..N..... ........ ........ ....Q... .....Q.. ...Q.... ......Q. ........ Edit: even more fun facts: if we take the standard piece values of Q=9, R=5, B/N=3, then we can ask for the smallest piece budget that attacks every square. The cheapest possible…

wow. oddly that seems like an easier problem, despite the solution space being smaller. not saying i woulda solved that, because i doubt it, but it’s much closer to what my raw intuition woulda spit out as a solutuon to the OG problem.

Re: Chess puzzle I found in my dad's old book

#79
post #31

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.

Yes! This is the strategy that worked for me as well.
Post reply on HN