Giter Club home page Giter Club logo

sungoku's Introduction

sungoku

A sudoku creator and solver in python that is able to create sudokus in machine and human-readable format.

There are no external dependencies apart from python3.

Usage

Generate ten sudokus with at least 30 hints as csv:

./sungoku.py create --number 10 --min-hints 30
# quiz,num_hints,difficulty
# 040006000000907008159030040038000120010002000900000005060020007080409030090063450,30,MEDIUM
# 087000051640000000050708302000000000000072000706450109005809000079540003012000005,30,EASY
# 036020070000608010801000000602004150000090460000002003209000031007013096083000000,30,HARD
# ...

Generate a sudoku in human-readable format:

./sungoku.py create --pretty
#     4 | 6   1 | 9    
#       |       |   8  
# 1 6   | 8 7   |      
# - - - + - - - + - - -
#       |   4   |      
# 6 1   |     2 |      
# 2   9 | 7     |     3
# - - - + - - - + - - -
#       |       | 1    
# 7     | 1     |   3 2
# 3     |   8   | 7 6  
#
# Number of hints: 26
# Difficulty: MEDIUM

Solve a list of sudokus from a file and check if it is minimal and a unique solution exists:

./sungoku.py solve -a  < some_file.csv

Try to solve sudokus from some other dodgy text-based file format:

grep -o "[0-9\._-]\{81\}" some_file.txt | xargs -n1 ./sungoku.py solve -i -p -s

Do a whole Sunday afternoon worth of sudokus within a matter of seconds, so you can go back and watch your favourite sitcom:

./sungoku.py create -m 28 -n 8 | ./sungoku.py solve -p > /dev/null

sungoku's People

Contributors

stubents avatar

Stargazers

Jon Anning avatar  avatar  avatar

Watchers

 avatar

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.