Sudoko Solver

Solves Sudoko
ダウンロード: 314
更新 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 Center および MATLAB AnswersSudoku についてさらに検索

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