Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

Fast PC Solver

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku
View previous topic :: View next topic  
Author Message
TomFox

Joined: 30 Mar 2008
Posts: 4
:

Items
PostPosted: Sun Mar 30, 2008 6:23 am    Post subject: Fast PC Solver Reply with quote

As you all can see I am a newbie here. My main interest has been the writing of a super fast Sudoku solving program. I write in '86 Assembler for this reason. My recent project has yealded a Multi-solution solver, solving a 9x9 puzzle with over 1,600 unique solutions in about 200ms. Maybe not very useful in itself but facinating.

If anyone would like to try it (it runs under DOS/Windows) and is less than 20kByte in size, give me your email address and I will send it as an attachment. I would appreciate your comments. After and if any interest I will discuss the techniques I used. Thanks.
Back to top
View user's profile Send private message
ChPicard

Joined: 12 Mar 2008
Posts: 82
:
Location: Montreal, Canada

Items
PostPosted: Sun Mar 30, 2008 9:55 am    Post subject: Re: Fast PC Solver Reply with quote

TomFox wrote:
solving a 9x9 puzzle with over 1,600 unique solutions in about 200ms


Wow!

Please send me your solver.

Is it possible to use your solver with a batch file of sudokus?

I generate 1 million sudokus and I am wondering if the file contains a 16 given sudoku.

Please give me also the command line to do that.

Thank you very much
Back to top
View user's profile Send private message
gsf

Joined: 18 Aug 2005
Posts: 411
:
Location: NJ USA

Items
PostPosted: Sun Mar 30, 2008 2:28 pm    Post subject: Re: Fast PC Solver Reply with quote

TomFox wrote:
As you all can see I am a newbie here. My main interest has been the writing of a super fast Sudoku solving program. I write in '86 Assembler for this reason. My recent project has yealded a Multi-solution solver, solving a 9x9 puzzle with over 1,600 unique solutions in about 200ms. Maybe not very useful in itself but facinating.

If anyone would like to try it (it runs under DOS/Windows) and is less than 20kByte in size, give me your email address and I will send it as an attachment. I would appreciate your comments. After and if any interest I will discuss the techniques I used. Thanks.

here is a timing benchmark circa ~2005
how long at what Ghz to count all solutions in this pseudo-puzzle
Code:
536020900008000000000000000600285009000903000800761004000000000004000000201000007


Last edited by gsf on Mon Mar 31, 2008 12:56 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
gsf

Joined: 18 Aug 2005
Posts: 411
:
Location: NJ USA

Items
PostPosted: Sun Mar 30, 2008 2:33 pm    Post subject: Re: Fast PC Solver Reply with quote

ChPicard wrote:
TomFox wrote:
solving a 9x9 puzzle with over 1,600 unique solutions in about 200ms

Is it possible to use your solver with a batch file of sudokus?
I generate 1 million sudokus and I am wondering if the file contains a 16 given sudoku.
Please give me also the command line to do that.

you can compare it against my solver with this command line (options for speed over technique)
Code:
sudoku -u -M- -qFN -e valid puzzles.dat

to filter out minimal puzzles use this -e expression
Code:
-e 'valid&&minimal==1'
Back to top
View user's profile Send private message Visit poster's website
TomFox

Joined: 30 Mar 2008
Posts: 4
:

Items
PostPosted: Mon Mar 31, 2008 12:45 am    Post subject: Fast Solver Reply with quote

To ChPicard,
Thanks for showing interest. I can send you the program file by email if you PM me your email address. I have sent this already to several people using this method (attachment). As yet it is not a batch processor nor a command-line input program. However these can be programed if necessary. Simply try it and see for yourself first.
Back to top
View user's profile Send private message
TomFox

Joined: 30 Mar 2008
Posts: 4
:

Items
PostPosted: Mon Mar 31, 2008 12:50 am    Post subject: Reply with quote

To gsf,
I will get back to you on that benchmark, will be interesting.
Back to top
View user's profile Send private message
TomFox

Joined: 30 Mar 2008
Posts: 4
:

Items
PostPosted: Mon Mar 31, 2008 4:14 am    Post subject: Re: Fast PC Solver Reply with quote

To gsf


how long at what Ghz to count all solutions in this pseudo-puzzle
Code:
00000000600285009000903000800761004000000000004000000201000007
[/quote]


Not sure your syntax there but do I understand the string as a 9x9 puzzle reading one row at a time left to right. If so there are only 62 data there, should there be 81? Anyway with the data provided I cannot tell you the total solutions. My counter wraps round at about 65000 solutions and it just kept going (over 650,000). So I stopped it. I think I may have taken your data wrong or miss understood. Sorry.
Back to top
View user's profile Send private message
gsf

Joined: 18 Aug 2005
Posts: 411
:
Location: NJ USA

Items
PostPosted: Mon Mar 31, 2008 1:00 pm    Post subject: Re: Fast PC Solver Reply with quote

TomFox wrote:

Not sure your syntax there but do I understand the string as a 9x9 puzzle reading one row at a time left to right. If so there are only 62 data there, should there be 81? Anyway with the data provided I cannot tell you the total solutions. My counter wraps round at about 65000 solutions and it just kept going (over 650,000). So I stopped it. I think I may have taken your data wrong or miss understood. Sorry.

you passed the syntax test Smile
I had the wrong mouse snarf data -- original post fixed
here it is again, standard 81 chars, row by row
Code:
536020900008000000000000000600285009000903000800761004000000000004000000201000007

your counter will need to go to 957263
Back to top
View user's profile Send private message Visit poster's website
ChPicard

Joined: 12 Mar 2008
Posts: 82
:
Location: Montreal, Canada

Items
PostPosted: Mon Apr 14, 2008 12:52 pm    Post subject: Re: Fast Solver Reply with quote

TomFox wrote:
To ChPicard,
Thanks for showing interest. I can send you the program file by email if you PM me your email address. I have sent this already to several people using this method (attachment). As yet it is not a batch processor nor a command-line input program. However these can be programed if necessary. Simply try it and see for yourself first.


Hi

Please send me your program.

Thank you very much

sanginjp@yahoo.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron