Solving using Excel

Programs which generate, solve, and analyze Sudoku puzzles

Solving using Excel

Postby David Messenger » Mon Jun 27, 2005 9:43 pm

I tried my first ever Sudoku, from a local newspaper, a few days ago on the 25/06/05 and it took me about 1 and a half hours until I worked out the logic.

As an experiment I wrote the logic into a Excel spreadsheet and made it either (a) provide suggestions (b) highlight which cells have only 1, 2 or 3 posible solutions (c) Solve the entire puzzle.

Spreadsheet is still being changed and I havent written any instructions for it as yet.

Realise this defeats the purpose a fair bit but I was more interested in understanding and demonstrating the logic rules than spending time manually working through them.

Haven't tried the hard levels ones as yet but it generally solves the medium level ones in under 5 seconds if you ask it to do it fully automatically.

Has anyone tried anything similar ?
David Messenger
 
Posts: 3
Joined: 27 June 2005

Re: Solving using Excel

Postby scrose » Tue Jun 28, 2005 12:46 am

David Messenger wrote:Has anyone tried anything similar ?

I remember looking at this one recently. Could you please provide a link to your own spreadsheet?

Update: Here are a bunch more I found via Google.

http://www.naturalmaths.com.au/sudoku.htm
http://www.harismind.com/sudoku.html
http://www.di-mgt.com.au/sudoku.html
http://www.andypope.info/fun/sudoku.htm
http://www.sudoku-xls.com/sudmain.html
scrose
 
Posts: 322
Joined: 31 May 2005

Postby David Messenger » Tue Jun 28, 2005 2:11 am

Thanks for the website links.

Nice to know I am not the only sad individual in the world with too much time on my hands. It was interesting trying to come up with a method.

Will further test and refine spreadsheet a bit before making it available. Currently about 100 kb file.

Doing a quick 2 minute compare against the others shown mine actually explains visually what it is doing to come up with the solution rather than just give it to you.

Mine also uses 98 % straight Excel rather than Visual Basic so it is more understandable to non programmers.
Last edited by David Messenger on Mon Jun 27, 2005 10:13 pm, edited 1 time in total.
David Messenger
 
Posts: 3
Joined: 27 June 2005

Postby scrose » Tue Jun 28, 2005 2:13 am

David Messenger wrote:mine actually explains visually what it is doing to come up with the solution rather than just give it to you.

Yes, from what you wrote, it sounds as if your spreadsheet does a better job of explaining the how and why of each move. I will be interested to look at it once you provide a link. Thanks!
scrose
 
Posts: 322
Joined: 31 May 2005

Postby David Messenger » Tue Jun 28, 2005 2:37 am

Continuing to read more of this forum and some of the harder examples. A lot to it !

And not surprisingly the spreadsheet aint smart enough for all of them yet.

Once I understand more of the terminology quoted and methods used I will add more to the spreadsheet and continue to try.
David Messenger
 
Posts: 3
Joined: 27 June 2005

Postby scrose » Tue Jun 28, 2005 2:56 am

Here are a couple websites that do a good job of explaining the various techniques.

http://www.simes.clara.co.uk/programs/sudokutechniques.htm
http://www.angusj.com/sudoku/hints.php

In case you hadn't already come across it, there is a forum specifically for programmers. If you are looking for help regarding how to write code (or Excel functions) to implement the more complex techniques, the folks there can likely offer assistance.

You could also look at the open-source code of rubylips' solver to get an idea of how he handles the trickier techniques.

(I'm not trying to steer you away from this forum; I'm only trying to point you in the direction where you're likely to get the most help (and only if you happen to need it).)
scrose
 
Posts: 322
Joined: 31 May 2005


Return to Software