Vision-Based AI Model Solves Sudoku In A Swift

Artificial intelligence is now being used to solve the grid-based number puzzle — Soduko. The puzzle, Sudoku, is no match for today’s artificial; intelligence (AI) systems, however, a novel approach to the challenge is trending on GitHub due to its practical integration of computer vision technologies. Users can now use GUI Smart Sudoku Solver to find the solution of the Sudoku puzzle, by simply snapping a photo of the puzzle printed on the newspaper or playbook and the AI model will automatically transfer the image to a computer-friendly language to find the answer.

The brainchild of Neeramitra Reddy, an undergraduate in the Department of Computer Science and Engineering at the National Institute of Technology Karnataka, The GUI Sudoku Solver has fairly simple installation.

The installation instruction goes like — firstly, download Python and then create a virtual environment followed by cloning the repository and then connecting to the Internet in order to create the knn.sav file, which will take about five to ten minutes. The Smart Sudoku Solver is then able to run offline with only local files. The model type variable is set to the K Nearest Neighbours Algorithm for Recognition by default since this has produced the highest accuracy in experiments. However, users can also choose to set it as a Convolutional Neural Network.

Image courtesy – Sudoku Puzzle through the GUI Home Page.

The estimated 3% of misrecognition rate of the KNN model can be eliminated via a user interface that enables manual review, and editing of any wrong entries before the engine solves the puzzle.

Previously, approximately a decade ago, Swedish developer Hans Andersson has built an amusing Sudoku solver based on a LEGO mobile robot, which used to navigate over the puzzle and detected numbers on Sudoku printouts using a light sensor, then used to solve the puzzles using a recursive backtracking algorithm. This new vision-based AI Sudoku Solver looks like an upgraded version of the LEGO robot, with way faster processing time, improved portability, and definitely fewer restrictions.

More information on the model’s Gaussian Blurring stage, noise removal, and other image processing stages can be found on its GitHub page.

More Great AIM Stories

Sejuti Das
Sejuti currently works as Associate Editor at Analytics India Magazine (AIM). Reach out at

More Stories


8th April | In-person Conference | Hotel Radisson Blue, Bangalore

Organized by Analytics India Magazine

View Event >>

30th Apr | Virtual conference

Organized by Analytics India Magazine

View Event >>

Yugesh Verma
A guide to explainable named entity recognition

Named entity recognition (NER) is difficult to understand how the process of NER worked in the background or how the process is behaving with the data, it needs more explainability. we can make it more explainable.

Yugesh Verma
10 real-life applications of Genetic Optimization

Genetic algorithms have a variety of applications, and one of the basic applications of genetic algorithms can be the optimization of problems and solutions. We use optimization for finding the best solution to any problem. Optimization using genetic algorithms can be considered genetic optimization

Yugesh Verma
How to Visualize Backpropagation in Neural Networks?

The backpropagation algorithm computes the gradient of the loss function with respect to the weights. these algorithms are complex and visualizing backpropagation algorithms can help us in understanding its procedure in neural network.

3 Ways to Join our Community

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Telegram Channel

Discover special offers, top stories, upcoming events, and more.

Subscribe to our newsletter

Get the latest updates from AIM