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   

Extending AIC/NL to solve “all” puzzles without T&E
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku
View previous topic :: View next topic  
Author Message
DarrylC

Joined: 22 Aug 2007
Posts: 11
:
Location: Melbourne, Australia

Items
PostPosted: Fri Sep 07, 2007 4:10 am    Post subject: Extending AIC/NL to solve “all” puzzles without T&E Reply with quote

I have programmed AICs into my solver and have extended it in a similar line to Jeff's post on Multiple nice loops (I am not allowed to post urls at this stage).

My AIC solver works by starting on a cell with the not candidate premises and follows the implications of setting the cell so, for example, if r1c1 is a bi-valued cell {13} we can start with the premises that r1c1 <> 1 (~ 1). The program "visits" each cell (follows all Is => Not and Not => Is paths) updating a separate candidate map for each cell with the premise it visited the cell on and checks to see if a reduction can be made (as per Myth’s/Jeff’s original posts). It continues this process until an end of the chain is found or a reduction occurs. The program “visits” all cells affected by the original assumption (~1).

Extension 1:

Next: The program then looks at to see what cells have been visited and if any cells have only one candidate left as being true and follows the AIC down this path looking for a reduction or the end of the chain. For example if r2c4 is {123} and implications of following the r1c1 chain above imply the cell is ~{13} then it will start looking for AIC reductions from this cell, the first cell being r1c1 (~1) and the next cell in the chain as r2c4 (=2) i.e. the chain looks like r1c1 <> 1 => r2c4=2 => .... This process is repeated until we don’t have any changes or we have a reduction (only AIC reductions are checked). Just doing this little step increased my solvers capability from 615 to 779 puzzles from the top1465 (only using basic reductions + AICs).

Next I stated this process for house singletons (1104 puzzles), then looking for locked candidates (1247) and subsets (1349). You might consider this as adding groups and almost locked sets to the AIC solver (although it is a lot more powerful than just doing this). Effectively you have removed a candidate from the grid, analysed what has happened and made reductions on the NL/AIC principles. I will call this the base extension.

I further extended this approach with Benny’s ALS, type 1-4 Unique Rectangles, templates, normal AICs and any other logical deduction I had in the solver. This solved all the puzzles in the top1465 but failed on many other puzzles (for example some of the puzzles from gsf’s site q1-taxonomy).

Extension 2: (Toughest puzzles)

Just using the base extension, build a new grid based on the candidate premises calculated above. Apply the same logic (recursively call the above routine) for reductions on this grid (and hence these reductions propagate to the parent grid). At this stage I have set the program to look ahead at most 2 levels and it solves all puzzles I have found on these forums.

At this stage I am modifying the program so that I can put the deductions into a form that can be posted

So:
1. Is this a logical extension to AIC/NL?
2. Are AIC/NL reductions non T&E?
3. If 1 & 2 are true is this a path to proving all puzzles are logically solvable?

edit: turned off html, fixed the text that this broke and other errors to try and make this clearer


Last edited by DarrylC on Wed Sep 12, 2007 10:11 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: Fri Sep 07, 2007 5:31 am    Post subject: Re: Extending AIC/NL to solve “all” puzzles without T&E Reply with quote

DarrylC wrote:

Extension 2: (Toughest puzzles)

Just using the base extension, build a new grid based on the candidate premises calculated above. Apply the same logic (recursively call the above routine) for reductions on this grid (and hence these reductions propagate to the parent grid). At this stage I have set the program to look ahead at most 2 levels and it solves all puzzles I have found on these forums.

I think this is a similar result to the shown by the -q1 method in my solver
except that the 5 toughest puzzles require singles+locked_candidates with 2 concurrent propositions
the rest of the toughest only require singles with 2 concurrent propositions
(no need to throw in the kitchen sink in with 2 concurrent propositions)
I have documented this as a trial-and-error method
it is definitely brute force
easter monster, the toughest, requires 467,645 proposition pairs and 1,697,341 singles+locked_candidates iterations to solve
throwing in the kitchen sink will reduce those counts, but add to the complexity of each proposition pair

the -q1 method intentionally determines all eliminations at each ply (instead of just taking the first)
for rating purposes -- this tends to wash lucky choices out of the rating


Last edited by gsf on Wed Oct 17, 2007 1:38 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
DarrylC

Joined: 22 Aug 2007
Posts: 11
:
Location: Melbourne, Australia

Items
PostPosted: Fri Sep 07, 2007 10:55 am    Post subject: Extending AIC/NL to solve “all” puzzles without T&E Reply with quote

gsf wrote:
Code:
I think this is a similar result to the shown by the -q1 method in my solver
except that the 5 toughest puzzles require singles+locked_candidates with 2 concurrent propositions
the rest of the toughest only require singles with 2 concurrent propositions
(no need to throw in the kitchen sink in with 2 concurrent propositions)
I have documented this as a trial-and-error method
it is definitely brute force


I am claiming that because I only do AIC type reductions (as defined by Myth and I seem to remember Myth producing a set based proof for these deductions being logical) and I never do trail and look for an error/contradiction deductions that this process is not trail and error. I think you are implying that AIC/NL deductions contain T&E and hence any extension contains T&E in it. Is that what you are proposing?

I think the process may be trail (~candidate, I never start with what if candidate is true type implications like you would do in a Forcing Chain proof or SIN type implication) without the error. It may even be brute force (well it certainly takes a while for the easter monster) but all the deductions are AIC types 1-4 and I am hoping this is not T&E.

BTW how do you get those nice quote boxes Question
Back to top
View user's profile Send private message
gsf

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

Items
PostPosted: Fri Sep 07, 2007 2:55 pm    Post subject: Re: Extending AIC/NL to solve “all” puzzles without T&E Reply with quote

DarrylC wrote:

I am claiming that because I only do AIC type reductions (as defined by Myth and I seem to remember Myth producing a set based proof for these deductions being logical) and I never do trail and look for an error/contradiction deductions that this process is not trail and error. I think you are implying that AIC/NL deductions contain T&E and hence any extension contains T&E in it. Is that what you are proposing?

if ~candidate is degree 2 (a part of only two choices, a bivalue cell being one example), what is the difference between
candidate is off vs. dualof(candidate) is on?

a trace of a 2-level proposition solution would be indistinguishable from a 2 level backtrack tree search
limited to eliminations and the same constraint methods (e.g., singles, AICs)

(edit) what I'm getting at is that even if the individual constraint methods/techniques are not T&E, how they are used can be

I posted this on another forum a while back
gsf wrote:

Gomes provides a great definition for constraint satisfaction backtracking solvers at sat03.pdf

she splits a backtracking solver into two main parts: a polynomial time sub-solver, and the backtracking algorithm, of which Ariadne's Thread is an example

for sudoku the sub-solver corresponds to a constraint method, e.g. singles or n-tuples or fish, or a combination thereof

a sub-solver takes the current state as input (e.g. the pm grid) and produces one of three outputs or return values: { invalid solved inconclusive }, where invalid provides the failure or error component of backtracking

for some initial inputs (e.g., puzzles) the sub-solver may return solved, in which case the problem is solved and backtracking is not needed

the backtracking algorithm comes into play when the sub-solver returns inconclusive for the initial input (and typos or gremlins come into play for invalid)

backtracking is an explicit admission that there is no remaining domain specific knowledge (as provided by the sub-solver) to determine a solution and that guessing is to commence

there may be some domain specific guidance to help the backtrack guessing (e.g., pruning, back marking, forward checking) but the basic and unavoidable concept is that backtracking is a blind search employed when domain specific knowledge has been exhausted

Quote:

BTW how do you get those nice quote boxes Question

to see the markups for any post, click the "quote" link to reply
the editing area will contain the bulletin board markup tags
this board uses [ and ] like html uses < and >
in particular (I added spaces to foil tag regognition), [ quote="bozo" ] ... [ /quote ]
Back to top
View user's profile Send private message Visit poster's website
DarrylC

Joined: 22 Aug 2007
Posts: 11
:
Location: Melbourne, Australia

Items
PostPosted: Thu Sep 13, 2007 3:27 am    Post subject: Extending AIC/NL to solve “all” puzzles without T&E Reply with quote

gsf wrote:

edit) what I'm getting at is that even if the individual constraint methods/techniques are not T&E, how they are used can be


gsf: thankyou for your analysis, it certainly made me assess what is going on. I am of the view (which may not be correct) that it is not T&E. I believe it is a “domain specific knowledge search” in an attempt to find a cell that allows a logical deduction. I thought that because you can produce the logical path from the first to the last cell and that these cells allowed a deduction based on AIC/NL rules then the deduction would be logical. As you have pointed out this may not be the case.

My other assumption is that AICs allow you to “remove” a candidate from the grid (~A) and as long as you follow the Not => Is, Is => Not path you can make a deduction based on the AIC/NL rules, I have not seen another method that allows this without being T&E.

As a simplistic demonstration, take a look at a puzzle that was in a local paper:
Code:

.75...94.12.....766.8.....1...8.7......136......9.2...2.....4.553.....98.41...63.
+---------------------+----------------+-----------------+
|3      7      5      |6    1     8    |9     4    2     |
|1      2      4      |(35) 9     (35) |8     7    6     |
|6      9      8      |(27) (27)  4    |3     5    1     |
+---------------------+----------------+-----------------+
|(49)   (156)  (2369) |8    (45)  7    |(15)  (26) (349) |
|(4789) (58)   (29)   |1    3     6    |(57)  (28) (49)  |
|(478)  (1568) (36)   |9    (45)  2    |(157) (68) (34)  |
+---------------------+----------------+-----------------+
|2      (68)   (679)  |(37) (678) (39) |4     1    5     |
|5      3      (67)   |4    (67)  1    |2     9    8     |
|(89)   4      1      |(25) (28)  (59) |6     3    7     |
+---------------------+----------------+-----------------+

The deduction types I am talking about stems from the starting cell r7c5 <> 8 and, using your terminology, we would call this the first level proposition. The Second level proposition is based on the unique rectangle (r78c35 on candidates 67 imply that if r7c5 <> 8 then r7c3 = 9, thus r9c1 <> 9 and r9c1 = 8). The deduction that follows is that no buddy of r7c5 and r9c1 can be 8 therefore r7c2 = 6 and r9c5 = 2 and the puzzle falls apart. This is an AIC type 1 reduction (cell 1 ~A … => cell 2 is A therefore any buddies of cell 1 and cell 2 cannot be A).

My “AIC” for this is:

r7c5 <> 8 => r7c3 = 9 => r9c1 <> 9 => r9c1 = 8

with the reduction (AIC rule 1) r7c2 <> 8 and r9c5 <> 8


I think your proposition(s) are that if r7c5 = 6 or 7 => a contradiction, if r7c5 = 8 the puzzle is solved, or that r7c8 <> 8 leads to a contradiction => r7c5 = 8. I can get my program to do that and it speeds it up dramatically.

gsf wrote:

I think this is a similar result to the shown by the -q1 method in my solver except that the 5 toughest puzzles require singles+locked_candidates with 2 concurrent propositions the rest of the toughest only require singles with 2 concurrent propositions (no need to throw in the kitchen sink in with 2 concurrent propositions)


Great advice, this sped the search up quite a bit. I also restricted the reductions to AIC type 1 as described above and, while it took longer, it still solved all the puzzles!

I am now trying to understand what is really going on here as I though that AICs were 2 way (ie you could start with r9c1 <> 8 from the above example and get the same reduction) however as soon as you put in locked candidates then this is not always the case (think of hinges as following a not => is path one way only) but the deductions work and it is no coincidence that they work for all the puzzles I have tested (my program is unforgiving of a deduction that is not correct, it aborts and dumps information rather than carrying on). Further AIC type 2 reductions work as well (cell 1 <> A … implies cell 2 is B with cell 1 and 2 are buddies of each other, therefore cell 1 <> B and cell 2 <> A).

Clearly the extensions work (including Jeff’s initial multiple nice loop extension) and produce deductions that look logical, does this mean it can be considered logical? That is something I will keep looking into.

Thanks for your help, much appreciated.
Back to top
View user's profile Send private message
gsf

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

Items
PostPosted: Thu Sep 13, 2007 4:46 am    Post subject: Re: Extending AIC/NL to solve “all” puzzles without T&E Reply with quote

DarrylC wrote:
I believe it is a “domain specific knowledge search” in an attempt to find a cell that allows a logical deduction.

in Gome's backtrack tree search model the search starts at the point where domain specific knowledge is exhausted
that is the point where the sub-solver fails to solve the puzzle (e.g., where simple sudoku rules are exhausted)
that is the point where the search guesses a value, and then applies the sub-solver to derive results based on guesses
examining what happens after enough guesses will eventually lead to a solution
that process however will not expand domain specific knowledge
i.e., it won't help solve the next hard puzzle that requires guessing
in particular, it won't provide info on what cells to start guessing, or what cells to do the second nested guess on


Last edited by gsf on Fri Oct 12, 2007 10:15 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
berthier

Joined: 13 Jun 2007
Posts: 43
:
Location: Paris, France

Items
PostPosted: Thu Oct 11, 2007 4:41 pm    Post subject: Reply with quote

Daryl
On the difference between T&E and not T&E, I think you may be interested by the following thread:
http://www.sudoku.com/boards/viewtopic.php?t=5600

You can skip the first post and go to the second, which is an improved version of it.

You were perfectly right: AICs and NLs are not T&E.
Back to top
View user's profile Send private message Visit poster's website
DarrylC

Joined: 22 Aug 2007
Posts: 11
:
Location: Melbourne, Australia

Items
PostPosted: Fri Oct 12, 2007 10:10 am    Post subject: Reply with quote

denis_berthier wrote:

T&E theorem (stronger version): Trial and Error is a resolution technique that cannot be the implementation of any set of resolution rules.

Second proof: if a puzzle has more than one solution, T&E is guaranteed to find one (or several or all, depending on the exit condition we put on the T&E algorithm - again, T&E is a family of algorithms, and the theorem applies to any variant).
On the contrary, as a set S of resolution rules can only lead to conclusions that are logical consequences of the axioms and the entries, if a puzzle has several solutions, S cannot find any.
e.g. if there are two solutions such that r1c1 is 1 in the first and 2 in the second, S cannot prove that r1c1=1 (nor that r1c1=2). It can therefore find none of these solutions.
q.e.d.



Thank you for this. If it is true then it supports my argument that this technique is logical as my solver cannot solve puzzles that are not unique with this technique but it can solve the Easter Monster using recursive AIC nets (this is what they could be named).

You would assume that a technique that involved guessing would be able to solve any puzzle. I know my brute force solver can Wink

I believe the technique is logical and can easily be rewritten in a strong and weak inference framework.

Still thinking about it.
Back to top
View user's profile Send private message
berthier

Joined: 13 Jun 2007
Posts: 43
:
Location: Paris, France

Items
PostPosted: Fri Oct 12, 2007 5:20 pm    Post subject: Reply with quote

DarrylC wrote:
it supports my argument that this technique is logical as my solver cannot solve puzzles that are not unique with this technique but it can solve the Easter Monster using recursive AIC nets (this is what they could be named).


Things are not so simple.
Not being able to solve non unique puzzles doesn't mean that it is purely logical.
Said otherwise, T&E (in its various avatars) is probably not be the only algorithm that can solve everything.

I can't see what "recursive AICs" means. AICs are chains, with associated chain rules, which are theorems. Recursive applies to algorithms not to theorems.

The question is: how can you write such chains and the associated rule in a purely descriptive, non algorithmic way?

Doing this would be interesting, because, if you are not using a disguised form of T&E, there is currently no pure logic solution of Easter Monster.
Back to top
View user's profile Send private message Visit poster's website
DarrylC

Joined: 22 Aug 2007
Posts: 11
:
Location: Melbourne, Australia

Items
PostPosted: Mon Oct 15, 2007 3:57 am    Post subject: Reply with quote

berthier wrote:

Things are not so simple.
Not being able to solve non unique puzzles doesn't mean that it is purely logical.
Said otherwise, T&E (in its various avatars) is probably not be the only algorithm that can solve everything.


Denis, I did not mean to imply that this was the foundation of a proof. I was just implying that if you could solve non unique puzzles with your logical solver then something was amiss.

In your framework I believe what I have is a set (S) of resolution rules. As gsf pointed out I may be using guessing to find the reduction but the reduction can be represented using alternating stong and weak inferences. There is no T&E involved.

berthier wrote:

I can't see what "recursive AICs" means. AICs are chains, with associated chain rules, which are theorems. Recursive applies to algorithms not to theorems.


"recursive AIC nets", how to best describe these things. AICs in their purest form are chains (the bivalued/bilocal cell version). As soon as you start putting ALS, fish, etc into your "chain" it is no longer a chain but a net. Once you accept that you can extend AIC via these nets you open the door to putting in any logical extension into your AIC, most people call these extensions Almost things. I extended the "chain" with Benny's ALS (xz and xy-wing) deductions adding Almost ALSs to the net. I also extended the "chain" via AICs (adding Almost AICs to the fold). Just doing this solved all puzzles in the top1465. However adding Almost AICs is a form of recursion and why not add Almost AIC nets. Doing this twice (Almost Almost AIC Nets) solves all known puzzles that I can find.

What I should propose is that there is only two resolution rules needed to solve all unique sudoku puzzles and they are the AIC rules one and two stated previously (well actually you only need rule 1 but solving sudokus is much more fun when you add rule 2 as well). As long as you alternate between strong and weak inferences you may add any logical sudoku solving technique into the net and make the rule 1/2 reduction stated earleir. I find this fascinating and great fun in solving hard sudokus.

berthier wrote:

The question is: how can you write such chains and the associated rule in a purely descriptive, non algorithmic way?

Doing this would be interesting, because, if you are not using a disguised form of T&E, there is currently no pure logic solution of Easter Monster.


Can you point me to a post that describes what is required? It is about time I started writing these things up just as Carcul did when he did the solution for puzzle 77 of the top1465. I am guessing it is not going to be pretty for the Easter Monster. By the way adding another level to my solver makes solving the easter monster much easier after the first two reductions.
Back to top
View user's profile Send private message
berthier

Joined: 13 Jun 2007
Posts: 43
:
Location: Paris, France

Items
PostPosted: Mon Oct 15, 2007 4:46 pm    Post subject: Reply with quote

DarrylC wrote:

In your framework I believe what I have is a set (S) of resolution rules. As gsf pointed out I may be using guessing to find the reduction but the reduction can be represented using alternating stong and weak inferences. There is no T&E involved.

If by "finding the reduction" you mean "finding the pattern (chain or otherwise) that justifies the reduction", I agree.
I just wouldn't say "guessing" about the search for the pattern - no more than about trying to find a proof of a theorem.

DarrylC wrote:

Once you accept that you can extend AIC via these nets you open the door to putting in any logical extension into your AIC, most people call these extensions Almost things. I extended the "chain" with Benny's ALS (xz and xy-wing) deductions adding Almost ALSs to the net. I also extended the "chain" via AICs (adding Almost AICs to the fold). Just doing this solved all puzzles in the top1465. However adding Almost AICs is a form of recursion and why not add Almost AIC nets. Doing this twice (Almost Almost AIC Nets) solves all known puzzles that I can find.


What I fear is the complexity of the rules.
Also, do we really need so complex rules?
If we need nets, aren't simpler nets with all recursion flattened out, enough?
Anyway, this is very interesting.
How does your solver explain the solution?
Could you give the simpler resolution path you get for Easter Monster?

DarrylC wrote:

Can you point me to a post that describes what is required?


Apart from my book (The Hidden Logic of Sudoku) you can have an idea of what I mean in the following threads:
http://www.sudoku.com/boards/viewtopic.php?t=5562
http://www.sudoku.com/boards/viewtopic.php?t=5591
http://www.sudoku.com/boards/viewtopic.php?t=5600
Back to top
View user's profile Send private message Visit poster's website
DarrylC

Joined: 22 Aug 2007
Posts: 11
:
Location: Melbourne, Australia

Items
PostPosted: Tue Oct 16, 2007 11:49 pm    Post subject: Reply with quote

berthier wrote:

If by "finding the reduction" you mean "finding the pattern (chain or otherwise) that justifies the reduction", I agree.
I just wouldn't say "guessing" about the search for the pattern - no more than about trying to find a proof of a theorem.


Yes that is what I mean. Once I produce the reductions then it will be interesting to see if it can stand the litmus test.
berthier wrote:

What I fear is the complexity of the rules.
Also, do we really need so complex rules?
If we need nets, aren't simpler nets with all recursion flattened out, enough?


I am not sure about the complexity of the rules as I have not been able to flatten things out that successfully. Yes I can solve all of the top1465, Rudd's top10000 and Mephan's unsolvables without an extra recursion by incorporating almost ALS and AICs as described earlier (base level technique which is an extension of Jeff's Multiple Nice Loops). Unfortunately the almost things used are quite complex (a 6 ALS overlapping xy-wing is difficult in itself).
berthier wrote:

Anyway, this is very interesting.
How does your solver explain the solution?
Could you give the simpler resolution path you get for Easter Monster?


Yes I am thinking about how to do that, I have started to log all the strong and weak inferences at each level. I will PM you when I have a result (it may take a while as I am trying to fit this into other commitments).

I have also started to read the xyt-chains, I quite like the fact that they are something that a human may be able to spot. They are also a subset of the base AIC/NL extension described at the start of the post. They have similar issues to the deductions I make in that they sometimes only work in one direction and they can be start cell dependent (not sure how bad these are).
Back to top
View user's profile Send private message
berthier

Joined: 13 Jun 2007
Posts: 43
:
Location: Paris, France

Items
PostPosted: Wed Oct 17, 2007 6:18 am    Post subject: Reply with quote

DarrylC wrote:
I have also started to read the xyt-chains, I quite like the fact that they are something that a human may be able to spot. They are also a subset of the base AIC/NL extension described at the start of the post. They have similar issues to the deductions I make in that they sometimes only work in one direction and they can be start cell dependent (not sure how bad these are).

One thing that may interest you in the xyt-chains and the more complex nrczt-chains is that they use explicitly no subset (no hinges, no ALS, no AAAAAALS). Nevertheless, they can solve almost all the random minimal puzzles.
That what makes me think that the exceptionally hard puzzles might be solved with rules less complex than your set.
I've not tried nrczt-nets (lacking time), but they might give the same results as yours.
I'm not sure xyt-chains are a subset of the AIC/NL extension you described. They allow long distance interactions between candidates that are not obviously provided by this extension.

As for unidirectionality and start point dependence, these are not the only possible criteria for chains; you shouldn't let this disturb you. I've defined a lot of purely descriptive criteria, e.g. linearity, homogeneity, reversibility, non-anticipativeness, composability,….
Not relying on subsets may be another major criterion.
There's no absolute criterion. Each criterion provides only a relative indication of the complexity of the pattern.
Back to top
View user's profile Send private message Visit poster's website
DarrylC

Joined: 22 Aug 2007
Posts: 11
:
Location: Melbourne, Australia

Items
PostPosted: Wed Oct 17, 2007 10:35 am    Post subject: Reply with quote

berthier wrote:

One thing that may interest you in the xyt-chains and the more complex nrczt-chains is that they use explicitly no subset (no hinges, no ALS, no AAAAAALS). Nevertheless, they can solve almost all the random minimal puzzles.
That what makes me think that the exceptionally hard puzzles might be solved with rules less complex than your set.
I've not tried nrczt-nets (lacking time), but they might give the same results as yours.


Well another piece of excellent advice. I just took everything out except cell/house singletons and it still solves all the puzzles (and sped it up to boot). I even tried cell singletons only and, again, the puzzles were solved (although a the easter monster was about 20 times slower).

gsf, if your out there you may wish to try it as well.

This will speed up getting the code to print out what it has done. Thank you Denis and I would think about "nrczt-nets".
Back to top
View user's profile Send private message
gsf

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

Items
PostPosted: Wed Oct 17, 2007 2:15 pm    Post subject: Reply with quote

DarrylC wrote:

Well another piece of excellent advice. I just took everything out except cell/house singletons and it still solves all the puzzles (and sped it up to boot). I even tried cell singletons only and, again, the puzzles were solved (although a the easter monster was about 20 times slower).

gsf, if your out there you may wish to try it as well.

This will speed up getting the code to print out what it has done. Thank you Denis and I would think about "nrczt-nets".

I alluded to this in my first post in this thread
gsf wrote:

except that the 5 toughest puzzles require singles+locked_candidates with 2 concurrent propositions
the rest of the toughest only require singles with 2 concurrent propositions
(no need to throw in the kitchen sink in with 2 concurrent propositions)

easter monster, the toughest, requires 467,645 proposition pairs and 1,697,341 singles+locked_candidates iterations to solve
throwing in the kitchen sink will reduce those counts, but add to the complexity of each proposition pair

you can think of #concurrent-propositions and techniques-in-scope as two dials on a sudoku measurement device
"harder" puzzles require higher dial settings
this setup models traditional tree search
the tree search literature examines in detail the tradeoffs between the pruning work done at each node
(techniques in scope) and the number of nodes that must be evaluated (roughly depth)
turn up the depth and lesser techniques will solve most puzzles
turn up the techniques and lesser depth will solve most puzzles

all of the top1465 solve with depth/level 1 singles propositions

does "cell/house singletons" mean "naked/hidden singles"?
I ask because, modulo bugs, easter monster requires { naked/hidden singles + locked-candidates } and 2 concurrent propositions to solve
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku All times are GMT
Goto page 1, 2  Next
Page 1 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