August 25, 2012
>
> Congratulations, you have found a compiler bug. I have found maybe one hundred of those. Please minimize the code and submit it to Bugzilla :-)
>

Oh, but try playing around with static and dynamic arrays. You'll be able to find plenty more :p

By changing both squareWidth and squareHeight to 5, we get an optlink crash (those are more rare, aren't they?)

I've made one of my last modifications allowing M x N sudoku's. I think I'm going to place the result on github or something. It was a great experience :)

One last thing would be to try and move generateBitsetCache to CTFE
(if that's even possible).

Anyway, code can be checked out at http://dpaste.dzfl.pl/879b0973 (along with the pretty compiler error at the end).

I'm going to try dustmite out (always wanted to do that) and see if it
can reduce my testcase (no previous experience).
May 26, 2017
On Wednesday, 15 August 2012 at 20:13:10 UTC, Era Scarecrow wrote:
> On Wednesday, 15 August 2012 at 15:39:26 UTC, ixid wrote:
>> Could you supply your code? Which one are you using as the hardest? If you're solving the 1400 second one in 12 seconds that's very impressive, I can't get it below 240 seconds.
>
> Expanded to 225 lines after comments and refactoring for names. I think it should be fairly easy to follow.
>
> https://github.com/rtcvb32/D-Sudoku-Solver

 While an old thread, I decided to try a different approach to sudoku solving. In no way is this better, just a different approach. At 200 lines (needs some heavy unittests added, but appears to work).

 Using a sorting method to solve the puzzle. The idea is to take your puzzle, sort it by weight (how many possible numbers) and only take guesses with the smallest number of combinations possible, meaning any puzzle with 1 solution won't take long. The idea behind this method is to ignore combinations that might never come up; Afterall if you have a block with 2 possibilities, why start brute forcing the one with 7? Fewer wasted cycles. Yes it still uses brute force and built-in backtracking (and also outputs all combinations of a solution).

 Trying the REALLY REALLY hard one from before? (17 numbers) Well... I had it run in the background for a few hours, and got 69,555,823 answers before the output (610Mb compressed, 11,067Mb uncompressed) simply filled up the free space on my ramdrive thus crashing the program.
1 2 3 4 5 6 7 8
Next ›   Last »