Page 1 of 1

Silver's Sudoku Solver 5000

Posted: Thu Jan 19, 2017 11:13 pm
by Sir_Silver
Hi, been kind of a long time since I've wanted to make anything - or pretty much finished anything, so here's something!

A Sudoku puzzle solver!

Just click on any square and start putting in some numbers, such that you can attempt to solve any Sudoku puzzle, you can even clear it to benchmark the solving speed and stuff like that, check it out (just don't look at the code unless you want your eyes to bleed). Oh, yeah, and it has neato little sound effects when you press the buttons. =)

Image
sudoku_solver.love
An almost complete sudoku solver, complete with bugs.
(165.38 KiB) Downloaded 109 times

Re: Silver's Sudoku Solver 5000

Posted: Fri Jan 20, 2017 5:57 am
by xNick1
Awesome :D

Re: Silver's Sudoku Solver 5000

Posted: Fri Jan 20, 2017 9:27 am
by ivan
Pretty cool and the important thing is that it works.
Good job on the GUI, it's always nice to see how an algorithm works in realtime.
The code looks brute force which is fine,
my only suggestion is to separate the logic from the GUI,
so that you have a separate (pure Lua) file with the rules of Sudoku that handles the search.
This way you can later swap the solver with something more sophisticated.
Another way to write a Sudoku solver could be using Hamiltonian paths,
it's certainly an interesting search problem that I might try at some point in the future.

Re: Silver's Sudoku Solver 5000

Posted: Fri Jan 20, 2017 1:03 pm
by ken.athomos
I remember trying to do sudoku when I was in my teens. I sucked at it. So this is really amazing to me :)

Re: Silver's Sudoku Solver 5000

Posted: Sat Jan 21, 2017 7:10 pm
by Sir_Silver
Thank you all for checking it out! :P
@Ivan, I like the idea of being able to use different solve algorithms, that may end up being a future possibility!