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   

Seeking clarification of definition of sashimi

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

Joined: 17 Jul 2006
Posts: 35
:
Location: Houston, TX

Items
PostPosted: Sun Dec 31, 2006 10:27 pm    Post subject: Seeking clarification of definition of sashimi Reply with quote

I'm working on some code for finned/sashimi configurations, and I've found a couple of patterns I'm not sure if I should call "finned" or "sashimi". The term "sashimi" seems mainly to be used in a situation where a fin is keeping a pattern classified as something larger than it would be without the fin, but I have two questions:

(1) How far must a pattern "collapse" in order for "sashimi" to be used?
(2) What if the fin is stabilizing the pattern but there is still a vertex in the box with the fin?

Example for question (1): Swordfish collapses to X-wing -- is this sashimi?
Code:

.#.|./.|./.
./.|./.|.X.
./.|./.|./.
---+---+---
./.|./.|./.
.X.|.X.|.X.
./.|./.|./.
---+---+---
./.|./.|./.
.X.|.X.|.X.
./.|./.|./.


Example for question (2): Collapses to singles but has vertex in fin box -- is this sashimi?
Code:

#/.|./.|...
/X.|./.|...
//.|./.|...
---+---+---
//.|./.|...
/X.|.X.|...
//.|./.|...
---+---+---
//.|./.|...
X/.|.X.|...
//.|./.|...

I know it's only a matter of semantics, since the same candidates are eliminated whether we call it sashimi or not, but words are important. And each of the above cases represents a different programming task. As far as I can tell, the collapses-to-singles cases can always be detected by finding only one vertex in the base set's line with the fin. The no-vertices-in-box case is obviuosly easy to detect. But detecting that one pattern would be turned into a smaller pattern if a certain cell were to have a candidate removed from its list is not so easy, at least not how I've got my code set up.

Anyway, thanks in advance for sharing any thoughts on this. Happy New Year!

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

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Mon Jan 01, 2007 3:41 am    Post subject: Re: Seeking clarification of definition of sashimi Reply with quote

MCondron wrote:
(1) How far must a pattern "collapse" in order for "sashimi" to be used?
Code:

.#.|./.|./.
./.|./.|.X.
./.|./.|./.
---+---+---
./.|./.|./.
.X.|.X.|.X.
./.|./.|./.
---+---+---
./.|./.|./.
.X.|.X.|.X.
./.|./.|./.

When all fin cells are presumed false, if a fish would collapse to any smaller size, the fish is sashimi.

For your example, the candidates in r1c2 and r2c8 may alternately be considered the fin -- leading to "skyscraper-like" exclusions.
Code:

 # |./.|*/*
*/*|./.|.#.
./.|./.|./.
---+---+---
./.|./.|./.
.X.|.X.|.X.
./.|./.|./.
---+---+---
./.|./.|./.
.X.|.X.|.X.
./.|./.|./.

Quote:
(2) What if the fin is stabilizing the pattern but there is still a vertex in the box with the fin?
Code:

#/.|./.|...
/X.|./.|...
//.|./.|...
---+---+---
//.|./.|...
/X.|.X.|...
//.|./.|...
---+---+---
//.|./.|...
X/.|.X.|...
//.|./.|...


Then it probably is a franken fish, and in this case it is.

Code:

XX*|./.|...
XX*|./.|...
XX*|./.|...
---+---+---
//.|./.|...
XX*|*X*|***
//.|./.|...
---+---+---
//.|./.|...
XX*|*X*|***
//.|./.|...
[edit: generalized the franken fish]

Quote:
And each of the above cases represents a different programming task. As far as I can tell, the collapses-to-singles cases can always be detected by finding only one vertex in the base set's line with the fin. The no-vertices-in-box case is obviuosly easy to detect. But detecting that one pattern would be turned into a smaller pattern if a certain cell were to have a candidate removed from its list is not so easy, at least not how I've got my code set up.

If you choose not to implement franken fish, I think the test for sashimi can be the same -- each column N-fish has less than N rows with at least two candidates.
Back to top
View user's profile Send private message
MCondron

Joined: 17 Jul 2006
Posts: 35
:
Location: Houston, TX

Items
PostPosted: Tue Jan 09, 2007 4:31 am    Post subject: Reply with quote

Hmm... So you're saying that a finless Franken interpretation of a configuration is favored over seeing it as a sashimi? It seems that fins are less desirable than the more complex "franken/mutant" arrangements of fish.

I do plan to implement franken fish, including with fins (and indeed have spent a lot of time on this, although it's not quite ready yet) but I want to make sure that I get right how to describe the patterns. It's a bit surprising to see a franken swordfish designation favored over calling it a sashimi swordfish, but I can see it either way.

Mainly, the question I'm facing is what my sashimi detection code should avoid. Any vertex cell in the same box seems to violate the idea of sashimi, and if that leads to labeling a configuration as a franken-something, that's OK with me.

And regarding the collapse to x-wing, I think I see now that this can be detected without too much grief. Thanks for the hint.

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

Joined: 17 Jul 2006
Posts: 35
:
Location: Houston, TX

Items
PostPosted: Tue Jan 09, 2007 4:36 am    Post subject: Reply with quote

I had identified the skyscraper dichotomy a while ago and just ignored it since the x-wings will lead to the same eliminations. However, since it seems to be a popular pattern with a name and all, I've added explicit code to find skyscrapers, and I've placed it to run before any of the finned fish code.
Back to top
View user's profile Send private message
rkral

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Tue Jan 09, 2007 5:19 am    Post subject: Reply with quote

MCondron wrote:
Hmm... So you're saying that a finless Franken interpretation of a configuration is favored over seeing it as a sashimi? It seems that fins are less desirable than the more complex "franken/mutant" arrangements of fish.

For the specific example we're discussing, I've illustrated the franken interpretation yields more eliminations than for the sashimi, whose eliminations you didn't actually show. So "yes", I think that would make it "favored."
Back to top
View user's profile Send private message
tarek

Joined: 31 Dec 2005
Posts: 153
:
Location: London, UK

Items
PostPosted: Tue Jan 09, 2007 6:50 pm    Post subject: Reply with quote

There are several prolonged discussions over on the players forums regarding the sashimi/franken overlap...........

This started with the special form of sashimi swordfish, where 3 sashimi swordfish (the headless/0 true vertices line variation) were needed to achieve what a franken swordfish would do in 1 step.......

In these cases I do think that the franken fish would be favoured.

tarek
Back to top
View user's profile Send private message
MCondron

Joined: 17 Jul 2006
Posts: 35
:
Location: Houston, TX

Items
PostPosted: Sat Jan 13, 2007 4:34 pm    Post subject: Reply with quote

Thanks for all the help understanding this. Mainly what I'm trying to do is make sure my code achieves two goals:

1) Code should not miss anything that should be categorized as being a legitimate example of a particular configuration

2) Code should not waste time looking for patterns that are better classified as something else.

It is becoming apparent that these two goals sometimes cannot be achieved at the same time. I suppose the best thing to do is design the code for each solution method to be as broad as possible, then allow the order in which the methods are called determine which is "favored".
Back to top
View user's profile Send private message
MCondron

Joined: 17 Jul 2006
Posts: 35
:
Location: Houston, TX

Items
PostPosted: Sat Jan 13, 2007 10:06 pm    Post subject: Reply with quote

Or, perhaps another way to select the "favored" classification of a configuration would be the one that eliminates the most candidates in a single "move". The problem with that is that you have to test each method and keep track of how many eliminations each method generates, then pick the one with the most. The classification depends on the status of the "victims" as much as it does on the base/root set.

BTW -- could someone point me to a specific spot where the sashimi/franken issue is discussed on the Player's Fourm? I do spend a fair amount of time there, but the volume of posts is so large it is like trying to sip from the ocean sometimes.
Back to top
View user's profile Send private message
MCondron

Joined: 17 Jul 2006
Posts: 35
:
Location: Houston, TX

Items
PostPosted: Sat Jan 13, 2007 10:17 pm    Post subject: Reply with quote

OR...(yet another thought)...maybe the "favored" description/classification of a configuration should be the one that gives the most potential eliminations in a single step, regardless of how many of those potential eliminations are actually realized in a particular board configuration.
Back to top
View user's profile Send private message
rkral

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Sun Jan 14, 2007 2:04 am    Post subject: Reply with quote

MCondron wrote:
could someone point me to a specific spot where the sashimi/franken issue is discussed on the Player's Fourm? I do spend a fair amount of time there, but the volume of posts is so large it is like trying to sip from the ocean sometimes.

Don't recall a discussion about that specific issue but the following three threads are probably the most relevant.

POM Analysis of the X-Wing: The Filet-O-Fish Rule (introduction of sashimi)

Big fish (introduction of franken fish)

The Ultimate FISH Guide (the most recent)

However, there are lots and lots of posts in those three threads.
Back to top
View user's profile Send private message
MCondron

Joined: 17 Jul 2006
Posts: 35
:
Location: Houston, TX

Items
PostPosted: Sun Jan 14, 2007 4:10 am    Post subject: Reply with quote

Thanks, rkral. I am still in the process of digesting the material on those threads. Perhaps in another couple of weeks I will be in a position to write a summary. There's a lot of good material there, but there is also a lot of false starts, dead ends, etc. I've spent a lot of time in research in my professional life, so I understand the nature of the process, but there does come a time when a review is in order. Myth Jellies' recent post on fins is also on my reading list, but also doesn't quite address this issue.
Back to top
View user's profile Send private message
rkral

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Sun Jan 14, 2007 11:29 am    Post subject: Reply with quote

MCondron wrote:
Myth Jellies' recent post on fins is also on my reading list, but also doesn't quite address this issue.

What issue exactly? That there's more than one way to look at things?

If so, it might be a fruitless exercise because of personal preferences.
Back to top
View user's profile Send private message
MCondron

Joined: 17 Jul 2006
Posts: 35
:
Location: Houston, TX

Items
PostPosted: Sun Jan 14, 2007 3:13 pm    Post subject: Reply with quote

rkral wrote:
What issue exactly? That there's more than one way to look at things?

Yes, well, hmmm. What exactly am I trying to understand?

I'm working on getting fins and sashimi added into my franken configurations. In the process of doing that, I realized I had some gaps in my understanding of how those ideas (especially sashimi) work, even for non-franken/mutant configurations. I think the answers above pretty well cleared that up.

After thinking carefully about this for a while, I think my basic problem is I'm just not fully up to speed on the sashimi/franken issue. I should read more before taking up lots of space explaining exactly what it is I don't understand.

Quote:
If so, it might be a fruitless exercise because of personal preferences.


Yes, there is that concern. I understand that certain patterns can be seen in several different ways, and there's no point in spending a lot of effort on that issue.

But my goal, I think, is a valid one, both for the purpose of precision of terminology and also because it's necessary to spell this out before starting to write code for a particular solution method: The scope of that method has to be defined precisely. Even if we all agree that a taco has some overlap with a burrito, we have to understand what a taco is, what a burrito is, and how they are different from a screwdriver, if we are trying to teach something as simple-minded as a computer to identify these things.

Anyway, a reference to a specific post discussing the franken/sashimi issue would be appreciated.

In the meantime, I've got some reading to do. Hopefully in the end I'll have a good post to write on my own perspective on all this.

Mike
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