SOLVING SUDOKU WITH MATLAB

Slides:



Advertisements
Similar presentations
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Advertisements

Enter the application Click to advance to the next slide.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
Excel and VBA Creating an Excel Application
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
PowerPoint: Tables Computer Information Technology Section 5-11 Some text and examples used with permission from: Note: We are.
Graphical Tree-Based Scientific Calculator: CalcuWiz Will Ryan Christian Braunlich.
SOLVING SUDOKU WITH MATLAB VERIFICATION FUNCTION correctness verification of the puzzle: checks if the current element appears twice in the same line,
SUDOKU Via Relaxation Labeling
Sudoku Puzzles Frank Hilvers Taylor O’Brien. The History of Sudoku The history of Sudoku puzzles dates back to the 18th century.  Swiss mathematician.
Querying and Sorting IT Key Ideas, Dynamic Database Systems, 2002 Chapter 3.
Programming a GUI Hanan sedaghat pisheh. For calling GUI, we need a function with no inputs or outputs First We create a m.file m file has the same name.
Databases and LINQ Visual Basic 2010 How to Program 1.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2011 See online syllabus (also available through BlueLine): Course goals:
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Matlab GUIs GUIDE.
Field Trip #26 Create a Find a Word Puzzle in Java By Keith Lynn.
Introduction to Matlab & Data Analysis
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
SOLVING SUDOKU WITH MATLAB Raluca Marinescu, Andrea Garcia, Ivan Castro, Eduard Enoiu Mälardalen University, Västerås,
Spreadsheets Entry-L2.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
G RAPHICAL U SER I NTERFACE C ONCEPTS : P ART 1 1 Outline Introduction Windows Forms Event-Handling Model - Basic Event Handling.
2009/11/14GPW20091 Analysis of the Behavior of People Solving Sudoku Puzzles Reijer Grimbergen School of Computer Science, Tokyo University of Technology.
QML Qt Quick with QML and you can use JavaScript for engine along C++ Started to be released since late 2009 (Qt 4.7) Nokia focused on that for the Symbian/Meego.
Web 2.0 Tools SMART Notebook Math Tools By Joanna Snyder.
Introduction to Matlab’s Graphical User Interface (GUI) Type “guide” “Guide” creates interface on a Figure window and code in an M-file. Some hidden code.
Copyright © Curt Hill First Window Builder Program Easy GUIs in Eclipse.
Introduction to Windows Programming
Graphic User Interface. Graphic User Interface (GUI) Most of us interact with computers using GUIs. GUIs are visual representations of the actions you.
Sudoku Solver Comparison A comparative analysis of algorithms for solving Sudoku.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
SOLVING SUDOKU WITH MATLAB Raluca Marinescu, Andrea Garcia, Ivan Castro, Eduard Enoiu Mälardalen University, Västerås,
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Chapter 2 – Introduction to the Visual Studio .NET IDE
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
GUI Programming using NetBeans. RHS – SOC 2 GUI construction We have previously talked about elements in a (simple) GUI –Frames, Panes and Dialogs –Text.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
1. 2 Word Processing Word Processing is writing words and sentences on the computer. It is easy to change or move text in a word document. People use.
Image Segmentation in Color Space By Anisa Chaudhary.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2006 See online syllabus (also available through Blackboard): Course goals:
EGR 115 Introduction to Computing for Engineers
Sudoku is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9x9 grid with digits so that each column, each row, and each.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 18 Getting Started with Excel Essentials 1 Morrison / Wells / Ruffolo.
Lecture (7) Introduction to GUI Eng. Osama Talaat 1.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
1 CSC 221: Computer Programming I Fall 2009 Introduction to programming in Scratch  animation sprites  motion, control & sensing  costume changes 
PATTERN RECOGNITION LAB 8 TA : Nouf Al-Harbi::
1 Lesson 18 Getting Started with Excel Essentials Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Morrison / Wells.
More Matlab Graphics and GUI Graphics subplots some useful commands 3D graphics GUI GUI controls The callback property Other essential properties.
Introducing Scratch Learning resources for the implementation of the scenario
軟體實作與計算實驗 1  SUDOKU  New  Play  Check Lecture 8II SUDOKU PUZZLE.
Graphical User Interface in MATLAB
Chapter 2 – Introduction to the Visual Studio .NET IDE
Chap 7. Building Java Graphical User Interfaces
More on Graphical User Interfaces
Graphical User Interfaces -- Introduction
Assignment 4 For this assignment refer to the notes on MATLAB from an MIT course that you can find here (or at the original website, lectures 14, 15, 16).
Simple Windows Applications
Objective: Today we will investigate the ‘magic’ in magic squares.
Sudoku.
Take-off Products and Solutions for Public Information Providers
Presentation transcript:

SOLVING SUDOKU WITH MATLAB Raluca Marinescu, Andrea Garcia, Ivan Castro, Eduard Enoiu

Background Of Sudoku From the Japanese: ”SU”, means ”number” and ”DOKU”, means ”single”. It is based on the concept of Latin Squares (similar to magic squares) introduced by Leonhard Euler in the 18th century. The board is composed by a 9x9 grid. The whole grid is divided into sub-squares containing a 3x3 grid each. The purpose of the game is to insert numbers (1-9) in the board without repeating a number in each row, column or sub-square.

Problem Description Design and Implement a Sudoku Puzzle Solver using Matlab.

Graphical User Interface Implemented using Matlab’s GUI Design Environment (GUIDE). Used drag & drop components to create the layout. Each component has: A list of properties that can be edited (color, size, position, etc) Callback functions to model its behavior. Static Text Textbox Button

Graphical User Interface Functionality is achieved using four buttons: Random Creates and displays a random game Solve Solves the game and displays the solution Verify Verifies the correctness of the game Clear Clears the board

Graphical User Interface Clear Random Solve 4 2 3 1 Verify Simplified program operation: Games are loaded from an Excel database. Random game is displayed. Game matrix is sent to the sudoku algorithm. Solved matrix is received and displayed.

Graphical User Interface Example of a callback function (Clear button): Function that is called after the event (mouse click) % --- Executes on button press in ClearBtn. function ClearBtn_Callback(hObject, eventdata, handles) % handles structure with handles and user data (see GUIDATA) %Clear the board for rowInd = 1:9 for colInd = 1:9 cName = ['c' num2str(rowInd) num2str(colInd)]; cValue = ''; expr = ['set(handles.' cName ', ''String'', ''' cValue ''',... ''FontWeight'', ''normal'', ''Enable'', ''on'')']; eval(expr); end set(handles.SolveBtn, 'Enable', 'off'); set(handles.verifyBtn, 'Enable', 'off'); Puts an empty string on every textbox component in the board Disables the buttons

Conclusions There is a large number of possible algorithms to solve Sudoku puzzles, from the brute force algorithm to stochastic search algorithms. Finding a suitable algorithm to solve any particular Sudoku game proved to be very difficult. Using a GUI helped the developers to generate Sudoku games and verify solutions in a simple and quick way. The obtained results using the implemented Sudoku solver have been successful, for this reason we don’t foresee any major changes to our solution.

Demo