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   

How to visualize forcing chains
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
Henk

Joined: 13 Nov 2005
Posts: 105
:

Items
PostPosted: Wed Feb 01, 2006 12:03 pm    Post subject: How to visualize forcing chains Reply with quote

I am expirimenting in my sudoku program on how to visualize a forcing chains hint. The best I can come up with is the following:



Anybody has a better idea? Or is there a program that gives a understandable visual hint on forcing chains?
_________________
Generate and solve Sudoku puzzles with Into Sudoku!
Back to top
View user's profile Send private message
Graeme

Joined: 31 Jan 2006
Posts: 22
:
Location: Adelaide

Items
PostPosted: Thu Feb 02, 2006 9:55 am    Post subject: Reply with quote

Hi Henk,

I really like the graphical presentation of your hints! If I understand this example, it leads to the removal of {9} candidate in C2.

The Sadman definition http://www.simes.clara.co.uk/programs/sudokutechnique7.htm of Forcing Chains is:
Quote:
Forcing chains is a technique that allows you to deduce with certainty the content of a cell from considering the implications resulting from the placement of each of another cell's candidates. (This technique is also know as "double-implication chains".)


So using this definition, Forcing Chains is about setting a value, and not about candidate removal. I have a technique I've called Forcing Chain Reduction that does what your example shows.
Back to top
View user's profile Send private message
Henk

Joined: 13 Nov 2005
Posts: 105
:

Items
PostPosted: Thu Feb 02, 2006 10:07 am    Post subject: Reply with quote

Quote:
So using this definition, Forcing Chains is about setting a value, and not about candidate removal. I have a technique I've called Forcing Chain Reduction that does what your example shows.


I was looking for the name of it, thanks! I did make a difference between the two, but I thought it was the same technique. I allways prefer setting a value over candidate removal in my program.
_________________
Generate and solve Sudoku puzzles with Into Sudoku!
Back to top
View user's profile Send private message
Graeme

Joined: 31 Jan 2006
Posts: 22
:
Location: Adelaide

Items
PostPosted: Thu Feb 02, 2006 11:17 am    Post subject: Reply with quote

I should point out that Forcing Chain Reduction is just a name I created for this variation of the Forcing Chain definition.
Very Happy
Back to top
View user's profile Send private message
angusj
Site Admin
Joined: 18 Jun 2005
Posts: 406
:

Items
PostPosted: Thu Feb 02, 2006 12:25 pm    Post subject: Reply with quote

Graeme wrote:
So using this definition, Forcing Chains is about setting a value, and not about candidate removal.

No, Forcing Chains is about either.
For examples see -
http://www.sudoku.com/forums/viewtopic.php?p=9266#9266
http://www.sudoku.com/forums/viewtopic.php?p=10636#10636
Back to top
View user's profile Send private message Visit poster's website
Graeme

Joined: 31 Jan 2006
Posts: 22
:
Location: Adelaide

Items
PostPosted: Thu Feb 02, 2006 12:58 pm    Post subject: Reply with quote

thanks, angusj

It gets messy when there are different definitions of the same technique. Hard to know whether a definition is evolving, incomplete, old or embellished.

Smile
Back to top
View user's profile Send private message
Henk

Joined: 13 Nov 2005
Posts: 105
:

Items
PostPosted: Fri Feb 03, 2006 7:12 pm    Post subject: Reply with quote

angusj:
Thanks for clearing that up...
_________________
Generate and solve Sudoku puzzles with Into Sudoku!
Back to top
View user's profile Send private message
Graeme

Joined: 31 Jan 2006
Posts: 22
:
Location: Adelaide

Items
PostPosted: Sat Feb 04, 2006 2:20 am    Post subject: Reply with quote

Does anyone know if there's an agreed documentation of solve techniques?

Clearly, the Sadman site and the forum message linked above are at odds over what Forcing Chain includes.

It seems that anyone, including me, can make up anything we like.
Back to top
View user's profile Send private message
angusj
Site Admin
Joined: 18 Jun 2005
Posts: 406
:

Items
PostPosted: Sat Feb 04, 2006 5:22 am    Post subject: Reply with quote

Graeme wrote:
Does anyone know if there's an agreed documentation of solve techniques?

There isn't one.

While there's consensus over naming perhaps the majority of techniques, there are a number of techniques where there's still no consensus (eg http://www.sudoku.com/forums/viewtopic.php?p=17388#17388).

Also, newcomers sometimes add to the confusion by creating their own names (which is understandable since it's hard to find good documentation especially for existing but perhaps more 'exotic' techniques).
Back to top
View user's profile Send private message Visit poster's website
Graeme

Joined: 31 Jan 2006
Posts: 22
:
Location: Adelaide

Items
PostPosted: Sat Feb 04, 2006 6:58 am    Post subject: Reply with quote

I'm not surprised, Angus

And yes, that's me; a newcomer with my own naming conventions, although I still think my Error Chains technique is not covered elsewhere.

Funny thing, how you approach a technique as a programmer vs approaching it as a human lead you to different conclusions about how to classify techniques. That's how I found my Error Chains, by modifying my program to do the sorts of things a human would do.
Back to top
View user's profile Send private message
foxglove

Joined: 04 Feb 2006
Posts: 42
:
Location: Portugal

Items
PostPosted: Sun Feb 05, 2006 1:37 pm    Post subject: Re: How to visualize forcing chains Reply with quote

Henk wrote:

Anybody has a better idea? Or is there a program that gives a understandable visual hint on forcing chains?


I gave up the very detailed explanations, let the user have fun sorting things out:


So i cannot say that it gives a understandable visual hint on forcing chains! but well...
Back to top
View user's profile Send private message Visit poster's website
fermat

Joined: 05 Feb 2006
Posts: 25
:
Location: Melbourne

Items
PostPosted: Sun Feb 05, 2006 7:49 pm    Post subject: Re: How to visualize forcing chains Reply with quote

Henk wrote:
I am expirimenting in my sudoku program on how to visualize a forcing chains hint. The best I can come up with is the following:



Anybody has a better idea? Or is there a program that gives a understandable visual hint on forcing chains?


I think that red lines to and from the square highlighted yellow should be a different colour, or should not be there as they are not (in my view) part of the chain.

If you are willing to get even more detailed, given that some of the boxes in the chain might have more than just two candidates, perhaps you could colour the candidates directly involved as well.
Back to top
View user's profile Send private message
Henk

Joined: 13 Nov 2005
Posts: 105
:

Items
PostPosted: Fri Feb 17, 2006 6:55 pm    Post subject: Reply with quote

I implemented this:



you like it? It was a real pain to implement manual drawing for this.. Confused
_________________
Generate and solve Sudoku puzzles with Into Sudoku!
Back to top
View user's profile Send private message
foxglove

Joined: 04 Feb 2006
Posts: 42
:
Location: Portugal

Items
PostPosted: Fri Feb 17, 2006 9:07 pm    Post subject: Reply with quote

Henk wrote:
you like it?

Much clearer then coloring the background!

It's a bit puzzling your missing half the steps.

I have a little problem with the technique and your two colors for the lines show it:
practically everytime there is more than one start!

I had to remotely edit my post above because the original pict got lost, so now it's redone with your puzzle.

There are 3 or 4 starts that make a forcing chain in the same chain of implications.

What I'm I misssing here?
Back to top
View user's profile Send private message Visit poster's website
Henk

Joined: 13 Nov 2005
Posts: 105
:

Items
PostPosted: Fri Feb 17, 2006 9:29 pm    Post subject: Reply with quote

foxglove:
It took some time for my to figure out what your hint is doing, but now I undestand! I also see the difference, you color all 'candidates' for the chain. My hint shows just one path. They just are two different approces of giving the hint.

I like the concept of showing all possible chain candidates. But I'm currious, how do you mark the value as the chains use the same candidate from the same cell, like these puzzles. Just give the candidate one color won't do then...

First (triple implication chain):

Code:
 . . 5 | 7 . . | 9 . .
 . . . | . 9 . | 7 . 3
 7 9 . | . . 3 | 5 . 1
-------+-------+------
 . . . | . 2 8 | 1 9 .
 . . 9 | 4 . . | . 3 .
 . 8 . | . . 9 | 4 5 .
-------+-------+------
 8 5 3 | 9 . . | . 1 4
 9 . . | . 3 . | . 7 5
 1 7 2 | . 5 4 | 3 . 9


 234  1234 5    | 7    48   16   | 9    24   68 
 246  246  1468 | 1256 9    56   | 7    2468 3   
 7    9    468  | 26   48   3    | 5    246  1   
----------------+----------------+----------------
 3456 346  467  | 356  2    8    | 1    9    67 
 256  126  9    | 4    167  57   | 68   3    28 
 236  8    167  | 36   16   9    | 4    5    27 
----------------+----------------+----------------
 8    5    3    | 9    67   267  | 26   1    4   
 9    46   46   | 18   3    12   | 28   7    5   
 1    7    2    | 68   5    4    | 3    68   9   


or this (triple implication chain):

Code:
 . 5 . | . 3 . | . . 2
 3 7 . | 5 . 2 | . . 6
 6 2 1 | . 9 . | 3 . 5
-------+-------+------
 . 4 . | . . 8 | . 2 .
 . . 3 | 9 . . | 5 . .
 . 6 . | . 5 . | 7 . .
-------+-------+------
 . 3 . | 1 . 9 | 8 . .
 . 9 . | 4 . 3 | . . .
 . . . | . . 5 | . 3 .


 489   5     489   | 678   3     16    | 149   14789 2   
 3     7     489   | 5     14    2     | 149   489   6   
 6     2     1     | 78    9     47    | 3     478   5   
-------------------+-------------------+-------------------
 579   4     579   | 37    16    8     | 169   2     139 
 27    18    3     | 9     24    67    | 5     16    48   
 1289  6     289   | 23    5     14    | 7     49    3489
-------------------+-------------------+-------------------
 2457  3     24567 | 1     267   9     | 8     456   47   
 12578 9     25678 | 4     2678  3     | 126   156   17   
 1478  18    24678 | 26    2678  5     | 1249  3     1479

_________________
Generate and solve Sudoku puzzles with Into Sudoku!
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
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