Monster (“Mega”) Sudoku

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Constraint Satisfaction Patrick Prosser. An Example, Exam Timetabling Someone timetables the exams We have a number of courses to examine how many? Dept.
CREATED BY: CALVIN WILLIAMS Bidirectional Search.
Constraint Satisfaction Problems (Chapter 6). What is search for? Assumptions: single agent, deterministic, fully observable, discrete environment Search.
Constraint Satisfaction Problems
This lecture topic (two lectures) Chapter 6.1 – 6.4, except
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
CS162 Week 2 Kyle Dewey. Overview Continuation of Scala Assignment 1 wrap-up Assignment 2a.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
Constraint Satisfaction Problems
Constraint Satisfaction
Constraint Systems Laboratory March 26, 2007Reeson–Undergraduate Thesis1 Using Constraint Processing to Model, Solve, and Support Interactive Solving of.
A game of logic where the player must assign the numbers 1..9 to cells on a 9x9 grid. The placement of the numbers must be such that every number must.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Midterm II Solution Prof. Mohamed Batouche Department of Computer Science CCIS – King Saud University Saudi Arabia.
Chapter 5 Outline Formal definition of CSP CSP Examples
Constraint Satisfaction Problems
CS194 Project: Sudoku Difficulty Kha Chu Advisor: Professor Sahai.
SOLVING SUDOKU WITH MATLAB VERIFICATION FUNCTION correctness verification of the puzzle: checks if the current element appears twice in the same line,
Constraint Satisfaction Problems
Constraint Satisfaction Problems
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 4 Constraint Satisfaction Problems Instructor: Alireza Tavakkoli September 17, 2009 University.
Constraint Satisfaction Problems (CSPs) Chapter 6.1 – 6.4, except
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Constraint Satisfaction Problems (CSPs) This lecture topic (two lectures) Chapter 6.1 – 6.4, except Next lecture topic (two lectures) Chapter 7.1.
Sudoku Solver Comparison A comparative analysis of algorithms for solving Sudoku.
Constraint Satisfaction CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
CSC 8520 Spring Paula Matuszek Based on Hwee Tou Ng, aima.eecs.berkeley.edu/slides-ppt, which are based on Russell, aima.eecs.berkeley.edu/slides-pdf.
Propositional Satisfiability A compound proposition is satisfiable if there is an assignment of truth values to its variables that make it true. When no.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
1 Chapter 5 Constraint Satisfaction Problems. 2 Outlines  Constraint Satisfaction Problems  Backtracking Search for CSPs  Local Search for CSP  The.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
CSC 8520 Spring Paula Matuszek CS 8520: Artificial Intelligence Search 3: Constraint Satisfaction Problems Paula Matuszek Spring, 2013.
Review Test1. Robotics & Future Technology Future of Intelligent Systems / Ray Kurzweil futurist Ray Kurzweil / A Long Bet A Long Bet / Robot Soccer.
Artificial Intelligence Tutorials
Maintaining Arc Consistency (MAC) MAC is the same as Back-tracking, but with calls to AC-3 interleaved... function Backtracking-Search(csp) returns.
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Backtracking & Brute Force Optimization Intro2CS – weeks
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
CompSci Problem Solving: Sudoku  Rules of the Game Sudoku is played with a 9 by 9 "board" consisting of nine 3 by 3 sub-boards. The symbols 1 -
CS 171: Intro to AI Discussion Week 2 Jan 15 th 2016.
SAT Encodings for Sudoku Bug Catching in 2006 Fall Sep. 26, 2006 Gi-Hwon Kwon.
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
1 Hojjat Ghaderi [Courtesy of Fahiem Bacchus], University of Toronto, Fall 2006 CSC384: Intro to Artificial Intelligence Backtracking Search I ● Announcements.
CMPT 463. What will be covered A* search Local search Game tree Constraint satisfaction problems (CSP)
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
Monster (“Mega”) Sudoku
Constraint Satisfaction Problem
Modeling Sudoku as a CNF Formula
Incorporating Constraint Checking Costs in Constraint Satisfaction Problem Suryakant Sansare.
Sudoku (数独 sūdoku?), also known as Number Place or Nanpure, is a logic-based placement puzzle. The objective is to fill the grid so that every column,
CS Software Studio Assignment 1
Sudoku.
Modeling Sudoku as a CNF Formula
Constraint Satisfaction
Constraint Satisfaction Problems
Constraint Satisfaction Problems (CSP)
Presentation transcript:

Monster (“Mega”) Sudoku NxN grid, N = p * q, a composite number > 9 N symbols or tokens, the first N symbols of 1 … 9 A B … Z A = 10, B = 11 = 11, …, Z = 35 (extended hexadecimal encoding) N blocks, each block with p rows and q columns The N blocks fit regularly into the NxN grid p blocks fit horizontally (p blocks x q columns/block = N columns) q blocks fit vertically (q blocks x p rows/block = N rows) Some elements of the NxN grid already have symbols Fill in the rest of the NxN grid with symbols under constraints No symbol appears twice in any row No symbol appears twice in any column No symbol appears twice in any block Often called the “AllDiff” constraint

Examples p = 3, q = 4, N = 3x4 = 12 p = 4, q = 4, N = 4x4 = 16

You Will Write Code: MUST RUN ON OPENLAB.ICS.UCI.EDU Code that inputs a Monster Sudoku puzzle Input parameters N, p, q to define the grid and blocks Which symbols already are on which grid elements Code that generates a random Monster Sudoku puzzle Input parameter M the number of symbols initially on grid Symbols are chosen and placed randomly respecting constraints Code that solves a Monster Sudoku puzzle Node consistency, arc consistency, path consistency (6.2) Backtracking search (6.3) Variable and value ordering: minimum-remaining values, degree heuristic, least-constraining-value (6.3.1) Forward checking (6.3.2) Extra Bonus Credit: Local search for CSPs: min-conflict heuristic (6.4)

You Will Analyze: For each value of N there is a “hardest” value of M For each of an increasing series of N, find the corresponding M How does M change as N increases? What is the biggest N for which you reliably solve the “hardest” M? How does solution time grow with increasing N for “hardest” M? What is the relative contribution of the various CSP heuristics?

Hard satisfiability problems

Hard satisfiability problems Median runtime for 100 satisfiable random 3-CNF sentences, n = 50

Sudoku Backtracking Search + Forward Checking R = [number of initially filled cells] / [total number of cells] R = [number of initially filled cells] / [total number of cells] R = [number of initially filled cells] / [total number of cells] Success Rate = P(random puzzle is solvable) [total number of cells] = 9x9 = 81 [number of initially filled cells] = variable