Code Monkey home page Code Monkey logo

sudoku's Introduction

Sudoku

Sudoku tools

generate

Generates a puzzle.

Command syntax

generate [<difficulty>]

Parameters

Parameter Description
difficulty Desired number of empty cells (default: as many as possible)

profile

Finds the average time to generate and solve puzzles

profile [<count>]

Parameters

Parameter Description
count Number of puzzles to profile (default: 1000)

rate

Rates the difficulty of a puzzle

Command syntax

rate [-vv] <puzzle>

Parameters

Parameter Description
puzzle 81 digits, '.', ' ', '0', or '1'-'9', optionally prefixed with "SD"

Options

Option Description
-v, -vv Verbosity

Difficulty computation

The overall difficulty is $$D \left( 1 + {1 \over 2}{{n_D - 1} \over n_D + 1} + {1 \over 2} \sum_{d=1}^{D-1} {{n_d \over {n_d+1}} {1 \over 2^{D-d}}} \right)$$ where K is the highest difficulty technique, d is the difficulty of technique i and n is the number of times technique i is used.

The result is the difficulty factor of the most difficult technique plus up to +0.5 for additional steps of that technique, plus up to +0.5 for for lower difficulty techniques.

solve

Solves a puzzle

Command syntax

solve <puzzle>

Parameters

Parameter Description
puzzle 81 digits, '.', ' ', '0', or '1'-'9', optionally prefixed with "SD"

suggest

Suggests next steps until the first square in the puzzle is solved

Command syntax

suggest [-a] [-vvv | -j] <puzzle>

Parameters

Parameter Description
puzzle 81 digits, '.', ' ', '0', or '1'-'9', optionally prefixed with "SD"

Options

Option Description
-a Lists the all of the steps for a complete solution
-v, -vv, -vvv Verbosity
-j outputs in JSON format

sudoku's People

Contributors

jambolo avatar

Stargazers

Ashish Kumar avatar

Watchers

James Cloos avatar  avatar

Forkers

gunbamz

sudoku's Issues

How can i setup and run?

Hey @jambolo Thanks for such wonderful work just wanted to know how can i setup it locally do i need to directly run the commands or make it first. Also wanted to know that for difficulty we just need to pass the number of empty cells only?

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.