Sudoku

That Sudoku last Sunday has bothered me. It took me forever to solve it. Normally I can do a very hard Sudoku in about half an hour. Those are 9×9. The monster one was 16×16 which makes it over three times as large. It wasn’t hard to do, it was just a lot of slogging through looking for the patterns. Patterns that are easy to see on the smaller ones.
But the key here is that it was slogging and not intelligence that was needed.
Last night I whipped up a computer program that could solve it.
It has no user interface, and is really only useful when used in a debugger. But it works. The key to this program is that it doesn’t try to solve the Sudoku all at once. Instead it just tries to find where one number would go and report that to the user. Then it tries to do that again until it solves as much as possible or the user gets bored. I wanted to do it that way so that I could still have the joy of working on a Sudoku and let it give me a hint of where to look for the next number.
I also have the program using an inefficient algorithm to find a number. Instead of going for efficiency I had it trying to replicate the way I try and solve them. Mind you, I only implemented a few of the tricks that I use. That’s because the ones I did use were enough to solve last week’s Sudoku. I know, I used it to once again solve it.
The problem with Sudoku solutions that are given are that they give the end result, but not how to get there.
I think I wrote the program in about the same time it took for me to solve that original Sudoku. So I guess I could have been more efficient last week.
My hope was that I could use this program to make today’s monster Sudoku fun to solve instead of a lot of brainless work. But, after the run (18.5km) this morning, I looked at the newspaper. No monster Sudoku challenge, and I didn’t win last week’s contest. There was just the regular Sunday Sudoku. 9×9, five star rating that took me an enjoyable half hour to solve without using any computer aids.
Not that the program would have helped. A five star rating puzzle needs some intelligence to solve.