Google Video Redone… Update: Sudoku
Aug 14

So last night I got this bright idea to create my own Sudoku generator. The first iteration it randomly generated the first row and for each row after that it kept generating random arrays until they fit. This worked for some cases but failed more times that not. In addition processing time became an issue.

I then tried to create the puzzles using a brute force methodology. This worked but I noticed that some 3×3 sections were not correct or had repeating numbers.

Finally, I created a loop and a method that seemed to work. There were however occasions (not sure why I think it has to do with some inconsistencies in PHP) where it would fail. So, I built a simple row check that told the program to re-run itself when it failed. The result a simple PHP class that generates Sudoku puzzles in record time. It uses recursion to eliminate certain rows combinations.

I’ve posted the puzzle page for printing… I’m working on a web based puzzle version. I also posted a debug version that shows the algorithm step by step… the max number of re-runs I’ve seen is five if your playing with it and see more than that I would love to know.

Enjoy…

Sudoku Puzzle Generator

Leave a Reply

Evil under the sun download movie The ministers download movie Twister download movie Evil under the sun download movie The ministers download movie Twister download movie Twister download movie 42nd street download movie Jaws 2 download movie The hunt for eagle one download movie Picnic download movie Murder at 1600 download movie The haunting of sorority row aka deadly pledge download movie The exorcist download movie