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   

Programming the 'hidden subset' - Help!
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku
View previous topic :: View next topic  
Author Message
MotsCroises

Joined: 08 Dec 2005
Posts: 10
:

Items
PostPosted: Thu Dec 08, 2005 5:24 pm    Post subject: Reply with quote

Ruud wrote:
So don't tell me it can be solved with naked subsets alone, or find another hobby.


Thank you Ruud!
I don't want to annoy you, but in fact it's my problem… for me the "naked subsets" are easier than "hidden subset", and I don't have to use it…
It was the point of my question; I just look for Sudoku witch can't be resolved with easier methods…
Back to top
View user's profile Send private message Visit poster's website
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Thu Dec 08, 2005 5:46 pm    Post subject: Reply with quote

MotsCroises wrote:
I don't want to annoy you, but in fact it's my problem...

You're just discovering the same pitfalls we all do, when programming our solvers.

Here's the situation:

When a house (row, column, box) has 7 unbound cells (that is: 7 cells with more than 1 candidate left), and you can find a hidden subset of size 3 in that house, you wil ALWAYS be able to find a naked subset of size 4 (= 7-3) in that same house.

Why? Because naked and hidden subsets always complement each other.

For you, there are 2 ways to ensure you can test the hidden subset code:

1. Disable the test for naked subsets (temporarily)
2. Make sure that a hidden subset of size N is detected BEFORE a naked subset of size N+1.

1. may be easy, but 2 is better, because that is the kind of behaviour that you want in a solver program.

Ruud.
_________________
Meet me at sudocue.net
Back to top
View user's profile Send private message Visit poster's website
MotsCroises

Joined: 08 Dec 2005
Posts: 10
:

Items
PostPosted: Thu Dec 08, 2005 6:00 pm    Post subject: Reply with quote

Ruud wrote:
You're just discovering the same pitfalls we all do, when programming our solvers.


In fact, I begin to supposed that…

Ruud wrote:
1. may be easy, but 2 is better, because that is the kind of behaviour that you want in a solver program.


It's that my second question, because I think for a beginner, it's easier to resolve naked subset of long size than hidden subset any size. You don't think so ?

Thanks a lot!
Back to top
View user's profile Send private message Visit poster's website
MotsCroises

Joined: 08 Dec 2005
Posts: 10
:

Items
PostPosted: Fri Dec 09, 2005 2:06 pm    Post subject: Reply with quote

In my idea of the method, after Rudd demonstration, I think the program will be:
Code:
naked_subset(2)
hidden_subset(2)
naked_subset(3)
hidden_subset(3)
naked_subset(4)
hidden_subset(4)
...


But in my point of view, a naked subset 3 is easier than a hidden subset 2. My first idea:
Code:
naked_subset(2)
naked_subset(3)
hidden_subset(2)
naked_subset(4)
hidden_subset(3)
naked_subset(5)

And with the Rudd example (7 unbound cells):
Code:
naked_subset(2)
naked_subset(3)
naked_subset(4) = hidden_subset(3)
naked_subset(5) = hidden_subset(2)


My answer: No need to look specially for hidden subsets, just easier to call the naked_subset for all sizes, and if the ratio unbound cells and naked subset size is too bad, I use hidden subset explanation. Do you think I'm right ?
Back to top
View user's profile Send private message Visit poster's website
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Fri Dec 09, 2005 2:35 pm    Post subject: Reply with quote

Quote:
No need to look specially for hidden subsets, just easier to call the naked_subset for all sizes, and if the ratio unbound cells and naked subset size is too bad, I use hidden subset explanation. Do you think I'm right ?

You will lose a little in performance, but if that's no problem, your approach is correct.

Be aware that the decision to report either the naked or the hidden subset should be done in an objective way, unless you expect every user of your program to have the same perspective about the difficulty of hidden subsets vs. naked subsets.
Personally, I have no problem spotting a hidden pair, but spotting a naked quad can be difficult, because not all 4 digits need to be used in everyone of the 4 cells.

Ruud.
_________________
Meet me at sudocue.net
Back to top
View user's profile Send private message Visit poster's website
MotsCroises

Joined: 08 Dec 2005
Posts: 10
:

Items
PostPosted: Fri Dec 09, 2005 3:46 pm    Post subject: Reply with quote

Ruud wrote:
Personally, I have no problem spotting a hidden pair, but spotting a naked quad can be difficult, because not all 4 digits need to be used in everyone of the 4 cells.


Same for me. But it's just more difficult to know when a beginner can understand and use one and the other, after that spotting them it's an other often more difficult problem...
I think it's no need to use hidden subset for more than 2 or 3 numbers…

Thanks a lot Ruud!
Back to top
View user's profile Send private message Visit poster's website
rkral

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Sat Dec 10, 2005 1:03 am    Post subject: Reply with quote

Ruud wrote:
Sudo Cue for Windows, download it here

Ruud, is it possible Sudo Cue won't install with.NET Framework 2.0?

I just installed .NET Framework today ... specifically to run Sudo Cue ... but Sudo Cue installer says it requires version 1.1.4322

Control Panel --> Add/Remove Programs shows version 2.0 installed.
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Sat Dec 10, 2005 12:04 pm    Post subject: Reply with quote

rkral wrote:
Ruud, is it possible Sudo Cue won't install with.NET Framework 2.0?

Thanks for bringing this to my attention.

MS released version 2.0 of the framework without telling me.

I did a quick check and there seem to be 2 things required to make it work with 2.0:

In the setup.ini file, this line:
Quote:
SupportedRuntimes=1.1.4322

should be replaced with:
Quote:
SupportedRuntimes=1.1.4322;2.0.50727

having changed that, the installer will allow installation under version 2.0 of the framework.

Second. The directory containing the SudoCue executable should contain a file named SudoCue.config

After you create this file, put the following content in it:

Code:
<startup>
   <supportedRuntime version="v1.1.4322" />
   <supportedRuntime version="v2.0.50727" />
</startup>

This tells the program itself that running framework 2.0 is OK.

In the next release on my website these changes will be present. However, I just installed framework 2.0 today, so I want to perform a few tests with the program before releasing it.

If it does not work, you will need to install framework 1.1.

Please tell me if this solved the problem. A few others have reported problems with framework 2.0, so I would like to know if this is the correct approach.

Ruud.
_________________
Meet me at sudocue.net
Back to top
View user's profile Send private message Visit poster's website
rkral

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Sat Dec 10, 2005 5:28 pm    Post subject: Reply with quote

Ruud wrote:
Please tell me if this solved the problem.

It didn't. Even after removing references to "1.1.4322" from both setup.ini and SudoCue.config -- and leaving the "2.0.50727", of course -- the installer still tells me it requires 1.1.4322.

Ruud wrote:
If it does not work, you will need to install framework 1.1.

I'll wait for your next release.
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Sat Dec 10, 2005 9:26 pm    Post subject: Reply with quote

rkral wrote:
the installer still tells me it requires 1.1.4322

I have made a few more inquiries.

The problem seems to be the setup.exe that is included in the zip file. However, when you right-click SudoCueSetup.msi after you installed the .Net framework, it should allow you to Install that package without requiring setup.exe.

As for the application itself, Microsoft guarantees forward compatibility of the framework, so any application built for 1.1 should run fine on version 2.0. I tested this on my machine and it did run correctly with framework version 2.0. The config file is only required if you want to prevent an application from running a newer version of the framework. This is not what we want to achieve...

Let me know if this works.

good luck,

Ruud.
_________________
Meet me at sudocue.net
Back to top
View user's profile Send private message Visit poster's website
rkral

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Sun Dec 11, 2005 10:25 am    Post subject: Reply with quote

Ruud wrote:
Let me know if this works. good luck, Ruud.

No luck ... no good luck, that is. Fails with the same "requires 1.1.4322" message. On one attempt, it offered up setup.ini inside an editor, but wouldn't do it a 2nd time. I'm sure I didn't invoke the editor, 'cause it was one I'm not even familiar with.
Ruud wrote:
The problem seems to be the setup.exe that is included in the zip file.

Results indicate the problem is actually in SudoCueSetup.msi, as I had deleted Setup.exe. Besides, the string "1.1.4322" exists twice in the .msi file.
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Tue Dec 13, 2005 11:36 am    Post subject: Reply with quote

rkral wrote:
Results indicate the problem is actually in SudoCueSetup.msi

Finally got the info I needed to fix the versioning problem. For the new version 1.1.4, only SudoCueSetup.msi needs to be downloaded. It should install with both versions of the framework.

I sincerely hope this finally solves the problem.

Ruud.
_________________
Meet me at sudocue.net
Back to top
View user's profile Send private message Visit poster's website
rkral

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Tue Dec 13, 2005 12:21 pm    Post subject: Reply with quote

Ruud wrote:
I sincerely hope this finally solves the problem.

Very Happy I can verify Sudo Cue 1.1.4 installs with MS .NET Framework v2.0.50727.

Thanks, Ron
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
Goto page Previous  1, 2
Page 2 of 2

 
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