Giter VIP home page Giter VIP logo

jigsaw-sudoku's Introduction

Sudoku

Python Code to solve Jigasaw Sudoko by backtracking with look forward (Forward Checking) and model dependant ordinal strategies

Example used in the text files: Example board

Solution

Example Solution

jigsaw-sudoku's People

Contributors

wadieskaf avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jigsaw-sudoku's Issues

Need your help :)

Hi Guru :)
I'm newbie in Python but I like Sudoku
And I test your code with my own "Sudoku.txt" and "Sudoku_Regions.txt"
However it doesn't work.
Why? Please let me know Or at least fix it/or my own files.
Thanks and regars.
Pham Dong

Sudoku_Regions.txt
'region_1' : [(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(1.3),(2.2),(2,3)],
'region_2' : [(0,3),(0,4),(0,5),(0,6),(0,7),(1,4),(1,5),(1,6),(2,5)],
'region_3' : [(0,8),(1,7),(1,8),(2,6),(2,7),(2,8),(3,7),(3,8),(4,8)],
'region_4' : [(2,0),(2,1),(3,0),(3,1),(3,2),(4,1),(4,2),(4,3),(5,2)],
'region_5' : [(2,4),(3,3),(3,4),(3,5),(4,4),(5,3),(5,4),(5,5),(6,4)],
'region_6' : [(3,6),(4,5),(4,6),(4,7),(5,6),(5,7),(5,8),(6,7),(6,8)],
'region_7' : [(4,0),(5,0),(5,1),(6,0),(6,1),(6,2),(7,0),(7,1),(8,0)],
'region_8' : [(6,3),(7,2),(7,3),(7,4),(8,1),(8,2),(8,3),(8,4),(8,5)],
'region_9' : [(6,5),(6,6),(7,5),(7,6),(7,7),(7,8),(8,6),(8,7),(8,8)]
Sudoku.txt
0,0,0,0,8,0,0,1,0
0,0,0,0,0,5,4,6,0
0,0,2,0,0,0,0,5,3
2,0,0,0,0,0,0,0,0
0,1,0,7,0,4,0,3,0
0,0,0,0,0,0,0,0,0
4,9,0,0,0,0,5,0,1
0,0,8,3,0,0,0,0,0
0,0,0,0,0,0,0,0,0

Enhancement Suggestions

I suggest the following to be done to enhance the code:

  1. Refactor the code to have better structure.
  2. Add tests using pytest.

If you would like to contribute, please fork the repo and open a pull request when ready.

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.