Skip to content

ahmedattia143/Sudoku_Solver_AI

Repository files navigation

Sudoku Solver using artificial intelligence

Inspiration

Being a fan of the famous sudoku game, I had the idea to create a program that solves a sudoku puzzle taking as input the puzzle image.

Dependencies

  • python 3.7
  • tensorflow v2.1.0
  • keras
  • openCV 4.2.0.32

Usage

python main.py "path_to_image"

Example:

Files :

  • main.py : main python file that will run the program on sudoku images as described in usage.

  • SudokuSolver.py : python class that contains all the logic of solving sudoku puzzle using backtracking.

  • SudokuPreprocess.py : python class that contains all the methods needed to extract the sudoku puzzle from an image and convert it to a 2d array using the model trained.

  • sudoku preprocess.ipynb : python notebook that contain an exampel showing all the steps of image preprocessing from finding conours to converting the puzzle image to a 2d array.

  • model.ipynb : python notebook to train a convolution neural network on numbers images.

  • dataset : folder that contains all the images used to train the model , images were collected by me from internet.

  • model : folder that contains the model trained.

  • test_images : images of sudoku puzzle to test on the program .

References :

https://www.pyimagesearch.com/2014/04/21/building-pokedex-python-finding-game-boy-screen-step-4-6/?fbclid=IwAR1IrKuz2lB0W5v7-cBUjXGFxwUG_7Axs236gA5F6YQWmaB61ImhF34J1lw

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published