SlideShare a Scribd company logo
INTELLIGENT SUDOKU SOLVER
Under the Guidance of
Dr. SUNIL PATEKAR
Group Members:
1. Amrish Jhaveri
2. Rohit Iyer
3. Krutika Parab
UNIVERSITY OF MUMBAI
2012-2013
CONTENTS
I. INTRODUCTION
II. AIMS & OBJECTIVES
III. PROBLEM STATEMENT
IV. SCOPE
V. PROPOSED SYSTEM
VI. METHODOLOGY – Expert System
VII. BACKTRACKING ALGORITHM
VIII. PATTERNS
IX. DESIGN – Flow Chart
2
INTELLIGENT SUDOKU SOLVER
X. FEATURES
XI. CODE SNIPPETS
I. INTRODUCTION
 Rule:
Fill a given grid(9x9) with the numbers 1 to 9, so that every column,
row, and 3x3 box the numbers 1 to 9, keeping in mind that the same
number doesn’t repeat in that particular row, column or the 3x3 box.
3
INTELLIGENT SUDOKU SOLVER
II. AIMS & OBJECTIVES
 To successfully implement a novel approach to solve
computationally intensive problems like Sudoku.
 To solve the classical Sudoku puzzle in a much more efficient way
than a conventional Brute Force and Backtracking approach.
4
INTELLIGENT SUDOKU SOLVER
III. PROBLEM STATEMENT
 Our job is to place a number into every empty box so that each
row across, each column down, and each small 9-box square
within the large square (there are 9 of these) will contain each
number from 1 through 9. Remember that no number may appear
more than once in any row across, any column down, or within
any small 9-box square. The numbers will be filled with the
help of pattern matching.
5
INTELLIGENT SUDOKU SOLVER
IV. SCOPE
 Our project aims at solving Sudoku using pattern matching.
 Assumptions:
• Fixed Grid Size: 9 x 9
• Fixed Symbols: 1-9
• Limitations on the number of patterns implemented.
6
INTELLIGENT SUDOKU SOLVER
V. PROPOSED SYSTEM
 Our project uses five main modules:
1. Reading the input from file.
2. Search for patterns.
3. Provide solution.
4. Solve by Backtracking.
5. Compare the run-time.
7
INTELLIGENT SUDOKU SOLVER
VI. EXPERT SYSTEM
 In Artificial Intelligence, an Expert System is a computer
system that emulates the decision-making ability of a human
expert.
 It consists of a rule-base (permanent data), an inference engine
(process), and a workspace or working memory (temporary
data). Not part of the basic reasoning process, but essential to
applications, is the user interface.
8
INTELLIGENT SUDOKU SOLVER
VI. EXPERT SYSTEM
9
INTELLIGENT SUDOKU SOLVER
VI. EXPERT SYSTEM
 In our approach the components of expert system are as follows:
• Client interface is a command line interface or GUI.
• Knowledge base are set of data structures stored which contain prior
information needed to proceed.
• Rule translator is a function which translates the rule from human
understandable form to machine understandable form. For e.g. A function called
HiddenSingles() may translate the rule in such a way that the Rule Engine (in
our case – our main program)understands.
• Knowledge base editor would be a simple text editor which can change/add
the built-in rules in the code.
• Rule Engine is another function which checks every pattern if it matches a
rule or not. 10
INTELLIGENT SUDOKU SOLVER
VII. BACKTRACKING ALGORITHM
 We basically check that the same number is not present in
current row, current column and current 3X3 sub grid. After
checking for safety, we assign the number, and recursively check
whether this assignment leads to a solution or not. If the
assignment doesn’t lead to a solution, then we try next number
for current empty cell. And if none of number (1 to 9) lead to
solution, we return false.
11
INTELLIGENT SUDOKU SOLVER
VIII. PATTERNS
 NAKED SINGLE
 Any cells which have only one candidate can safely be
assigned that value.
 It is very important whenever a value is assigned to a cell,
that this value is also excluded as a candidate from all other
blank cells sharing the same row, column and box
12
INTELLIGENT SUDOKU SOLVER
 NAKED SINGLE
13
INTELLIGENT SUDOKU SOLVER
VIII. PATTERNS
 NAKED PAIR
 A Naked Pair (also known as a Conjugate Pair) is a set of two
candidate numbers sited in two cells that belong to at least
one unit in common. That is they reside in the same row, box
or column.
14
INTELLIGENT SUDOKU SOLVER
VIII. PATTERNS
IX. PATTERNS
 NAKED PAIR
15
INTELLIGENT SUDOKU SOLVER
 HIDDEN SINGLE
 Very frequently, there is only one candidate for a given
row, column or box, but it is hidden among other candidates.
 In the example on the right, the
candidate 6 is only found in the
middle right cell of the 3x3 box.
Since every box must have a
6, this cell must be that 6.
16
INTELLIGENT SUDOKU SOLVER
VIII. PATTERNS
 Locked Candidates -I
 Sometimes a candidate within a box is
restricted to one row or column. Since one of
these cells must contain that specific
candidate, the candidate can safely be
excluded from the remaining cells in that row
or column outside of the box.
VIII. PATTERNS
INTELLIGENT SUDOKU SOLVER
 Locked Candidates – I Example
In the example above, the right box only has candidate 2's in its bottom row.
Since, one of those cells must be a 2, no cells in that row outside that box
can be a 2. Therefore 2 can be excluded as a candidate from the highlighted
cells.
VIII. PATTERNS
INTELLIGENT SUDOKU SOLVER
 Locked Candidates – II
 Sometimes a candidate within a row or
column is restricted to one box. Since one of
these cells must contain that specific
candidate, the candidate can safely be
excluded from the remaining cells in the box.
VIII. PATTERNS
INTELLIGENT SUDOKU SOLVER
 Locked Candidates – II Example
In the example on the right, the left column
has candidate 9's only in the middle box.
Therefore, since one of these cells must be a
9 (otherwise the column would be without a
9), 9's can safely be excluded from all cells in
this middle box except those in the left
column.
VIII. PATTERNS
INTELLIGENT SUDOKU SOLVER
IX. DESIGN (FLOW CHART)
21
INTELLIGENT SUDOKU SOLVER
Yes
No
Yes
No
Reading Sudoku
from a file
Search patterns
Take necessary
action
Solved?
Print Solution
Stop
Start
Make a smart
guess Found
X. FEATURES
 A Java based Sudoku Solver
 Benchmarked at solving 49151 random puzzles within 16159
milliseconds.
 Used optimized pattern detection strategies like Naked Singles,
Hidden
 Singles and Locked Candidates to aid solving.
 Reviewed the performance of our solver with existing Sudoku
Solvers in the world.
 Comprehensive statistical and graphical results to record the solver's
performance using JFreeChart API.
INTELLIGENT SUDOKU SOLVER
We conducted a test on
some of the world’s popular
and fastest Sudoku solvers.
The test consisted of
solving 1000 very hard
puzzles.
We fed the same set of
1000 puzzles to all solvers
and result is here….
INTELLIGENT SUDOKU SOLVER
OUR OPPONENT….
… a puzzle took 15.5 billion nanoseconds!!!
INTELLIGENT SUDOKU SOLVER
OUR INTELLIGENT SOLVER….
… a puzzle took 25 million nanoseconds!!!
INTELLIGENT SUDOKU SOLVER
NO COMPARISON!!!
… can’t compare millions with billions!!!
INTELLIGENT SUDOKU SOLVER
NO COMPARISON!!!
… can’t compare millions with billions!!!
INTELLIGENT SUDOKU SOLVER
XI. CODE SNIPPETS
INTELLIGENT SUDOKU SOLVER
28
INTELLIGENT SUDOKU SOLVER
XI. CODE SNIPPETS
INTELLIGENT SUDOKU SOLVER
30
XI. CODE SNIPPETS
INTELLIGENT SUDOKU SOLVER
32
Our paper titled -
has been reviewed
and accepted by International
Journal of Scientific Research
and Publications and will be
published in Volume 3, Issue
5, May 2013.
INTELLIGENT SUDOKU SOLVER
THANK YOU
 We would like to thank our project guide Dr. Sunil Patekar &
Prof Mahesh Bhave for helping us identify the flaws and correcting
them. We would also like to thank Assistant Professors Rugved
Deolekar and Aman Mahadeshwar for their inputs.
35
INTELLIGENT SUDOKU SOLVER

More Related Content

What's hot

Introduction to toc and compiler
Introduction to toc and compilerIntroduction to toc and compiler
Introduction to toc and compiler
savitamhaske
 
Tic tac toe game with graphics presentation
Tic  tac  toe game with graphics presentationTic  tac  toe game with graphics presentation
Tic tac toe game with graphics presentation
Prionto Abdullah
 
8 queen problem
8 queen problem8 queen problem
8 queen problem
NagajothiN1
 
Tic Tac Toe ppt
Tic Tac Toe pptTic Tac Toe ppt
Tic Tac Toe ppt
SanchitRastogi15
 
Tic tac toe c++ project presentation
Tic tac toe c++ project presentationTic tac toe c++ project presentation
Tic tac toe c++ project presentationSaad Symbian
 
Lab report for Prolog program in artificial intelligence.
Lab report for Prolog program in artificial intelligence.Lab report for Prolog program in artificial intelligence.
Lab report for Prolog program in artificial intelligence.
Alamgir Hossain
 
N queens using backtracking
N queens using backtrackingN queens using backtracking
N queens using backtracking
srilekhagourishetty
 
predicate logic example
predicate logic examplepredicate logic example
predicate logic example
SHUBHAM KUMAR GUPTA
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star search
Hema Kashyap
 
Floyd Warshall Algorithm
Floyd Warshall AlgorithmFloyd Warshall Algorithm
Floyd Warshall Algorithm
InteX Research Lab
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6
Kirti Verma
 
project on snake game in c language
project on snake game in c languageproject on snake game in c language
project on snake game in c language
Ashutosh Kumar
 
Bucket sort
Bucket sortBucket sort
AI based Tic Tac Toe game using Minimax Algorithm
AI based Tic Tac Toe game using Minimax AlgorithmAI based Tic Tac Toe game using Minimax Algorithm
AI based Tic Tac Toe game using Minimax Algorithm
Kiran Shahi
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptography
Yasser Ali
 
Graph coloring problem
Graph coloring problemGraph coloring problem
Graph coloring problem
V.V.Vanniaperumal College for Women
 

What's hot (20)

Backtracking
BacktrackingBacktracking
Backtracking
 
Introduction to toc and compiler
Introduction to toc and compilerIntroduction to toc and compiler
Introduction to toc and compiler
 
Tic tac toe game with graphics presentation
Tic  tac  toe game with graphics presentationTic  tac  toe game with graphics presentation
Tic tac toe game with graphics presentation
 
8 queen problem
8 queen problem8 queen problem
8 queen problem
 
Tic Tac Toe ppt
Tic Tac Toe pptTic Tac Toe ppt
Tic Tac Toe ppt
 
Tic tac toe c++ project presentation
Tic tac toe c++ project presentationTic tac toe c++ project presentation
Tic tac toe c++ project presentation
 
Lab report for Prolog program in artificial intelligence.
Lab report for Prolog program in artificial intelligence.Lab report for Prolog program in artificial intelligence.
Lab report for Prolog program in artificial intelligence.
 
Tic Tac Toe
Tic Tac ToeTic Tac Toe
Tic Tac Toe
 
N queens using backtracking
N queens using backtrackingN queens using backtracking
N queens using backtracking
 
predicate logic example
predicate logic examplepredicate logic example
predicate logic example
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star search
 
Adversarial search
Adversarial search Adversarial search
Adversarial search
 
Floyd Warshall Algorithm
Floyd Warshall AlgorithmFloyd Warshall Algorithm
Floyd Warshall Algorithm
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6
 
project on snake game in c language
project on snake game in c languageproject on snake game in c language
project on snake game in c language
 
Np complete
Np completeNp complete
Np complete
 
Bucket sort
Bucket sortBucket sort
Bucket sort
 
AI based Tic Tac Toe game using Minimax Algorithm
AI based Tic Tac Toe game using Minimax AlgorithmAI based Tic Tac Toe game using Minimax Algorithm
AI based Tic Tac Toe game using Minimax Algorithm
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptography
 
Graph coloring problem
Graph coloring problemGraph coloring problem
Graph coloring problem
 

Viewers also liked

Presentation - Sudoku Assignment
Presentation - Sudoku  AssignmentPresentation - Sudoku  Assignment
Presentation - Sudoku Assignment
Cj Uni
 
Sudoku ppt
Sudoku pptSudoku ppt
Sudoku powerpoint
Sudoku powerpointSudoku powerpoint
Sudoku powerpoint
union40
 
Sudoku
SudokuSudoku
Sudoku
Yara Ali
 
Reservation Presentation
Reservation PresentationReservation Presentation
Reservation PresentationAmrish Jhaveri
 
My Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & SnapshotsMy Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & Snapshots
Usman Sait
 
Sudoku
SudokuSudoku
L1 Sudoku
L1 SudokuL1 Sudoku
L1 Sudoku
bnmoran
 
Cours Génie Logiciel 2016
Cours Génie Logiciel 2016Cours Génie Logiciel 2016
Cours Génie Logiciel 2016
Erradi Mohamed
 
My presentation about hobby
My presentation about hobbyMy presentation about hobby
My presentation about hobby
Iin Widya Lestari
 
My hobbies
My hobbiesMy hobbies
My hobbies
Sajjadul Ponni
 
My hobby my interest
My hobby my interestMy hobby my interest
My hobby my interest
LAURABABIIEE
 
My hobby
My hobbyMy hobby
My hobby
sliderdlfo
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
SlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
SlideShare
 

Viewers also liked (20)

Presentation - Sudoku Assignment
Presentation - Sudoku  AssignmentPresentation - Sudoku  Assignment
Presentation - Sudoku Assignment
 
Sudoku ppt
Sudoku pptSudoku ppt
Sudoku ppt
 
Sudoku powerpoint
Sudoku powerpointSudoku powerpoint
Sudoku powerpoint
 
Sudoku
SudokuSudoku
Sudoku
 
Sudoku
SudokuSudoku
Sudoku
 
Reservation Presentation
Reservation PresentationReservation Presentation
Reservation Presentation
 
My Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & SnapshotsMy Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & Snapshots
 
Sudoku
SudokuSudoku
Sudoku
 
L1 Sudoku
L1 SudokuL1 Sudoku
L1 Sudoku
 
Reservation in India
Reservation in IndiaReservation in India
Reservation in India
 
Cours Génie Logiciel 2016
Cours Génie Logiciel 2016Cours Génie Logiciel 2016
Cours Génie Logiciel 2016
 
Reservation
ReservationReservation
Reservation
 
My presentation about hobby
My presentation about hobbyMy presentation about hobby
My presentation about hobby
 
My hobbies
My hobbiesMy hobbies
My hobbies
 
Types of reservation
Types of reservationTypes of reservation
Types of reservation
 
My hobby my interest
My hobby my interestMy hobby my interest
My hobby my interest
 
My hobby
My hobbyMy hobby
My hobby
 
Hobbies and interests
Hobbies and interestsHobbies and interests
Hobbies and interests
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
 

Similar to Intelligent Sudoku Solver

NPTEL complete.pptx.pptx
NPTEL complete.pptx.pptxNPTEL complete.pptx.pptx
NPTEL complete.pptx.pptx
HimanshuKushwah38
 
NPTEL_SEM_3.pdf
NPTEL_SEM_3.pdfNPTEL_SEM_3.pdf
NPTEL_SEM_3.pdf
22mc10sh584
 
21AI401 AI Unit 1.pdf
21AI401 AI Unit 1.pdf21AI401 AI Unit 1.pdf
21AI401 AI Unit 1.pdf
DivyaDivya208851
 
P1
P1P1
P1
lksoo
 
Stackpirt20170222
Stackpirt20170222Stackpirt20170222
Stackpirt20170222
Sharon Liu
 
Sudokureport
SudokureportSudokureport
Sudokureport
Anjalireddy32
 
Low Power 32×32 bit Multiplier Architecture based on Vedic Mathematics Using ...
Low Power 32×32 bit Multiplier Architecture based on Vedic Mathematics Using ...Low Power 32×32 bit Multiplier Architecture based on Vedic Mathematics Using ...
Low Power 32×32 bit Multiplier Architecture based on Vedic Mathematics Using ...
VIT-AP University
 
MachinaFiesta: A Vision into Machine Learning 🚀
MachinaFiesta: A Vision into Machine Learning 🚀MachinaFiesta: A Vision into Machine Learning 🚀
MachinaFiesta: A Vision into Machine Learning 🚀
GDSCNiT
 
Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...
Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...
Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...
IOSR Journals
 
Ai demystified (dbe, south campus)
Ai  demystified (dbe, south campus)Ai  demystified (dbe, south campus)
Ai demystified (dbe, south campus)
SaurabhKhanna31
 
Neural Networks by Priyanka Kasture
Neural Networks by Priyanka KastureNeural Networks by Priyanka Kasture
Neural Networks by Priyanka Kasture
Priyanka Kasture
 
Tutorial olap4j
Tutorial olap4jTutorial olap4j
Tutorial olap4j
Borja A. Espejo García
 
SURVEY ON BRAIN – MACHINE INTERRELATIVE LEARNING
SURVEY ON BRAIN – MACHINE INTERRELATIVE LEARNINGSURVEY ON BRAIN – MACHINE INTERRELATIVE LEARNING
SURVEY ON BRAIN – MACHINE INTERRELATIVE LEARNING
IRJET Journal
 
Introduction to Neural Networks in Tensorflow
Introduction to Neural Networks in TensorflowIntroduction to Neural Networks in Tensorflow
Introduction to Neural Networks in Tensorflow
Nicholas McClure
 
Reds interpretability report
Reds interpretability reportReds interpretability report
Reds interpretability report
Raouf KESKES
 
2011 0480.neural-networks
2011 0480.neural-networks2011 0480.neural-networks
2011 0480.neural-networks
Parneet Kaur
 
FP vs OOP : Design Methodology by Harshad Nawathe
FP vs OOP : Design Methodology by Harshad NawatheFP vs OOP : Design Methodology by Harshad Nawathe
FP vs OOP : Design Methodology by Harshad Nawathe
Chandulal Kavar
 
An approach to solve the N-Queens Problem using Artificial Intelligence algor...
An approach to solve the N-Queens Problem using Artificial Intelligence algor...An approach to solve the N-Queens Problem using Artificial Intelligence algor...
An approach to solve the N-Queens Problem using Artificial Intelligence algor...
IRJET Journal
 

Similar to Intelligent Sudoku Solver (20)

NPTEL complete.pptx.pptx
NPTEL complete.pptx.pptxNPTEL complete.pptx.pptx
NPTEL complete.pptx.pptx
 
NPTEL_SEM_3.pdf
NPTEL_SEM_3.pdfNPTEL_SEM_3.pdf
NPTEL_SEM_3.pdf
 
21AI401 AI Unit 1.pdf
21AI401 AI Unit 1.pdf21AI401 AI Unit 1.pdf
21AI401 AI Unit 1.pdf
 
P1
P1P1
P1
 
Stackpirt20170222
Stackpirt20170222Stackpirt20170222
Stackpirt20170222
 
Sudokureport
SudokureportSudokureport
Sudokureport
 
Low Power 32×32 bit Multiplier Architecture based on Vedic Mathematics Using ...
Low Power 32×32 bit Multiplier Architecture based on Vedic Mathematics Using ...Low Power 32×32 bit Multiplier Architecture based on Vedic Mathematics Using ...
Low Power 32×32 bit Multiplier Architecture based on Vedic Mathematics Using ...
 
MachinaFiesta: A Vision into Machine Learning 🚀
MachinaFiesta: A Vision into Machine Learning 🚀MachinaFiesta: A Vision into Machine Learning 🚀
MachinaFiesta: A Vision into Machine Learning 🚀
 
Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...
Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...
Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...
 
Core java questions
Core java questionsCore java questions
Core java questions
 
Core java questions
Core java questionsCore java questions
Core java questions
 
Ai demystified (dbe, south campus)
Ai  demystified (dbe, south campus)Ai  demystified (dbe, south campus)
Ai demystified (dbe, south campus)
 
Neural Networks by Priyanka Kasture
Neural Networks by Priyanka KastureNeural Networks by Priyanka Kasture
Neural Networks by Priyanka Kasture
 
Tutorial olap4j
Tutorial olap4jTutorial olap4j
Tutorial olap4j
 
SURVEY ON BRAIN – MACHINE INTERRELATIVE LEARNING
SURVEY ON BRAIN – MACHINE INTERRELATIVE LEARNINGSURVEY ON BRAIN – MACHINE INTERRELATIVE LEARNING
SURVEY ON BRAIN – MACHINE INTERRELATIVE LEARNING
 
Introduction to Neural Networks in Tensorflow
Introduction to Neural Networks in TensorflowIntroduction to Neural Networks in Tensorflow
Introduction to Neural Networks in Tensorflow
 
Reds interpretability report
Reds interpretability reportReds interpretability report
Reds interpretability report
 
2011 0480.neural-networks
2011 0480.neural-networks2011 0480.neural-networks
2011 0480.neural-networks
 
FP vs OOP : Design Methodology by Harshad Nawathe
FP vs OOP : Design Methodology by Harshad NawatheFP vs OOP : Design Methodology by Harshad Nawathe
FP vs OOP : Design Methodology by Harshad Nawathe
 
An approach to solve the N-Queens Problem using Artificial Intelligence algor...
An approach to solve the N-Queens Problem using Artificial Intelligence algor...An approach to solve the N-Queens Problem using Artificial Intelligence algor...
An approach to solve the N-Queens Problem using Artificial Intelligence algor...
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 

Intelligent Sudoku Solver

  • 1. INTELLIGENT SUDOKU SOLVER Under the Guidance of Dr. SUNIL PATEKAR Group Members: 1. Amrish Jhaveri 2. Rohit Iyer 3. Krutika Parab UNIVERSITY OF MUMBAI 2012-2013
  • 2. CONTENTS I. INTRODUCTION II. AIMS & OBJECTIVES III. PROBLEM STATEMENT IV. SCOPE V. PROPOSED SYSTEM VI. METHODOLOGY – Expert System VII. BACKTRACKING ALGORITHM VIII. PATTERNS IX. DESIGN – Flow Chart 2 INTELLIGENT SUDOKU SOLVER X. FEATURES XI. CODE SNIPPETS
  • 3. I. INTRODUCTION  Rule: Fill a given grid(9x9) with the numbers 1 to 9, so that every column, row, and 3x3 box the numbers 1 to 9, keeping in mind that the same number doesn’t repeat in that particular row, column or the 3x3 box. 3 INTELLIGENT SUDOKU SOLVER
  • 4. II. AIMS & OBJECTIVES  To successfully implement a novel approach to solve computationally intensive problems like Sudoku.  To solve the classical Sudoku puzzle in a much more efficient way than a conventional Brute Force and Backtracking approach. 4 INTELLIGENT SUDOKU SOLVER
  • 5. III. PROBLEM STATEMENT  Our job is to place a number into every empty box so that each row across, each column down, and each small 9-box square within the large square (there are 9 of these) will contain each number from 1 through 9. Remember that no number may appear more than once in any row across, any column down, or within any small 9-box square. The numbers will be filled with the help of pattern matching. 5 INTELLIGENT SUDOKU SOLVER
  • 6. IV. SCOPE  Our project aims at solving Sudoku using pattern matching.  Assumptions: • Fixed Grid Size: 9 x 9 • Fixed Symbols: 1-9 • Limitations on the number of patterns implemented. 6 INTELLIGENT SUDOKU SOLVER
  • 7. V. PROPOSED SYSTEM  Our project uses five main modules: 1. Reading the input from file. 2. Search for patterns. 3. Provide solution. 4. Solve by Backtracking. 5. Compare the run-time. 7 INTELLIGENT SUDOKU SOLVER
  • 8. VI. EXPERT SYSTEM  In Artificial Intelligence, an Expert System is a computer system that emulates the decision-making ability of a human expert.  It consists of a rule-base (permanent data), an inference engine (process), and a workspace or working memory (temporary data). Not part of the basic reasoning process, but essential to applications, is the user interface. 8 INTELLIGENT SUDOKU SOLVER
  • 10. VI. EXPERT SYSTEM  In our approach the components of expert system are as follows: • Client interface is a command line interface or GUI. • Knowledge base are set of data structures stored which contain prior information needed to proceed. • Rule translator is a function which translates the rule from human understandable form to machine understandable form. For e.g. A function called HiddenSingles() may translate the rule in such a way that the Rule Engine (in our case – our main program)understands. • Knowledge base editor would be a simple text editor which can change/add the built-in rules in the code. • Rule Engine is another function which checks every pattern if it matches a rule or not. 10 INTELLIGENT SUDOKU SOLVER
  • 11. VII. BACKTRACKING ALGORITHM  We basically check that the same number is not present in current row, current column and current 3X3 sub grid. After checking for safety, we assign the number, and recursively check whether this assignment leads to a solution or not. If the assignment doesn’t lead to a solution, then we try next number for current empty cell. And if none of number (1 to 9) lead to solution, we return false. 11 INTELLIGENT SUDOKU SOLVER
  • 12. VIII. PATTERNS  NAKED SINGLE  Any cells which have only one candidate can safely be assigned that value.  It is very important whenever a value is assigned to a cell, that this value is also excluded as a candidate from all other blank cells sharing the same row, column and box 12 INTELLIGENT SUDOKU SOLVER
  • 13.  NAKED SINGLE 13 INTELLIGENT SUDOKU SOLVER VIII. PATTERNS
  • 14.  NAKED PAIR  A Naked Pair (also known as a Conjugate Pair) is a set of two candidate numbers sited in two cells that belong to at least one unit in common. That is they reside in the same row, box or column. 14 INTELLIGENT SUDOKU SOLVER VIII. PATTERNS
  • 15. IX. PATTERNS  NAKED PAIR 15 INTELLIGENT SUDOKU SOLVER
  • 16.  HIDDEN SINGLE  Very frequently, there is only one candidate for a given row, column or box, but it is hidden among other candidates.  In the example on the right, the candidate 6 is only found in the middle right cell of the 3x3 box. Since every box must have a 6, this cell must be that 6. 16 INTELLIGENT SUDOKU SOLVER VIII. PATTERNS
  • 17.  Locked Candidates -I  Sometimes a candidate within a box is restricted to one row or column. Since one of these cells must contain that specific candidate, the candidate can safely be excluded from the remaining cells in that row or column outside of the box. VIII. PATTERNS INTELLIGENT SUDOKU SOLVER
  • 18.  Locked Candidates – I Example In the example above, the right box only has candidate 2's in its bottom row. Since, one of those cells must be a 2, no cells in that row outside that box can be a 2. Therefore 2 can be excluded as a candidate from the highlighted cells. VIII. PATTERNS INTELLIGENT SUDOKU SOLVER
  • 19.  Locked Candidates – II  Sometimes a candidate within a row or column is restricted to one box. Since one of these cells must contain that specific candidate, the candidate can safely be excluded from the remaining cells in the box. VIII. PATTERNS INTELLIGENT SUDOKU SOLVER
  • 20.  Locked Candidates – II Example In the example on the right, the left column has candidate 9's only in the middle box. Therefore, since one of these cells must be a 9 (otherwise the column would be without a 9), 9's can safely be excluded from all cells in this middle box except those in the left column. VIII. PATTERNS INTELLIGENT SUDOKU SOLVER
  • 21. IX. DESIGN (FLOW CHART) 21 INTELLIGENT SUDOKU SOLVER Yes No Yes No Reading Sudoku from a file Search patterns Take necessary action Solved? Print Solution Stop Start Make a smart guess Found
  • 22. X. FEATURES  A Java based Sudoku Solver  Benchmarked at solving 49151 random puzzles within 16159 milliseconds.  Used optimized pattern detection strategies like Naked Singles, Hidden  Singles and Locked Candidates to aid solving.  Reviewed the performance of our solver with existing Sudoku Solvers in the world.  Comprehensive statistical and graphical results to record the solver's performance using JFreeChart API. INTELLIGENT SUDOKU SOLVER
  • 23. We conducted a test on some of the world’s popular and fastest Sudoku solvers. The test consisted of solving 1000 very hard puzzles. We fed the same set of 1000 puzzles to all solvers and result is here…. INTELLIGENT SUDOKU SOLVER
  • 24. OUR OPPONENT…. … a puzzle took 15.5 billion nanoseconds!!! INTELLIGENT SUDOKU SOLVER
  • 25. OUR INTELLIGENT SOLVER…. … a puzzle took 25 million nanoseconds!!! INTELLIGENT SUDOKU SOLVER
  • 26. NO COMPARISON!!! … can’t compare millions with billions!!! INTELLIGENT SUDOKU SOLVER
  • 27. NO COMPARISON!!! … can’t compare millions with billions!!! INTELLIGENT SUDOKU SOLVER
  • 28. XI. CODE SNIPPETS INTELLIGENT SUDOKU SOLVER 28
  • 30. XI. CODE SNIPPETS INTELLIGENT SUDOKU SOLVER 30
  • 31.
  • 32. XI. CODE SNIPPETS INTELLIGENT SUDOKU SOLVER 32
  • 33.
  • 34. Our paper titled - has been reviewed and accepted by International Journal of Scientific Research and Publications and will be published in Volume 3, Issue 5, May 2013. INTELLIGENT SUDOKU SOLVER
  • 35. THANK YOU  We would like to thank our project guide Dr. Sunil Patekar & Prof Mahesh Bhave for helping us identify the flaws and correcting them. We would also like to thank Assistant Professors Rugved Deolekar and Aman Mahadeshwar for their inputs. 35 INTELLIGENT SUDOKU SOLVER