This video shows the code I wrote in Matlab to construct 9x9 Sudoku puzzles. Since random forests are utilized, each puzzle is unique and adhere to the rules of the game. The final step is to select the number of blanks for the puzzle and that number of cells is then randomly deleted.
The generator can, given enough computing power and time, generate puzzles that are larger than the standard 9x9.