Skip to content

Sudoku Solver is a user-friendly application with UI that utilizes Backtracking and Genetic algorithm to solve puzzles of various size and difficulties

License

Notifications You must be signed in to change notification settings

Sambonic/sudoku-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Solver Documentation

This is a Sudoku solver for puzzles of various sizes that utilizes backtracking and genetic algorithms. It is implemented in Python and built using Electron JS.

Last Updated: June 1st, 2024

Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. Usage
  5. Acknowledgement

Introduction

Sudoku is a popular logic puzzle that requires filling a 9x9 grid with digits 1-9 such that each row, column, and 3x3 sub-grid contains all the digits without repetition. This project creates a user-friendly application that utilizes two algorithms, backtracking and genetic algorithm, to solve Sudoku puzzles of varying difficulties while educating users on the solving process.

Features

  • Sudoku Board Sizes: Our app supports solving Sudoku puzzles of various sizes: 9x9, 6x6, and 4x4.
  • Solving Algorithms: The solver utilizes two main algorithms: backtracking and genetic algorithms.
  • Insights: Users can gain insights into the solving process, including solving time, memory usage, and iterations taken for each algorithm.
  • Testing: We provide a testing feature where users can evaluate the solver's performance by running it against a dataset containing 500 random Sudoku boards with their solutions, sourced from a larger collection of - 10,000 puzzles stored in a CSV format.

Installation

Make sure you have python downloaded if you haven't already. Follow these steps to set up the environment and run the application:

  1. Clone the Repository:
git clone https://github.com/Sambonic/sudoku-solver
cd sudoku-solver
  1. Create a Python Virtual Environment:
python -m venv env
  1. Activate the Virtual Environment:
  • On Windows:

    env\Scripts\activate
    
  • On macOS and Linux:

    source env/bin/activate
    
  1. Ensure Pip is Up-to-Date:
python.exe -m pip install --upgrade pip
  1. Navigate to the Client Directory:
cd sudoku/client
  1. Install Dependencies
npm i

Usage

Sudoku Solver App Screenshot

  1. Start the application by running npm start in the terminal
  2. Launch the application.
  3. Select the size of the Sudoku board you want to solve (9x9, 6x6, or 4x4).
  4. Input the initial numbers into the grid or click "New Board" to generate a random board.
  5. Choose the solving algorithm (backtracking or genetic).
  6. Click the "Solve" button to initiate the solving process.
  7. View insights such as solving time, memory usage, and iterations taken.
  8. Optionally, run the testing feature to evaluate the solver's performance.

Acknowledgement

This was a group work that involved: Amir Moahmed, Amr Magdy, and myself. Special thanks to TA Farah for her support, encouragement and motivation role throughout the development of this project.

About

Sudoku Solver is a user-friendly application with UI that utilizes Backtracking and Genetic algorithm to solve puzzles of various size and difficulties

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published