Sudoku Solver PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Sudoku solver

Project guided by Project done by


Abirami.B
Mr.SIVA MSc, MEd, MPhil
Ezhilarasi.A
Niranjanadevi.D
Sivaranjini.D
Subasri.V
Project Introduction

SUDOKU SOLVER

• This project is about to solving a Sudoku problem by a particular method


which given a correct solution for given project.
• We work very hard to complete this project and able to build logic that
can find out the solution of Sudoku problem and it generate solution for
some multiple grids…
Key features

• Adjusting Gameplay mood.


• Giving a unique solution.
• Editing given input for updating input.
• Error solving
What is SUDOKU?

• Sudoku requires no calculation or arithmetic skills.


• It is essentially a game of placing numbers in squares,using very simple
rules of logic and deduction.
• It can be played by children and adults and the rules are simple to learn.
• Sudoku is a puzzle game designed for a single player,much like a
crossword puzzle.
• The puzzle itself is nothing more than a grid of little boxes called “Cells”.
Challenges

• Our job is to place a number into every empty box so that each row
across and each colomn Down and each small 9*9-box square within the
large square (there are 9*9 of these) will contain each number from 1
through 9*9.Remember that no number may appear more than once in
any colomn down or within any small 9*9-box respectively.

The number
T will be filled with the help of pattern matching…..
There also a big challenge for us to calculate the grid and builds up logic.
Work Description
Concept
The main concept of our project is solving Sudoku by our code.Our code can
solve Sudoku of 9 * 9.Sudoku is a popular game and our
code make this game more easy and interesting.
Idea
We got the idea if making the code from the famous Sudoku game.
It shows the solve of the Sudoku problem.

Logic
Sudoku is a popular game.We know the basic rules of Sudoku.Logic of
our code make by using possibility , combination , permutation.Logic
calculate row and colomn possible solution with grid.Logic use different
combination of grid for different dimension of Sudoku.
Work Description
Logic Build up
The logic of our code divide the row and colomn by dimension . then logic use
sorting to find the possible solution . Logic remove some possible solution
because these solutions break the rules of Sudoku . Then logic give the
solution of that Sudoku . Logic use different calculation for different grid
Sudoku because row and colomn are different . Then main process of logic is
same.

Grid & Dimension

For grid 9 * 9 the dimension is 3 * 3….


Work Description
Language

The code will write in PYHON language.

Partition

We use function , loop , conditional operators to seprate the whole


code in some parts . This will help us to add or modify the code.

Implement
We write our code according to our idea , algorithm , flowchart &
logic what we planning for and adding some function to add the key
feature to increasing interest on our software and also make the
boring game interesting to all…
Table
WEEKS WORKS

week 1 Concept , idea

week 2 Algorithm & Flowchart

week 3 Logic & logic build up

week 4 Logic & logic build up

week 5 Create function & mood

week 6 Update Algorithm &


Flowchart
week 7 Commenting , completing
code testing…
Objective of Sudoku

• Every Sudoku games begins with a number of squares already filled in


and the difficulty of each game is largely a function of how many squares
are filled in.
• The more squares that are known , the easier it is to figure out which
numbers go in the open squares . As you fill in squares correctly , for the
remaining squares , options for the remaining squares are narrowed and
it becomes easier to fill them in.
• Sudoku’s are usually categorized as easy , medium or hard.
Diagram

Here the PINK color represent colomn

The GREEN color represent the row

And the and the BLUE color represent one square

Finally the VIOLET represent one block


Objective of Sudoku

The objectives of the game is to fill all the blank squares in a game with the
correct numbers.There are three very simple way to follow. In a 9 by 9
square Sudoku game:

1)Every row of 9 numbers must be include all digits 1 through 9 in any order .

2)Every colomn of 9 numbers must include all digits 1 through 9 in any order.

3)Every 3 by 3 subsection of the 9 by 9 square must include all digits 1 through 9.


Flow chart

.
Algorithm
STEP 1:Start.
STEP 2:Enter how many times you want to play.
STEP 3:Choose gameplay mood.
STEP 4:Enter matrix or Sudoku problem.
STEP 5:Press 0 to continue or 1 to update.
STEP 6:If 0 then :Continue.
Else:update row , colomn , replacing element value and 0 to exit
STEP 7:Checking for error.
STEP 8:If error then: update row , colomn , replacing element value and 0 to exit
Else:continue.
STEP 9:Print the absolute Sudoku problem.
STEP 10:Processed by checking , pattern matching and elimination.
STEP 11:Checking for error.
STEP 12:IF error then:
Print ”no solution”
Else:Print solution Sudoku.
STEP 13: Stop.
Conclusion

• The algorithm seems to be a useful method to solve any Sudoku puzzles and it
can guarantee to find at least one solution . However , this is not efficient
because the level of difficulties is irrelevant to the algorithm.In other words ,
the algorithm does not adopt intelligent strategies to solve the puzzles. This
algorithm checks all possible solutions to the puzzle until a valid solution is
found which is a time consuming procedure resulting an inefficient solver . As
it has already stated the main advantage og using the algorithm is the ability to
solve any puzzle and a solution is certainly guaranteed…

You might also like