Pat R.

asked • 02/09/21

implementation of sudoku in python

  1. The implementation for an agent which can solve sudoku puzzles – this notebook
  2. You can use any algorithm you like, from the unit material or otherwise
  3. Your code will be subject to automated testing, from which grades will be assigned based on whether it can solve sudokus of varying difficulty
  4. To get a high grade on this assignment, the speed of your code will also be a factor – the quicker the better
  5. There are some sample tests included below, make sure your code is compatible with the format of these tests
  6. A text file that explains your approach and the decisions you made in your own words
  7. The choice of algorithm to solve sudoku puzzles is up to you. We expect you will use search techniques from the unit, but you could make something up yourself, or do some independent research to find something else
  8. Each sudoku is a 9x9 NumPy array of integers, where zero represents an empty square. Each difficulty comes with 15 sudokus, so when you load the file, it is stored in a 15x9x9 array.


You must include a function called sudoku_solver(sudoku) which takes one sudoku puzzle (a 9x9 NumPy array) as input, and returns the solved sudoku as another 9x9 NumPy array. This is the function which will be tested.

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.