Giter Club home page Giter Club logo

sudoku-solver's Introduction

sudoku-solver

A Sudoku solver using only 'human' rules.

Table of content

Features

This is a sudoku solver using only 'human' rules, meaning that application will use rules as if it was a human that solve the sudoku.

Initially I wanted to know which rules are needed to resolve myself a sudoku. Moreover, I wanted also a solution to resolve and to validate sudoku that I am not able to resolve myself.

In fact I discovered that only few rules are needed to resolve a sudoku, related to boards used to test my application. Of course you are welcome to inform me of any board that the application does not resolve itself.

Basically, each box containts a list of possible values from 1 to 9. List of rules:

  1. if an single value is found for a box, you have to remove this possible value from other boxes of square, line and column,
  2. if a value is possible only in a box of a square/line/column, remove it from possible values of other boxes in the same section (square/line/column),
  3. if a value is possible only within a line (or column) of the current square, remove it from other boxes of the same line (or column) in other squares. Do not forget to check if it is affect the unicity of value in these squares.

That's it!

Get Started

to solve a sudoku with the application:

  1. complete a text file with the board,
  2. change the call of application to check the selected board (see Main function in program.cs),
  3. run the application in the root directory by using the command dotnet run --project .\src\sudoku-solver\

Notes on the content of the board's file:

  • each line stating with the sharp (#) letter is interpreted as a commented line,
  • each unknown box is represented by a dash (-),
  • you can use any space or return line, they will be ignored.

Author

Olivier Granoux

License

Repository is licensed under the MIT license.

sudoku-solver's People

Contributors

oliviergranoux 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.