Powerful Sudoku Solver

A function that solves everything but the toughest of sudoku puzzles
2.8K 次下载
更新时间 2008/10/6

查看许可证

SUDOKU_LVL2 - A Sudoku Solver.

Usage : Sol=sudoku_lvl2(A)
Where A is a incomplete sudoku grid (9 x 9) represented as a 9 x 9 matrix of integers (0-9) with the empty cells being filled with zeros.

The algorithm presented here uses the following techniques.
(*) Filling a cell by candidate elimination
(*) Filling a cell by position exclusion for a given candidate
(*) Refining choices of candidates in a given cell by eliminating members
of locked pairs, locked triplets and so on..
(*) Filling the remaining cells by brute force method.

First 3 algorithms are of my own logic. The brute force algorithm is a big improvement over '8466'.

Note : Please note that the aim of this algorithm is to have the most comprehensive logic while trying to have a decent speed. Speed, though, is not the primary criterion.

引用格式

Janardhanan Sivaramakrishnan (2024). Powerful Sudoku Solver (https://www.mathworks.com/matlabcentral/fileexchange/21576-powerful-sudoku-solver), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Sudoku 的更多信息
致谢

参考作品: MATLAB Sodoku Solver - Improved

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Updated some code.