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   

Sudoku in vhdl

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

Joined: 14 Sep 2009
Posts: 11
:

Items
PostPosted: Mon Sep 14, 2009 2:43 pm    Post subject: Sudoku in vhdl Reply with quote

I want to learn vhdl language and then develop an application that allows to solve Sudoku. I am thinking of doing a first Visual Basic program that solves sudoku and then move the program to vhdl. Is it appropriate? Has anyone programmed sudoku in vhdl? What advice can you give me?
Back to top
View user's profile Send private message
Lunatic

Joined: 11 Mar 2007
Posts: 166
:
Location: Ghent - Belgium

Items
PostPosted: Tue Sep 15, 2009 9:21 am    Post subject: Reply with quote

Hello and welcome,

I don't know about vhdl, but my own solver is written in VisualBasic, so maybe i can help you with that.
I also studied electronics years ago and logical circuits, so this could be handy...
_________________
Marc
~~~<><~~~<><~~~<><~~~<><~~~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pirussas

Joined: 14 Sep 2009
Posts: 11
:

Items
PostPosted: Mon Oct 12, 2009 8:00 pm    Post subject: Reply with quote

My program in visual basic now funcionate for 9x9 but now I want to nxn. If possible at least up to 225x225. I'm with many difficulties. My program reads 81 numbers for 9x9. For 16x16 don't funcionate.What tips you can give me?
Back to top
View user's profile Send private message
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Tue Oct 13, 2009 4:16 am    Post subject: Reply with quote

pirussas wrote:
My program in visual basic now funcionate for 9x9 but now I want to nxn. If possible at least up to 225x225. I'm with many difficulties. My program reads 81 numbers for 9x9. For 16x16 don't funcionate.What tips you can give me?

Well, if you want your program to work for nxn (I think you mean n^2 x n^2), the obvious first step is to get it to work for n with n set to 3 and then just set n to 4. Note, however, that the complexity of the problem grows much faster than n^4. Your target of n=15 is very ambitious. Where are you planning to find such puzzles?

You don't actually specify in which way your program doesn't work, nor what method(s) your solver uses. That would be a help.

Regards,

Mike Metcalf
Back to top
View user's profile Send private message
pirussas

Joined: 14 Sep 2009
Posts: 11
:

Items
PostPosted: Fri Oct 16, 2009 9:20 pm    Post subject: Reply with quote

m_b_metcalf wrote:
pirussas wrote:
My program in visual basic now funcionate for 9x9 but now I want to nxn. If possible at least up to 225x225. I'm with many difficulties. My program reads 81 numbers for 9x9. For 16x16 don't funcionate.What tips you can give me?

Well, if you want your program to work for nxn (I think you mean n^2 x n^2), the obvious first step is to get it to work for n with n set to 3 and then just set n to 4. Note, however, that the complexity of the problem grows much faster than n^4. Your target of n=15 is very ambitious. Where are you planning to find such puzzles?

You don't actually specify in which way your program doesn't work, nor what method(s) your solver uses. That would be a help.

Regards,

Mike Metcalf


I planning use puzzles in site of 2009 International Conference on Field-
Programmable Technology.
Now my program load and open this text files until n=9, for n=10 show error in: "Me.Controls.Add(lbl)" appears "Error creating window handle".
I use this methods: CRME, lone rangers, twins, triplets, brute force.
Back to top
View user's profile Send private message
lkSudoku

Joined: 16 May 2009
Posts: 60
:

Items
PostPosted: Sun Oct 18, 2009 6:10 pm    Post subject: Reply with quote

My tip is that you should probably run a debugger, and check the state of your program, to find when it becomes invalid

Another tip is to try and find where your program is assuming 9x9 board with hard coded numbers, and replace these numbers with a generic variable
Back to top
View user's profile Send private message Send e-mail
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Mon Oct 19, 2009 7:02 am    Post subject: Reply with quote

pirussas wrote:

I planning use puzzles in site of 2009 International Conference on Field-
Programmable Technology.


Interesting. Unless I'm mistaken, my own program finds, in 55 seconds, that the first of the two N=15 samples has multiple solutions. Do I win multiple prizes?

Regards,

Mike Metcalf
Back to top
View user's profile Send private message
gsf

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

Items
PostPosted: Mon Oct 19, 2009 3:13 pm    Post subject: Reply with quote

m_b_metcalf wrote:
pirussas wrote:

I planning use puzzles in site of 2009 International Conference on Field-
Programmable Technology.

Interesting. Unless I'm mistaken, my own program finds, in 55 seconds, that the first of the two N=15 samples has multiple solutions. Do I win multiple prizes?

Regards,

Mike Metcalf

I concur on multiple solutions for 15a
Mike, did you try 07b -- it leaves pseudocoup-7x7 spinning deep in the tree search
Back to top
View user's profile Send private message Visit poster's website
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Mon Oct 19, 2009 5:43 pm    Post subject: Reply with quote

gsf wrote:
Mike, did you try 07b -- it leaves pseudocoup-7x7 spinning deep in the tree search

Glen,
I'm a bit strapped for time this week, but I tried 7a, which has multiple solutions, and 7b sends my program into a tizzy. It's possibly ill-formed (0 solutions) but I don't have time to investigate today.

Regard,

Mike
Back to top
View user's profile Send private message
gsf

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

Items
PostPosted: Tue Oct 20, 2009 2:44 pm    Post subject: Reply with quote

pirussas wrote:
I planning use puzzles in site of 2009 International Conference on Field-Programmable Technology.

here are my results for the benchmark puzzles via pseudocoup (N=B*B determined at compile-time) on a 2GHz pentium
its possible that the invalid/indeterminate puzzles are intentional
but it would be interesting to find out
Code:
PUZ SECONDS  STATUS
--- -------- ------
03a 0.000000 valid
03b 0.000000 valid
04a 0.000000 valid
04b 0.004000 valid
05a 0.000000 valid
05b 0.036002 multiple-solutions
06a 0.004000 valid
06b 531.6812 multiple-solutions
07a 0.008000 multiple-solutions
07b 7200.000 indeterminate
08a 0.020001 multiple-solutions
08b 36.00224 no-solution
09a 0.052003 multiple-solutions
09b 136.0525 no-solution
10a 0.164010 multiple-solutions
10b 7200.000 indeterminate
11a 0.284018 valid
11b 7200.000 indeterminate
12a 1.000063 multiple-solutions
12b 7200.000 indeterminate
13a 1.044065 multiple-solutions
13b 7200.000 indeterminate
14a 2.500156 multiple-solutions
14b 7200.000 indeterminate
15a 9.876617 multiple-solutions
15b 7200.000 indeterminate
Back to top
View user's profile Send private message Visit poster's website
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Wed Oct 21, 2009 7:55 am    Post subject: Reply with quote

gsf wrote:
here are my results for the benchmark puzzles via pseudocoup (N=B*B determined at compile-time) on a 2GHz pentium
its possible that the invalid/indeterminate puzzles are intentional
but it would be interesting to find out

Glenn,
I had started making some spot checks, all of which agreed with your complete results. I suggest you send them to the contact person (to whom I've already sent the 15a result, with no reply).

I adapted my fast zero-solution code for N=7 and ran it on 7b, getting a null result.

Regards,

Mike


Last edited by m_b_metcalf on Wed Oct 21, 2009 2:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
gsf

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

Items
PostPosted: Wed Oct 21, 2009 8:11 am    Post subject: Reply with quote

m_b_metcalf wrote:
gsf wrote:
here are my results for the benchmark puzzles via pseudocoup (N=B*B determined at compile-time) on a 2GHz pentium
its possible that the invalid/indeterminate puzzles are intentional
but it would be interesting to find out

I had started making some spot checks, all of which agreed with your complete results. I suggest you send them to the contact person (to whom I've already sent the 15a result, with no reply).

thanks, I just sent it
Quote:
I adapted my fast zero-solution code for N=7 and ran it on 7b, getting a null result.

does null result mean that 7b is confirmed to have no solution?
Back to top
View user's profile Send private message Visit poster's website
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Wed Oct 21, 2009 8:36 am    Post subject: Reply with quote

gsf wrote:
does null result mean that 7b is confirmed to have no solution?

The opposite. It fails the fast test so has an indeterminate number of solutions.

Concerning the multiple solutions, I had the impression they were all due to a small number of uncovered U4s.

Regards,

Mike
Back to top
View user's profile Send private message
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Sat Oct 24, 2009 5:25 am    Post subject: Reply with quote

I draw your attention to the 225 x 225 puzzle here.

Regards,

Mike Metcalf
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving 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