A Sudoku solver that uses one of two algorithms:
A heuristic selection of the next move is done by taking the empty square with the most complete row and column. This helps prune the search tree which would otherwise be exponential. All possible valid moves are calculated and used to generate sub-states. Invalid states are terminated and backtracking occurs to the next valid state
A CNN of 16 hidden layers was trained to predict the output of the sudoku in one shot. The input is the sudoku passed in as a (9, 9), this is propagated through the network with the output forming a one hot encoded into an (81, 10) vector
Neural Net Data available from: https://www.kaggle.com/datasets/bryanpark/sudoku?resource=download
Try out the algorithms at https://sudoku.leondebnath.com/
The API Documentation can be found at https://sudoku.leondebnath.com/docs
URL endpoints are provided to get random sudoku from the list, and to get solutions using a particular algorithm.