8000 GitHub - nrudeys/Sudoku-Solver: Sudoku generator and solver using backtracking algorithm
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nrudeys/Sudoku-Solver

Repository files navigation

Sudoku-Solver

Generator to create and/or solve Sudoku puzzles

Table of Contents

  1. Description
  2. Getting Started
  3. Usage
  4. Acknowledgements

Description

A solver which uses a backtracking algorithm that is used to find solutions to generated or user-provided Sudoku puzzles. The solver has different modes that an user can choose for difficulty and/or assistance.

Getting Started

Technologies and Libraries

  • Python 3.8
  • Pygame
  • Numpy

How to Run

Clone Repository

Go to terminal and paste: git clone https://github.com/nrudeys/Sudoku-Solver.git

To run EXE

Go to dist directory in cloned folder and double click on sudoku-solver application

NOTE: to create EXE application

pyinstaller -F --noconsole --add-data "instructions.txt;." --add-data "background.png;." sudoku_solver.py

Usage

The game has two start modes START and ENTER. Additional information such as rules, controls (e.g., keys), and notes can be found in INFO.

START mode

START mode generates an incompleted Sudoku puzzle

Before clicking START, an user can also choose a difficulty and assist mode. However, this is optional. If assist mode is not chosen its default is to be off but if a difficulty mode is not chosen, one is selected randomly.

Difficulty modes

EASY: 39 - 49 given clues

EASY example

Example of a generated EASY puzzle


MEDIUM: 28 - 38 given clues

Example of a generated MEDIUM puzzle


HARD: 17 - 27 given clues

Example of a generated HARD puzzle

In game-buttons:

New game: generates a new game with same selected difficulty/assist modes
Generate solution: generates a solution for Sudoku puzzle
Verify solution: Checks if current board has a valid solution
Back: Returns user to home screen

Assist modes

If assist is on, the game will indicate cells that have conflicting entries with one another by changing its font to red. Otherwise, all entries are blue regardless of conflictions.

assist animated

NOTE: assist mode can be changed mid-game

ENTER mode

ENTER mode lets users provide their own Sudoku puzzle. It can generate a solution if given board is valid and a solution can be found.

enter animated

In game-buttons:

Clear: Removes all entries from board
Solve: Generates a solution if one can be found and board is valid
Back: Returns user to home screen

Acknowledgements

About

Sudoku generator and solver using backtracking algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0