I was wondering if there was a more efficient way of generating sudoku puzzles.(adsbygoogle = window.adsbygoogle || []).push({});

I already have a method to create puzzles of varying difficulties that goes something like this:

- Randomly generate a completed 9x9 solved sudoku

- Randomly remove some of the numbers from the matrix (as determined by the desired difficulty; more difficult means more are removed)

- Solve the puzzle using a logic method

- If more complex logic is needed to solve the puzzle, assign higher difficulty values

- If the final difficulty value is within the desired range, then the puzzle is good

- Else, start over.

This works, but is there a better way to more efficiently generate sudoku puzzles based on difficulty? I am trying to develop an algorithm that starts with an empty puzzle, then systematically fills in squares. The system in which it fills in squares should be different for varying levels of difficulty.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Sudoku generator

Loading...

Similar Threads - Sudoku generator | Date |
---|---|

Sudoku Solver Problem | Mar 30, 2017 |

Generating Realistic Planets | Sep 23, 2016 |

A FORTRAN code for solving Sudoku puzzle | Jan 26, 2013 |

Sudoku in c# | Jul 27, 2011 |

Sudoku Solver in C++ | Mar 3, 2011 |

**Physics Forums - The Fusion of Science and Community**