Solving Sudoku is a fun challenge for coding, and adding computer vision to populate the puzzle ties this together with a popular machine learning technique
This whole thing started out as a fun little experiment to write another puzzle solver, similar to the Wordle solver I wrote about recently. Sudoku is a perfect computer solvable problem. It’s a simple iterative approach to finding uniqueness. There are probably thousands of examples out there, so while I will touch on how I ended up solving the puzzle, I want to focus on a Machine Learning (ML) and Artificial Intelligence (AI) approach to the game that I took. I thought, let’s add Computer Vision (CV) and Optical Character Recognition (OCR) into the mix where you can upload an image of the puzzle, the machine will read that and then solve the rest of it from there. This turned out to be an awesome learning experience that I would love to walk you through!
By now we’re all probably familiar with what Sudoku is, so let’s dive into the process of getting the digits out of the image!