|
|
| File Information |
| Description |
Game Rules:
Fill in the grid so that every row, every column, and every 3x3 box contains the digits 1 through 9.
Game Board:
The sudoku interface lets the user solve sudoku puzzles graphically. The puzzles are either generated by the built-in puzzle generator (three difficult levels can be chosen), randomly taken from the built-in database of 160 really difficult puzzles, entered manually by the or loaded from three standard ascii sudoku files 'Simple Sudoku' (.ss), 'Sudoku Puzzle' (.sdk) or 'Sudoku Puzzle Collection' (.sdm).
The game board can be saved to Simple Sudoku and Sudoku Puzzle files.
The current board can also be exported to various image-files, such as, png, bmp, eps or tiff. The board can be printed and also copied to clipboard to be pasted as an image in for example a MS Word document.
Game Controls:
The sudoku game can be played using either mouse or keyboard (or both). Move around marker using arrow keys and add a number using number keys. Delete, backspace or 0 (zero) will remove number from board. With mouse you move around marker using left-click and reach a context-menu with number choices using right-click.
Illegal characters can not be entered.
Game Solver:
The sudoku game has two built-in puzzle solvers, one quick and one 'human-like'. The quick one is based on Dancing Links (DLX), a technique suggested by Donald Knuth to efficiently implement his Algorithm X. Algorithm X is a recursive, nondeterministic, depth-first, brute-force algorithm that finds all solutions to the exact cover problem. The human solver finds Naked Singles, Hidden Singles, Naked Pairs and Locked Candidates 1 and 2. If this is not enough it takes a guess and tries to solve it recursively.
The dlx-solver is used for solving and generating puzzles while the human puzzle is used to generate a log of solution steps.
The game allows for automatic solving of the whole puzzle or just one single square. To help the user one can show all possible candidates for unfilled squares as well as showing all mistakes in a different color as well as making it impossible to make an illegal mark.
Extra Game Features:
The sudoku game has Undo and Redo functionality that can be reached from the Edit-menu, Context-menu or by the shortcuts Ctrl-Z (Undo) and Ctrl-R (Redo).
Every time one restarts a game a timer is started. Current time can be shown using Ctrl-T or enable/disabled from the Help menu.
A coloring help of possible candidates can be added to the matrix from the colored numbers in the toolbar.
Example:
sudoku % Start Main Sudoku Interface
sudoku('uitest') % Solve all 160 boards in database (test set) |
| Acknowledgements |
The author wishes to acknowledge the following in the creation of this submission:
Sudoku! (v3.4)
|
| MATLAB release |
MATLAB 7.2 (R2006a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (10) |
| 26 Feb 2007 |
John D'Errico
|
|
|
| 02 Mar 2007 |
Eric Dean
|
|
|
| 04 Mar 2007 |
Ali Karapelit
|
|
|
| 10 Mar 2007 |
Zhijun Wang
|
|
|
| 28 Mar 2007 |
Aasmund Kvamme
|
|
|
| 04 Apr 2007 |
Paul G
|
|
|
| 08 Jun 2007 |
Gersi Rami
|
|
|
| 13 Sep 2007 |
kiko kiko
|
|
|
| 14 Sep 2007 |
Per-Anders Ekström
|
|
|
| 03 Jul 2008 |
tddt dtduh
|
|
|
| Updates |
| 27 Feb 2007 |
Enhanced the toolbar to use a real toolbar. |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com