5 kyu

Sudoku Strategies - Hidden Single

22 of 47dfhwze
Description
Loading description...
Puzzles
Algorithms
Game Solvers
Set Theory
  • Please sign in or sign up to leave a comment.
  • BachMcCann Avatar

    For your Test #11 (refer to the grid below), I received the following error message: "r2c2=1 is not a valid hidden single: expected false to be true". Can you please explain why this is not a valid hidden single? If you look at the upper left 3x3 block, the middle field in the second row cannot contain a 2 (in the same 3x3 block), a 3 (in the same 3x3 block, a 4 (in the same column), a 5 (in the same 3x3 block), a 6 (in the same column), a 7 (in the same row), an 8 (in the same row), or a 9 (in the same 3x3) block. For that reason, the value of r2c2 can only contain a 1. Thanks in advance for your feedback.

    2 5 8 | . . . | . . .

    . . . | 5 8 . | . 7 .

    3 . 9 | . 4 . | . . .

    ------+-------+------

    . . . | . . . | . . .

    . 6 . | . . . | . . .

    . . . | . . . | . . .

    ------+-------+------

    . 4 6 | . . . | . . .

    . . . | . . . | . . .

    . . . | . . . | . . .

    • dfhwze Avatar

      let's first format this

      2 5 8 | . . . | . . .
      
      . . . | 5 8 . | . 7 .
      
      3 . 9 | . 4 . | . . .
      
      ------+-------+------
      
      . . . | . . . | . . .
      
      . 6 . | . . . | . . .
      
      . . . | . . . | . . .
      
      ------+-------+------
      
      . 4 6 | . . . | . . .
      
      . . . | . . . | . . .
      
      . . . | . . . | . . .
      
    • dfhwze Avatar

      You found a "Naked Single", not a "Hidden Single". You found a cell with only 1 remaining candidate. Instead, you should be looking for candidates with 1 remaining cell in any given group.

    • BachMcCann Avatar

      Thank you for the clarification

  • Kees de Vreugd Avatar

    I hope more people will solve this thing. This deserves to be published.

    • dfhwze Avatar

      Thanks, I'm not sure I'll continue the series beyond these two strategies aimed at beginners. More advanced strategies are likely to remain in beta for ages ;)

    • jpssj Avatar

      Someone can approve it right now. I hope there'll be new ones in the series.

    • Kees de Vreugd Avatar

      Approved. With some reluctance set the difficulty to five, since this was the average rating. I think it's a 4kyu, but who am I to disrespect public opinion?

      No excuses for mr dfhwze.

      The only other strategy I know is the X-wing, so I suggest you start working. ;-)

    • dfhwze Avatar

      Thanks, here's the next one. An intermezzo, before moving to the harder strategies.

    • dfhwze Avatar

      I made some slight changes to that one. You may want to hit the "reset" button before continueing.

  • Voile Avatar

    The error message when a incorrect answer is returned is unhelpful:

    Incorrect answer: expected false to be true
    

    At least it should say something like r5c4=7 is not a naked single. (rncn=x means "fill X at this cell", and rncn<>x means "remove X from candidates list of this cell". k9 notation would work too, but rncn is more commonly used)

    • dfhwze Avatar

      Good idea. For Sudoku players, this is usually 1-based, but as programmers we return indices 0-based. I think the least confusing thing to do is use 0-based indices (e.g. r0c8=1 instead of r1c9=1). Would you agree?

    • Voile Avatar

      No, because both rncn and k9 are explicitly defined to be 1-based. Using 0-based indices would be a incorrect usage of the notation, which is worse than not using the notation in the first place.

      If you want to use 0-based indices, you'll need to avoid existing notations so others are not confused by your usage.

    • dfhwze Avatar

      Ok, but then I should mention this notation in the description. EDIT: updated

    • dfhwze Avatar

      solved (for both kata's)

      Issue marked resolved by dfhwze 13 months ago