Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Government Polytechnic,

Pune
(An Autonomous Institute of Government of Maharashtra)

Micro Project Report

Sudoku Game

Submitted By

Sr.no Name Enroll no

1. Saurabh Asnare 1906002

2. Arya Janjire 1906043

3. Shruti Kolhe 1906064

Under the guidance of

Mrs. Megha Yawalkar

Department of Computer Engineering


Government Polytechnic, Pune
(2020-21)
Index

Sr.no Title Page no

1. Acknowledgement 3

2. Abstract 4

3. Introduction 5

4. How to Play 6-8

5. Scope of Project 9

6. Program 10-

7. Output

8. Conclusion

9. References
Acknowledgement

It is my privilege to acknowledge with deep sense of gratitude to my micro


project guide Mrs. Megha Yawalkar for her valuable suggestions, guidance
throughout my course of study and timely help given to me in completion
of my presentation. I express my gratitude to Mr. Nikam Shankar (HOD
Computer Engineering Department) and Dr. Vitthal Bandal (Principal) for
their kind co-operation. I am highly obliged to the entire staff of Computer
Engineering Dept. for their kind co-operation and help throughout.

I would also like to thank my parents who patiently supported me


throughout my work. Their faith is one of the reasons for the fulfilment of
this Seminar. I’d also like to extend special thanks to all my colleagues and
friends for helping me whenever needed. Also, a warm thanks to Library
staff members for the availability of the library facilities needed for
preparing this report.  Last but clearly not the least I would thank the
Almighty for giving me the strength to complete my report on time.
Abstract

In this report, we present the detailed development and implementation of


simple Sudoku Game. The Sudoku game consists of graphical user interface,
solver and puzzle generator; implemented using python different modules and
packages. The solver and generator is implemented using efficient algorithm.
The solver finds the solution to puzzles entered by the user. Generator creates
various number of different sudoku puzzles. This project gives an insight in to
different aspects of python programming.
Introduction
Sudoku is an easy to learn logic-based number placement puzzle. The word
Sudoku is short for Su-ji wa dokushin ni kagiru which means "the numbers
must be single".
The roots of the Sudoku puzzle are in the Switzerland. Leonhard Euler
created "carré latin" in the 18h century which is similar to a Sudoku puzzle but
without the additional constraint on the contents of individual regions. The
first real Sudoku was published in 1979 and was invented by Howard Garns, an
American architect.
The real world wide popularity started in Japan in 1986 after it was published
and given the name Sudoku by Nikoli.

A Sudoku puzzle consists of 81 cells which are divided into


nine columns, rows and regions. The task is now to place the numbers from 1
to 9 into the empty cells in such a way that in every row, column and 3×3
region each number appears only once.
A Sudoku has at least 17 given numbers but normally there are 22 to 30.

A Sudoku is a logic-based and not a math-based puzzle. It is possible to make


und solve a Sudoku puzzle with letters or even some symbols.
A little interesting point is that there
are 6,670,903,752,021,072,936,960 possible Sudoku puzzles. So we can play
umpteen Sudokus a day and there will still be new ones.
How to Play
Sudoku is played on a grid of 9 x 9 spaces. Within the rows and columns are 9
“squares” (made up of 3 x 3 spaces). Each row, column and square (9 spaces
each) needs to be filled out with the numbers 1-9, without repeating any
numbers within the row, column or square. Does it sound complicated? As you
can see from the image below of an actual Sudoku grid, each Sudoku grid
comes with a few spaces already filled in; the more spaces filled in, the easier
the game – the more difficult Sudoku puzzles have very few spaces that are
already filled in.

Sudoku Rule № 2: Don’t Repeat Any Numbers

As you can see, in the upper left square (circled in blue), this square already
has 7 out of the 9 spaces filled in. The only numbers missing from the square
are 5 and 6. By seeing which numbers are missing from each square, row, or
column, we can use process of elimination and deductive reasoning to decide
which numbers need to go in each blank space.
For example, in the upper left square, we know we need to add a 5 and a 6 to
be able to complete the square, but based on the neighboring rows and
squares we cannot clearly deduce which number to add in which space. This
means that we should ignore the upper left square for now, and try to fill in
spaces in some other areas of the grid instead.

Sudoku Rule № 3: Don’t Guess

Sudoku is a game of logic and reasoning, so you shouldn’t have to guess. If you
don’t know what number to put in a certain space, keep scanning the other
areas of the grid until you seen an opportunity to place a number. But don’t try
to “force” anything – Sudoku rewards patience, insights, and recognition of
patterns, not blind luck or guessing.

Sudoku Rule № 4: Use Process of Elimination

What do we mean by using “process of elimination” to play Sudoku? Here is an


example. In this Sudoku grid (shown below), the far left-hand vertical column
(circled in Blue) is missing only a few numbers: 1, 5 and 6.

One way to figure out which numbers can go in each space is to use “process
of elimination” by checking to see which other numbers are already included
within each square – since there can be no duplication of numbers 1-9 within
each square (or row or column).
In this case, we can quickly notice that there are already number 1s in the top
left and center left squares of the grid (with number 1s circled in red). This
means that there is only one space remaining in the far left column where a 1
could possibly go – circled in green. This is how the process of elimination
works in Sudoku – you find out which spaces are available, which numbers are
missing – and then deduce, based on the position of those numbers within the
grid, which numbers fit into each space.

Sudoku rules are relatively uncomplicated – but the game is infinitely varied,
with millions of possible number combinations and a wide range of levels of
difficulty. But it’s all based on the simple principles of using numbers 1-9, filling
in the blank spaces based on deductive reasoning, and never repeating any
numbers within each square, row or column.
Scope of project

The objective of the proposed Project is to increase the THINKING


CAPABALITIES.

The game having all the records which you will perform in playing you can
select easy, hard level according to your choice. You can make your own
sudoku and at any step you can go back to one step as well as you can see the
solution of it.

It is manually very difficult to perform and it just needs a lot of recalling,


remaining and mathematical calculations. The game of sudoku helps to
increase mental thinking.
Program

Screenshots

Conclusion

From this practical I understood how we can use different packages and
modules of python to implement in real life projects.
References

 https://www.britannica.com/topic/sudoku

 https://en.wikipedia.org/wiki/Sudoku

You might also like