Chess puzzle I found in my dad's old book

(ardoedo.it)

49 points | by Eswo 2 days ago

6 comments

  • dllu 1 hour ago
    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: https://gist.github.com/dllu/698d5f71b2b9735c5c462ddf4a2f6fc...

    Here's how it works:

    0. precompute the attack patterns of each possible queen/bishop location as a bitmask, stored as an integer

    1. generate candidate solutions, allowing attack rays to pass through other pieces, by brute forcing the positions of the 5 pieces and taking the bitwise OR of their attacks

    2. out of the candidate solutions, check which ones are actually valid taking into account occlusion. Actually, you only need to check if the queen's horizontal attack is blocked by the bishop, as queens cannot block each other (the blocking queen herself has the same attacks so they effectively pass through each other).

  • tromp 1 hour ago
    > 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 queen.

    • jhncls 20 minutes ago
      Although unlikely, maybe there exists a solution where all black pieces are protected?
  • tantalor 2 hours ago
    Really nice but I wish I didn't have to click "Check" every time after moving the pieces. It could do that automatically.
  • wrqvrwvq 34 minutes ago
    fun demo. could be a daily puzzle combining various commenter suggestions. There are (didn't verify personally) 388 solutions. The daily puzzle could remove 1+ pieces and ask for a 1+ move guess.

    Also a click on a square could auto place a queen and a second click would swap to the bishop. Every click could auto-check.

    A separate discovery mode could start blocking out the squares visually as you place pieces. For a lot of people, that would be easier than the mental representation.

  • ra0x3 1 hour ago
    Wait, the instructions are a little ambiguous. I clicked "Solution" and it has the dark-squared bishop on a white square! XD

    Should maybe update the instructions to clarify that the dark-squared bishop is not constrained to dark squares.

    • dwa3592 15 minutes ago
      that's exactly what happened to me. I ended up spending so much time thinking black bishop can only go to black squares. and agreed this is a bit ambiguous.
    • loganc2342 1 hour ago
      It's a black bishop, but not necessarily a dark-squared bishop. Both the black side and white side in a normal chess game get a dark-squared and a light-squared bishop, and I don't see anywhere that specifies which type this one is. It can be either one depending on where you place it.
    • danbrooks 1 hour ago
      The instructions likely mean that the bishop itself is black, not the square that it is on.
  • c4kar 1 hour ago
    That was an experience. Thank you