Message-Passing and Sudoku Scott Kirkpatrick, HUJI Danny Bickson, HUJI TAU, June 18, 2006.

Slides:



Advertisements
Similar presentations
© Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems Introduction.
Advertisements

Heuristic Search techniques
Generating Random Numbers
Random Number Generation. Random Number Generators Without random numbers, we cannot do Stochastic Simulation Most computer languages have a subroutine,
Junction Trees And Belief Propagation. Junction Trees: Motivation What if we want to compute all marginals, not just one? Doing variable elimination for.
Playing Fair at Sudoku Joshua Cooper USC Department of Mathematics.
Optimal Policies for POMDP Presented by Alp Sardağ.
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.
Search by partial solutions. Where are we? Optimization methods Complete solutions Partial solutions Exhaustive search Hill climbing Random restart General.
Easy Optimization Problems, Relaxation, Local Processing for a small subset of variables.
Belief Propagation by Jakob Metzler. Outline Motivation Pearl’s BP Algorithm Turbo Codes Generalized Belief Propagation Free Energies.
Planning under Uncertainty
Chapter 9 Gauss Elimination The Islamic University of Gaza
Simple Neural Nets For Pattern Classification
Belief Propagation, Junction Trees, and Factor Graphs
Analysis of Algorithms CS 477/677
Error detection and correction
Constraint Systems Laboratory March 26, 2007Reeson–Undergraduate Thesis1 Using Constraint Processing to Model, Solve, and Support Interactive Solving of.
Hashing General idea: Get a large array
Simulation Basic Concepts. NEED FOR SIMULATION Mathematical models we have studied thus far have “closed form” solutions –Obtained from formulas -- forecasting,
Easy Optimization Problems, Relaxation, Local Processing for a small subset of variables.
1 Message Passing and Local Heuristics as Decimation Strategies for Satisfiability Lukas Kroc, Ashish Sabharwal, Bart Selman (presented by Sebastian Brand)
The Mathematics of Sudoku Helmer Aslaksen Department of Mathematics National University of Singapore
Algorithm design techniques
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.
Systems of Linear Equations Block 44. System of Linear Equations A system of equations is a set or collection of equations that you deal with all together.
CS194 Project: Sudoku Difficulty Kha Chu Advisor: Professor Sahai.
SUDOKU Via Relaxation Labeling
Universidad de los Andes-CODENSA The Continuous Genetic Algorithm.
Feng Lu Chuan Heng Foh, Jianfei Cai and Liang- Tien Chia Information Theory, ISIT IEEE International Symposium on LT Codes Decoding: Design.
Random Graph Models of Social Networks Paper Authors: M.E. Newman, D.J. Watts, S.H. Strogatz Presentation presented by Jessie Riposo.
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
An advanced greedy square jigsaw puzzle solver
Two Way ANOVA ©2005 Dr. B. C. Paul. ANOVA Application ANOVA allows us to review data and determine whether a particular effect is changing our results.
Chapter 1 Section 1.1 Introduction to Matrices and systems of Linear Equations.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Simulated Annealing.
Patent Pending New Minimum Number of Clues Findings to Sudoku-derivative Games up to 5-by-5 Matrices including a Definition for Relating Isotopic Patterns.
Whiteboardmaths.com © 2008 All rights reserved
Sudoku Solver Comparison A comparative analysis of algorithms for solving Sudoku.
HKOI2006 Analysis and Solution Junior Q3 – Sudoku HKOI Training Team
Survey Propagation. Outline Survey Propagation: an algorithm for satisfiability 1 – Warning Propagation – Belief Propagation – Survey Propagation Survey.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 6.4.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © Dr. John Lipp.
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
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.
March 23 & 28, Hashing. 2 What is Hashing? A Hash function is a function h(K) which transforms a key K into an address. Hashing is like indexing.
Chapter 9 Gauss Elimination The Islamic University of Gaza
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
M3 1.5 Systems of Linear Inequalities M3 1.5 Systems of Linear Inequalities Essential Questions: How can we write and graph a system of linear inequalities.
Chapter 4: Linear Programming Lesson Plan Mixture Problems  Combining Resources to Maximize Profit Finding the Optimal Production Policy Why the Corner.
Heuristic Functions. A Heuristic is a function that, when applied to a state, returns a number that is an estimate of the merit of the state, with respect.
Copyright © 2007 Pearson Education, Inc. Slide 7-1.
How Do I Solve This Thing?. You are familiar with Sudoku puzzles. For this variation, place the integers 1 – 9 into each row or column such that the.
Monster (“Mega”) Sudoku
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison- Wesley Systems of Equations in Three Variables Identifying Solutions Solving Systems.
Phase Transitions – like death and taxes? Why we should care; what to do about it. Scott Kirkpatrick, Hebrew University, Jerusalem With thanks to: Uri.
SUDOKU SOLVER Will Bazil, Ryan Covert, Ricky Parker.
Optimized SAT Encoding For Sudoku Puzzles Will Klieber and Gi-Hwon Kwon Sept 27, 2007 rev. 2 Changes from v1: Added a new slide after “A Better Encoding.
Web Mining Link Analysis Algorithms Page Rank. Ranking web pages  Web pages are not equally “important” v  Inlinks.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
The Search for Scalable Solution Methods for very Large Problems
Copyright © Cengage Learning. All rights reserved.
Use ELIMINATION (also known as LINEAR COMBINATIONS) !!
Chapter 7: Matrices and Systems of Equations and Inequalities
Solving Linear Systems by Linear Combinations (Elimination)
Sudoku.
The N-Queens Problem Search The N-Queens Problem Most slides from Milos Hauskrecht.
Presentation transcript:

Message-Passing and Sudoku Scott Kirkpatrick, HUJI Danny Bickson, HUJI TAU, June 18, 2006

What is Sudoku? 9x9 puzzles: Easy: >35 clues (43% of squares) Evil: <25 clues (30% of squares) 16x16 puzzles: Easy > 150 clues (60% of squares) Evil: < 110 clues (43% of squares) nxn puzzle has O ( (n!)^n configurations ) Sudokus are automatically generated, using some proprietary tricks plus known algorithms. k^2 x k^2 puzzles… Copyright 2006:

Where do Sudokus come from? Build bottom-up from a completely concealed solution. –Use a solver which instantiates the desired set of solution rules. Easy – elimination only Medium – elimination plus uniqueness plus …? Hard, Evil, Demonic, … -- use various multipoint extrapolation chains of increasing length –Expose squares of the solution until the solver succeeds. Start with the solution exposed and conceal until the problem is hard enough. –This needs a fast exhaustive solver, which halts when a second solution is found, or proves uniqueness. Plus a test for desired degree of difficulty. Are the results the same from top and from bottom?

Why study Sudoku? Reasons not to bother: –Won’t make the world a better place –9x9 problems are small enough for exact analysis, larger problems too large for most humans to find interesting Reasons for its interest: –This is a new category of statistical mechanics, distinct from Optimization (ground states of spin glasses) Stochastic encoding and decoding (uniform embeddings) –Requirement for unique solution requires finding and dealing with very rare states (not unlike ground states) –Belief propagation not expected to work in such dense graphs

Unique solutions are quite rare Odd, even puzzles differ. Part of the reason is the middle square (in odd puzzles).

Entropy for random initial conditions 1 of 10 initial conditions makes an easy puzzle (based only on 9x9, 16x16 cases)

Beliefs for Sudoku Most natural set of beliefs are probabilities that the entry in each square takes a particular value. Update rule: Probability that square i takes value j is product that no other square in same row, column, or region is j. This converges, even though this is an extremely loopy graph: But is it useful?

Beliefs converge, but… Despite loopiness, beliefs converge, but may represent a linear combination of possible solutions Decimation moves this process forward. Beliefs improve steadily. Beliefs evaluated with this simple formula can violate a different normalization – each variable must appear only once per region.

BP effectiveness and next steps Easy and Medium Sudokus almost always solved using BP, decimation, and uniqueness within some region. Hard Sudokus solved all,½, ¼, or 1/8 of the time. –Why? This is a measure of remaining search depth. Evil Sudokus require additional rules (extending evidence from pairs of sites) to solve many, with the remainder succeeding ½, ¼ of the time. So it appears the simplest BP simply reproduces a rule, called “elimination” and works when loopy because of the absence of frustration. Next step is more accurate calculation of probabilities.