Unofficial Hacker News companion — get notified on comment replies, and more.

Sudoku's Hidden Rule (opens external site)

478 points by multifasciatus 1 day ago | cyrusjavan.com | 213 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (10)

  1. Is it even possible to avoid guess and check? In every sudoku puzzle I come across, besides very easy puzzles, there comes a point where I have to guess and check. It's why I gave up on doing sudoku, because that is just tedious and not at all fun.
    Replies (4)
    1. I used to do hard ones and never had to guess and check, following rules only. Maybe you missed a trick or two?
      Replies (1)
      1. It's often also a difference between proper made sudokus and some bad ones you can find in a random magazine. The proper ones have an intended way of solving and deductions.
    2. It is usually never required... depending on how pedantic you want to be about what constitutes a guess and check. Some deductions do require following through multiple consequential steps.
      Replies (1)
      1. For me the difference comes down to two criteria:

        1. there's no clear/obvious logical step/steps -- e.g. identifying hidden pairs, X/Y wings, or other patterns;

        2. the chain of logic goes above ~3-4 moves where you can't easily keep the state in your head and/or clearly annotate on the grid, so have to effectively play the move assuming it's correct and have to backtrack if that assumption is wrong.

    3. Basically, at every point in a well-designed puzzle you should be able to make a non-random choice. If you're an amateur solver, you might not be aware of all of the solving tricks and might think that if you have iteratively identified all singles you are forced to blindly guess, test and backtrack.

      An X-Wing is a common technique, and similar to the examples in the OP. When you have four cells that form a rectangle that can only be 2 or 5, for example, you can exclude 2 and 5 from all other cells in the rows and columns these cells belong to.

      Replies (1)
      1. Thanks, that is helpful. I had never even heard of the existence of sudoku solving techniques, so I guess the issue here is a lack of knowledge on my part.
        Replies (1)
        1. A site like https://sudoku.coach/en/learn goes through many of the non-trivial techniques.
          Replies (1)
          1. And you really don't need to go past Swordfish (which is just really an X-wing extended past 2x2), and maybe Y-wing.

            Pretty much everything beyond those are a combination or slight extension of things before it.

            SET Theory is maybe the only other thing worth mentioning, but this will basically only come up in constructed puzzles and it'll be heavily telegraphed by geometry (that is, all of the known digits will form a nice geometry pattern). Had a big moment 3-4 years ago, but got played out fairly quickly.

            https://crackingthecryptic.fandom.com/wiki/Set_Equivalence_T...

            https://www.youtube.com/watch?v=pezlnN4X52g (the Phistomephel Ring was the first discovery of it, but it can be extended to any other geometry by the same logic)

    4. ksudoku will say if you need to guess (and after how many moves) and you can generate a new puzzle if so. At least hard difficulty (with random symmetry) usually does not require guessing so it is easy to try again if one does. Above that it is at leat not easy to get one without guessing and I'm not sure if it is possible.

      https://apps.kde.org/ksudoku/

      It seems to me that guessing isn't fundamentally different from other techniques other than requiring more memory than humans can easily manage :/.