Sudoko Solver

Solves Sudoko
314.0 次下载
更新时间 2015/7/19

查看许可证

This is an improved version of my previous Sudoko solver submission.
The simple 3 roles are expandable to 5 or 6 using common sense, I found them through manually solving lots of Sudokos, they are included in this version.

Still the algorithm does not guess, I'm not a fan of arbitrary guessing as I believe there are some statistical analysis that would lead to an optimized guess (this is to be discovered later), so it only solves the Sudoko based on logic, if there won't be enough info it won't stop (use Ctrl + C to stop it).

Instruction (included in a read me file as well)

First, make a 9x9 variable manually and name it 'in' this is going to be the initial sudoko table, insert the numbers manually, and zero for empty blocks.

>> in=zeros(9,9); % open it and fill it with the known numbers

then double click on 'in' from the workspace and then complete the initial table. Next, run 'table_reader.m' this creates a 9x9x9 variable named 'table'.

Finally, you can run 'Runner_V2.m' and it will solve the sudoko in a second. If it goes beyond a sec then simply use CTRL+C to break the program, this happens when you don't provide enough digits in the initial declaration of 'in', run it again and when you succeed, you'll find a variable named 'finall', double click and see the result.

Some Sudoko samples are provided in .Mat format, based on what variable name they are saved with you may need to run 'table_reader.m' first or directly running 'Runner_v2.m'

引用格式

Salaheddin Hosseinzadeh (2024). Sudoko Solver (https://www.mathworks.com/matlabcentral/fileexchange/45844-sudoko-solver), MATLAB Central File Exchange. 检索来源 .

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

Community Treasure Hunt

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

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

The simple 3 roles are expandable to 5 or 6, I derived them using common sense and manually solving lots of Sudokos. Still, the algorithm does not guess.

1.0.0.0