Slash Boxes

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 16 submissions in the queue.
posted by LaminatorX on Wednesday July 02 2014, @12:34PM   Printer-friendly
from the Which-Door-would-He-Suggest? dept.

Computational nanoscientist Surendra Jain has written solvers for Sudoku, Killer Sudoku, Samurai Sudoku, Calcudoku, Kakuro and many other logic problems.

All are elegantly coded and very fast: for example, the "World's Hardest Sudoku" is solved in 0.05 seconds (on a 5 year old PC) and his Knight's Tour solver is an order of magnitude faster than this one.

The page (called "Classical Geek") has all source (in Fortran 90, one of the most popular languages in high-performance computing) as well as compilation and running instructions.

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Wednesday July 02 2014, @06:41PM

    by Anonymous Coward on Wednesday July 02 2014, @06:41PM (#63189)

    I made myself a generic Sudoku solver in python (used a sudoku class that did solutions, and you could inherit to change the rules to things like X-sudoku for instance). I used the "Crosshatching", and "Pencilling in" techniques in a 'simple solver' loop, once that failed, I switched to the "pairs" method (actually generalized so I started looking for pairs, then trios, etc.

    Once, the simple method and the pairing methods failed, I switched to brute force for the rest (find a square with 2 choices, create a copy of the board with one of those choices, and try to solve using the previous methods).

    With that program all the effort was in inputting the individual puzzles, running the program was basically instant. I haven't come across a puzzle this solver couldn't handle (other than those sumdokus, or any puzzle with shapes that change from puzzle to puzzle, as those would require me to write a parser that would modify the 'rules' as well as the board, which I just haven't bothered to do).