SUDOKU SOLVER Will Bazil, Ryan Covert, Ricky Parker.

Slides:



Advertisements
Similar presentations
Algorithm Analysis Input size Time I1 T1 I2 T2 …
Advertisements

Heuristic Search techniques
AI Pathfinding Representing the Search Space
Message-Passing and Sudoku Scott Kirkpatrick, HUJI Danny Bickson, HUJI TAU, June 18, 2006.
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
1 Restart search techniques for Employee Timetabling Problems Amnon Meisels And Eliezer Kaplansky Ben-Gurion University.
Eight queens puzzle. The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard such that none of them are able to capture.
Sudoku. Introduction In this presentation I will cover the Sudoku puzzle, some basics of its complexity as well as specifically discussing the complexity.
1 CSC 421: Algorithm Design & Analysis Spring 2013 See online syllabus: (also on BlueLine2) Course.
Algebra and Sudoku By Ashley MacDonald Math 354: Modern Algebra 1
Structured Graphs and Applications
Online Performance Auditing Using Hot Optimizations Without Getting Burned Jeremy Lau (UCSD, IBM) Matthew Arnold (IBM) Michael Hind (IBM) Brad Calder (UCSD)
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Feature Selection for Regression Problems
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Liang, Introduction to Programming with C++, Second Edition, (c) 2010 Pearson Education, Inc. All rights reserved Chapter 8 Multidimensional.
Problem Solving and Search in AI Heuristic Search
Fast Implementation of Lemke’s Algorithm for Rigid Body Contact Simulation Computer Science Department University of British Columbia Vancouver, Canada.
Constraint Systems Laboratory March 26, 2007Reeson–Undergraduate Thesis1 Using Constraint Processing to Model, Solve, and Support Interactive Solving of.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
The Mathematics of Sudoku Helmer Aslaksen Department of Mathematics National University of Singapore
SOLVING THE KAKURO PUZZLE Andreea Erciulescu Department of Mathematics, Colorado State University, Fort Collins (Mentor: A. Hulpke)
Sudoku Puzzles. How to do a 4x4 Sudoku Grid (easiest) Every column, row and mini-grid must contains the numbers 1, 2, 3 and 4. Can you work.
Solving Sudoku Mark PTTLS Micro teach. Solving Sudoku What is a Sudoku? A Sudoku is a number puzzle based on a 9x9 grid made up from smaller 3x3 blocks.
CS194 Project: Sudoku Difficulty Kha Chu Advisor: Professor Sahai.
SUDOKU Via Relaxation Labeling
Efficient Model Selection for Support Vector Machines
1 CSC 427: Data Structures and Algorithm Analysis Fall 2011 See online syllabus (also available through BlueLine): Course goals:
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
EMIS 8381 – Spring Netflix and Your Next Movie Night Nonlinear Programming Ron Andrews EMIS 8381.
2009/11/14GPW20091 Analysis of the Behavior of People Solving Sudoku Puzzles Reijer Grimbergen School of Computer Science, Tokyo University of Technology.
1 N -Queens via Relaxation Labeling Ilana Koreh ( ) Luba Rashkovsky ( )
1 CSC 427: Data Structures and Algorithm Analysis Fall 2010 See online syllabus (also available through BlueLine): Course goals:
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Recursion When to use it and when not to use it. Basics of Recursion Recursion uses a method Recursion uses a method Within that method a call is made.
Data Structures Using C++ 2E1 Recursion and Backtracking: DFS Depth first search (a way to traverse a tree or graph) Backtracking can be regarded as a.
Sudoku Solver Comparison A comparative analysis of algorithms for solving Sudoku.
By: Jeremy Wright Derek Anderson
Propositional Satisfiability A compound proposition is satisfiable if there is an assignment of truth values to its variables that make it true. When no.
Christoph F. Eick: Using EC to Solve Transportation Problems On Initialization and Mutation 1.Values t ij have to be between 0 and min(source(i),distination(j))
Christoph F. Eick: Using EC to Solve Transportation Problems Transportation Problems.
Biologically Inspired Computing: Optimisation This is mandatory additional material for `Biologically Inspired Computing’ Contents: Optimisation; hard.
1 Project Management Example Solving Sudoku 2 What is Sudoku?  Sudoku is a game with 9 columns and 9 rows and 9 “boxes” composed of a 3 x 3 Grid  Numbers.
An Efficient Linear Time Triple Patterning Solver Haitong Tian Hongbo Zhang Zigang Xiao Martin D.F. Wong ASP-DAC’15.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2006 See online syllabus (also available through Blackboard): Course goals:
Ricochet Robots Mitch Powell Daniel Tilgner. Abstract Ricochet robots is a board game created in Germany in A player is given 30 seconds to find.
Chapter 4: Linear Programming Lesson Plan Mixture Problems  Combining Resources to Maximize Profit Finding the Optimal Production Policy Why the Corner.
Monster (“Mega”) Sudoku
Optimization in Engineering Design 1 Introduction to Non-Linear Optimization.
CISC Machine Learning for Solving Systems Problems Presented by: Eunjung Park Dept of Computer & Information Sciences University of Delaware Solutions.
Custom Computing Machines for the Set Covering Problem Paper Written By: Christian Plessl and Marco Platzner Swiss Federal Institute of Technology, 2002.
Sliding blocks puzzle solver Mike Clancy U.C. Berkeley CS Division.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
An Analysis of the n- Queens problem Saleem Karamali.
Hirophysics.com The Genetic Algorithm vs. Simulated Annealing Charles Barnes PHY 327.
Warehouse Lending Optimization Paul Parker (2016).
Various Problem Solving Approaches. Problem solving by analogy Very often problems can be solved by looking at similar problems. For example, consider.
CSC 421: Algorithm Design & Analysis
The Need for Algorithms
Monster (“Mega”) Sudoku
Chapter 4: Linear Programming Lesson Plan
A CIS 5603 Course Project By: Qizhong Mao, Baiyi Tao, Arif Aziz
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer.
CSC 421: Algorithm Design & Analysis
Example Fill in the grid so that every row, column and box contains each of the numbers 1 to 9:
adapted from Recursive Backtracking by Mike Scott, UT Austin
The N-queens problem Team: 404 brain not found
Methods and Materials (cont.)
Sudoku.
The N-Queens Problem Search The N-Queens Problem Most slides from Milos Hauskrecht.
Presentation transcript:

SUDOKU SOLVER Will Bazil, Ryan Covert, Ricky Parker

Abstract ■A Sudoku puzzle is a 9x9 grid composed of 9 rows, 9 columns, and 9 3x3 blocks. ■In order for a Sudoku puzzle to be considered solved each row, column, and block must contain the numbers 1 through 9. ■6,670,903,752,021,072,936,960 possible solutions as calculated by Bertram Felgenhauer and Frazer Jarvis in ■Our goal was to find the most efficient way to solve a Sudoku puzzle.

Formal Definition

Contributions ■James Crook, professor emeritus of Computer Science at Winthrop University, wrote a paper called “A Pencil-and-Paper Algorithm for Solving Sudoku Puzzles” that we based our implementation of Crook’s algorithm on. ■Martin Křivánek wrote his Master Thesis on finding algorithms to determine the difficulty of a puzzle and found that no algorithm is good at predicting the difficulty of a puzzle with accuracy. The metrics used to determine a puzzles difficulty are somewhat ambiguous and there are no rules set in stone.

Algorithms ■Backtracking –An exhaustive algorithm ■Stochastic Search –A type of random algorithm, for example genetic ■Crooks Algorithm –A “pencil and paper” algorithm that can be solved by hand

Benchmarks ■Number of Iterations ■Average Time ■We used five puzzles of each difficulty, easy, medium, and hard, to see how different algorithms performed under different loads.

Graphs For Easy Puzzles

Graphs For Medium Puzzles

Graphs For Hard Puzzles

Graphs For All Puzzles

Conclusions ■EXHAUSTIVE –Always the most expensive for number of iterations. –However, due to the lightweight nature of the individual iterations it was often quite fast, very often the fastest. ■STOCHASTIC –Was a form of genetic algorithm. –Got stuck at local minimums very often, due to the shear number of possibilities and the specificity of Sudoku puzzles. –Due to this, it was always the most time consuming method even though it was often cheaper than the exhaustive in iterations. –Not a very good choice of algorithm for this type of problem. ■CROOKS –Our implementation of Crooks algorithm was by far the cheapest in amount of iterations, solving many easy puzzles in fewer than ten iterations and hard puzzles in as little as fifty iterations. –It was generally comparable in time cost to our exhaustive method but on average slower because Crook’s has to check many more positions of the puzzle per iteration. –Crook’s would easily surpass exhaustive if it was optimized more and coded to recognize more complicated patterns, such as the x wing.

Questions ■What constitutes a Stochastic search? –A Stochastic algorithm is one that finds its solution by using randomly generated variables. ■What algorithms did Křivánek find to be the best at determining the difficulty of a Sudoku puzzle in his research? –None, there are no algorithms that can accurately determine the difficulty of a Sudoku puzzle. This is because there is no standardized metric for determining difficulty. ■What were the best algorithms iteratively, and were they also the fastest? –Crook’s was the best algorithm iteratively, followed by Stochastic. They were not, however, the fastest on average. ■What was Crook’s algorithm mimicking? –The way a human solves a Sudoku puzzle via pencil and paper. ■Why was Crook’s algorithm on average slower than our exhaustive method when it was so good iteratively? –Individual iterations take much longer in Crook’s than in an exhaustive implementation.

Future Work ■Improve our implementation of Crook’s algorithm by optimizing it and introducing more complex techniques, such as x-wings. ■Try other algorithms to get faster results. ■Monitor ongoing efforts to finding a standardized way of determining the difficulty of Sudoku puzzles.