3
donuts
6y

How do I solve this board without guessing? Always get stuck on these and what the pattern to look for is.

Comments
  • 1
    I think if you'd set one of the boxes with any possible number you'll find a solution.
  • 0
    Depth first search! Starting from the ones with the lowest number of choices.

    GitHub.com/pshah123/sudoku-solver

    Modified DFS = 45ms solve time
  • 0
    You can fill in some more without guessing though, tell me if you dont want to continue looking
  • 0
    @Codex404 that's what I wanted to know.

    DFS, Trial and Error is what I want to avoid. That's what I usually do but want to know if there if there is a way to see the answer from just this board state.
  • 1
    I most of the time try to pattern guess this. Looking at A5 and A6 and G2 and G3 who all have 2 and 8. So they have to be reverse of eachother. The tricky thing is the extra ones. As you can see there is one outlier that is G3 wich also can contain a 5. I most of the time try that. It worked 70% of the time
  • 0
    @resdac D1 can be filled without a doubt using, with that you can fill in the complete sudoku without making a guess or bruteforce
  • 0
    @Codex404 ? It's either 2 or 8, which one. How you know?
  • 0
    @billgates difficult to explain if you dont see it. You need to think about 6 steps ahead. I saw it within a minute after checking the thing for mistakes. If you dont see it right away then you might need to guess and fill things in and try the opposite if it doesnt work.

    But for the A fields it doesnt matter which is two and which is 8 to find out the D1 field.
  • 0
  • 0
    Well I modified my app so it tracks the cells that it had to guess on.

    I was unlucky bc the boards i first tested could all be solved via Elimination so didnt guess... then remembered i could just input this one.

    And apparently these were the cells it had to guess on...
  • 0
    @billgates and I finished it without guessing, are you sure your logic checks all
  • 1
    @Codex404 pretty sure. But only looks for 1 digit. Doesn't look for board patterns involving multiple cells
  • 1
    Also you said you need to look ahead which is basically what this app does. If it doesn't work, it back tracks.
Add Comment