Giter Site home page Giter Site logo

sudoku_solver's Introduction

-- Sudoku Solver --

A poor attempt at solving sudoku using brute force methods. The project has been coded using python 2.7.10

Currently, the project is able to solve sudoku puzzles that are of extra hard difficulty or lower. This has been tested by solving several puzzles at www.websudoku.com, on the "Evil" difficulty level.

Furthermore, this program is not yet able to solve the world's hardest sudoku puzzle.

The inputs to the solver are hard coded into the program.

#Features:

  1. Solves the puzzle through an iterative process
  2. Makes guesses to continue solving the puzzle

#Setup:

Clone the git repository using git clone https://github.com/glee-/sudoku_solver.git After cloning the repository, run the program within a terminal using python solver.py

Within the program, the solver is called through the function solve(board)

#Future improvements

This program might be improved by importing numpy and using arrays, instead of the native lists.

Solving speed may be optimized by improving the guessing algorithm.

sudoku_solver's People

Contributors

glee- avatar mzqu avatar

Watchers

 avatar  avatar

Forkers

mzha

sudoku_solver's Issues

Guesses

Solver is able to guess, but seems to not be able to guess consecutive times for more difficult boards.

The guess seems to occur once at each position, but only recursively guesses for the first guess.

Guessing 1 at position [0, 0]. I can guess [1, 3, 5, 6]
Guessing 5 at position [0, 2]. I can guess [5, 6]
Guessing 2 at position [0, 3]. I can guess [2, 3, 4]
Guessing 4 at position [0, 5]. I can guess [4, 6]
Guessing 3 at position [0, 7]. I can guess [3, 6]
Guessing 4 at position [2, 6]. I can guess [4, 7]
Guessing 3 at position [5, 6]. I can guess [3, 7]
Guessing 8 at position [8, 0]. I can guess [8, 9]
Guessing 9 at position [8, 0]. I can guess [8, 9]
Guessing 7 at position [5, 6]. I can guess [3, 7]
Guessing 7 at position [2, 6]. I can guess [4, 7]
Guessing 6 at position [0, 7]. I can guess [3, 6]
Guessing 6 at position [0, 5]. I can guess [4, 6]
Guessing 3 at position [0, 3]. I can guess [2, 3, 4]
Guessing 4 at position [0, 3]. I can guess [2, 3, 4]
Guessing 6 at position [0, 2]. I can guess [5, 6]
Guessing 3 at position [0, 0]. I can guess [1, 3, 5, 6]
Guessing 5 at position [0, 0]. I can guess [1, 3, 5, 6]
Guessing 6 at position [0, 0]. I can guess [1, 3, 5, 6]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.